Browse Source

more code

master
tth 2 years ago
parent
commit
4f82cc967b
  1. 12
      code/Makefile
  2. 16
      code/move-xlogo.sh
  3. 26
      code/tagpic.sh

12
code/Makefile

@ -0,0 +1,12 @@ @@ -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

@ -0,0 +1,16 @@ @@ -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

@ -0,0 +1,26 @@ @@ -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…
Cancel
Save