aboutsummaryrefslogtreecommitdiff
path: root/layouts/community/ergodox/algernon/tools/hid-commands
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community/ergodox/algernon/tools/hid-commands')
-rwxr-xr-x[-rw-r--r--]layouts/community/ergodox/algernon/tools/hid-commands39
1 files changed, 36 insertions, 3 deletions
diff --git a/layouts/community/ergodox/algernon/tools/hid-commands b/layouts/community/ergodox/algernon/tools/hid-commands
index 54ca7556a..86bff2978 100644..100755
--- a/layouts/community/ergodox/algernon/tools/hid-commands
+++ b/layouts/community/ergodox/algernon/tools/hid-commands
@@ -10,6 +10,10 @@ cmd_wm () {
10 wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz 10 wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
11} 11}
12 12
13cmd_appsel_helper () {
14 rofi -show window
15}
16
13_cmd_appsel () { 17_cmd_appsel () {
14 wmctrl -x -a $1 || true 18 wmctrl -x -a $1 || true
15 xdotool key Escape 19 xdotool key Escape
@@ -17,12 +21,14 @@ _cmd_appsel () {
17 21
18cmd_appsel_music () { 22cmd_appsel_music () {
19 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \ 23 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \
20 wmctrl -x -a banshee || wmctrl -x -a kodi || true 24 wmctrl -x -a banshee || wmctrl -x -a kodi || \
25 wmctrl -x -a plex || true
21 xdotool key Escape 26 xdotool key Escape
22} 27}
23 28
24cmd_appsel_slack () { 29cmd_appsel_slack () {
25 _cmd_appsel slack 30 wmctrl -x -a slack || wmctrl -x -a Mstdn || true
31 xdotool key Escape
26} 32}
27 33
28cmd_appsel_emacs () { 34cmd_appsel_emacs () {
@@ -34,7 +40,8 @@ cmd_appsel_term () {
34} 40}
35 41
36cmd_appsel_chrome () { 42cmd_appsel_chrome () {
37 _cmd_appsel chrom 43 wmctrl -x -a chrom || wmctrl -x -a Chrome || true
44 xdotool key Escape
38} 45}
39 46
40cmd_appsel_start () { 47cmd_appsel_start () {
@@ -51,6 +58,32 @@ cmd_appsel_start () {
51 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png 58 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png
52} 59}
53 60
61cmd_appsel_social () {
62 # Save the current window
63 a=$(xdotool getactivewindow)
64 # Raise & Focus Mstdn & Tweetdeck
65 wmctrl -x -a trunk.mad-scientist.club.Google-chrome || true; wmctrl -x -a tweetdeck || true
66 # Focus the previously active window
67 xdotool windowfocus $a || true; xdotool windowactivate $a || true
68
69 xdotool key Escape
70}
71
72cmd_appsel_social2 () {
73 # Save the current window
74 a=$(xdotool getactivewindow)
75 # Raise & Focus Viber & Signal
76 wmctrl -x -a Viber || true; wmctrl -a Signal || true
77 # Focus the previously active window
78 xdotool windowfocus $a || true; xdotool windowactivate $a || true
79
80 xdotool key Escape
81}
82
83cmd_appsel_pwmgr () {
84 _cmd_appsel keepass
85}
86
54cmd_reflash () { 87cmd_reflash () {
55 teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true 88 teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
56} 89}