-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmode_macro
46 lines (40 loc) · 1.61 KB
/
mode_macro
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
# return to original sxhkd
Escape
printf "" >"$SXHKD_MODE_FILE"; \
killall zscroll 2>/dev/null; \
killall sxhkd && sxhkd &
# play macro with delayed keystrokes
d
xdotool key Escape; \
delay=$(rofi -dmenu -p "Enter delay between keystrokes in ms: "); \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing macro"; \
keystrokes -d $delay -p; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing macro finished"
# play macro n times
n
xdotool key Escape; \
times=$(rofi -dmenu -p "Enter repeat count: "); \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing macro $times times"; \
keystrokes -n $times -p; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Recording macro finished"
# play mirrored macro
m
xdotool key Escape; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing mirrored macro"; \
keystrokes -m -p; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing macro finished"
# play macro
p
xdotool key Escape; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing macro"; \
keystrokes -p; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Playing macro finished"
# record macro
r
xdotool key Escape; \
notify-send -a "system-sxhkd" --hint int:transient:1 "sxhkd" "Recording macro"; \
keystrokes -r -D "Corne Keyboard" "M705"
# delete macro
R
xdotool key Escape; \
keystrokes -R