more code
This commit is contained in:
parent
d7626104d4
commit
4f82cc967b
12
code/Makefile
Normal file
12
code/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
######################################################
|
||||
# TetaTricks
|
||||
#
|
||||
|
||||
# exemples du bouquin
|
||||
|
||||
ex_curses: ex_curses.c Makefile
|
||||
gcc -Wall $< -o $@ -lncurses
|
||||
|
||||
thread-demo: thread-demo.c Makefile
|
||||
gcc -Wall -pthread $< -o $@
|
||||
|
16
code/move-xlogo.sh
Executable file
16
code/move-xlogo.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
xlogo &
|
||||
sleep 1
|
||||
job=$! ; echo "job = " $job
|
||||
|
||||
WIN=$(xdotool search -name 'xlogo')
|
||||
echo "win = " $WIN
|
||||
|
||||
for foo in $(seq 10 33 900)
|
||||
do
|
||||
sleep 1
|
||||
xdotool windowmove $WIN 50 $foo
|
||||
done
|
||||
|
||||
kill $job
|
26
code/tagpic.sh
Executable file
26
code/tagpic.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
function tagpic
|
||||
{
|
||||
infile="$1"
|
||||
outfile="$2"
|
||||
texte="$3"
|
||||
txtfont=" -font Utopia "
|
||||
fontsize=" -pointsize 96 -kerning 4 "
|
||||
color=" -fill Gray20 -stroke White "
|
||||
txtopts=" -antialias -alpha off $txtfont "
|
||||
convert $infile \
|
||||
${txtopts} \
|
||||
${txtfont} ${fontsize} \
|
||||
${color} \
|
||||
-gravity South \
|
||||
-annotate +0+85 "${texte}" \
|
||||
$outfile
|
||||
}
|
||||
|
||||
if [ "$#" -eq 1 ] ; then
|
||||
tagpic foo.png bar.png "$1"
|
||||
display bar.png
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user