summaryrefslogtreecommitdiffstats
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 () {
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
}
+cmd_appsel_helper () {
+ rofi -show window
+}
+
_cmd_appsel () {
wmctrl -x -a $1 || true
xdotool key Escape
@@ -17,12 +21,14 @@ _cmd_appsel () {
cmd_appsel_music () {
wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \
- wmctrl -x -a banshee || wmctrl -x -a kodi || true
+ wmctrl -x -a banshee || wmctrl -x -a kodi || \
+ wmctrl -x -a plex || true
xdotool key Escape
}
cmd_appsel_slack () {
- _cmd_appsel slack
+ wmctrl -x -a slack || wmctrl -x -a Mstdn || true
+ xdotool key Escape
}
cmd_appsel_emacs () {
@@ -34,7 +40,8 @@ cmd_appsel_term () {
}
cmd_appsel_chrome () {
- _cmd_appsel chrom
+ wmctrl -x -a chrom || wmctrl -x -a Chrome || true
+ xdotool key Escape
}
cmd_appsel_start () {
@@ -51,6 +58,32 @@ cmd_appsel_start () {
-i /usr/share/icons/Adwaita/24x24/devices/video-display.png
}
+cmd_appsel_social () {
+ # Save the current window
+ a=$(xdotool getactivewindow)
+ # Raise & Focus Mstdn & Tweetdeck
+ wmctrl -x -a trunk.mad-scientist.club.Google-chrome || true; wmctrl -x -a tweetdeck || true
+ # Focus the previously active window
+ xdotool windowfocus $a || true; xdotool windowactivate $a || true
+
+ xdotool key Escape
+}
+
+cmd_appsel_social2 () {
+ # Save the current window
+ a=$(xdotool getactivewindow)
+ # Raise & Focus Viber & Signal
+ wmctrl -x -a Viber || true; wmctrl -a Signal || true
+ # Focus the previously active window
+ xdotool windowfocus $a || true; xdotool windowactivate $a || true
+
+ xdotool key Escape
+}
+
+cmd_appsel_pwmgr () {
+ _cmd_appsel keepass
+}
+
cmd_reflash () {
teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
}