diff options
Diffstat (limited to 'layouts/community/ergodox/algernon/tools/hid-commands')
| -rwxr-xr-x[-rw-r--r--] | layouts/community/ergodox/algernon/tools/hid-commands | 39 |
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 | ||
| 13 | cmd_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 | ||
| 18 | cmd_appsel_music () { | 22 | cmd_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 | ||
| 24 | cmd_appsel_slack () { | 29 | cmd_appsel_slack () { |
| 25 | _cmd_appsel slack | 30 | wmctrl -x -a slack || wmctrl -x -a Mstdn || true |
| 31 | xdotool key Escape | ||
| 26 | } | 32 | } |
| 27 | 33 | ||
| 28 | cmd_appsel_emacs () { | 34 | cmd_appsel_emacs () { |
| @@ -34,7 +40,8 @@ cmd_appsel_term () { | |||
| 34 | } | 40 | } |
| 35 | 41 | ||
| 36 | cmd_appsel_chrome () { | 42 | cmd_appsel_chrome () { |
| 37 | _cmd_appsel chrom | 43 | wmctrl -x -a chrom || wmctrl -x -a Chrome || true |
| 44 | xdotool key Escape | ||
| 38 | } | 45 | } |
| 39 | 46 | ||
| 40 | cmd_appsel_start () { | 47 | cmd_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 | ||
| 61 | cmd_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 | |||
| 72 | cmd_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 | |||
| 83 | cmd_appsel_pwmgr () { | ||
| 84 | _cmd_appsel keepass | ||
| 85 | } | ||
| 86 | |||
| 54 | cmd_reflash () { | 87 | cmd_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 | } |
