forked from holtzilya2008/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mousemove
executable file
·52 lines (46 loc) · 846 Bytes
/
mousemove
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
#!/bin/bash
#
# a script that runs xdotool mousemove
#
SCREEN_TOP=0
SCREEN_BOTTOM=1050
SCREEN_RIGHT=1680
SCREEN_LEFT=0
arg1=0
arg2=0
case $1 in
left)
arg1=$SCREEN_LEFT
echo 'arg1 is SCREEN_LEFT'
;;
right)
arg1=$SCREEN_RIGHT
echo 'arg1 is SCREEN_RIGHT'
;;
center)
arg1=$((SCREEN_RIGHT/2))
echo 'arg1 is SCREEN_CENTER'
;;
*)
arg1=0
echo 'arg1 is undefined'
esac
case $2 in
top)
arg2=$SCREEN_TOP
echo 'arg2 is SCREEN_TOP'
;;
bottom)
arg2=$SCREEN_BOTTOM
echo 'arg2 is SCREEN_BOTTOM'
;;
center)
arg2=$((SCREEN_BOTTOM/2))
echo 'arg2 is CENTER'
;;
*)
arg2=0
echo 'arg2 is undefined!'
esac
echo "$arg1 $arg2"
xdotool mousemove $arg1 $arg2