-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfallpub
71 lines (50 loc) · 803 Bytes
/
fallpub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#gplv3 by https://github.com/lnee94
#note functnality has been removed because it is not ready
setup(){
case "$1" in
sel)
id="$(xdotool selectwindow)"
;;
*)
feh -x ~/.face.icon &
sleep 0.6
id="$(xdotool search --pid "$(jobs -p | tail -1)" )"
;;
esac
echo "$id"
}
gety(){
xdotool getwindowgeometry "$id" |head -2 | tail -1 | awk -F, '{print $2}' | awk '{print $1}'
}
mowin(){
local tmp
tmp=$(($old+$1))
if [ $tmp -gt $gr ] && [ $tmp -lt 1000 ]
then
tmp=$gr
fi
xdotool windowmove "$id" x "$tmp"
}
setup $1
bgr=932
gr=$bgr
old=$(gety)
v=0
g=4
while true
do
old=$(gety)
echo $v "$old" "$gr" "$cel" $$ $id $vx $iii
mowin $(($v+$g))
v=$(($v+$g))
if [ $(($(gety)-$old)) = 0 ]
then
if [ $v -gt 10 ]
then
v=$((($v*-1)+13))
else
v=0
fi
fi
done