7 WIN="$(xdotool getactivewindow)"
8 wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
9 xdotool windowsize ${WIN} 100% 100%
10 wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
13 cmd_appsel_helper () {
18 wmctrl -x -a $1 || true
23 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \
24 wmctrl -x -a banshee || wmctrl -x -a kodi || \
25 wmctrl -x -a plex || true
30 wmctrl -x -a slack || wmctrl -x -a Mstdn || true
39 _cmd_appsel gnome-terminal
42 cmd_appsel_chrome () {
43 wmctrl -x -a chrom || wmctrl -x -a Chrome || true
48 if [ ! -z "${DISABLE_APPSEL_START}" ]; then
52 APPSEL_START=$(date +%s)
53 if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
56 LAST_APPSEL_START=$APPSEL_START
57 notify-send -t 1000 "Please select an application!" -c device -u low \
58 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png
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
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
88 teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
106 cmd="$(echo $l | cut -d: -f2-)"
108 echo "Got command: ${cmd}"
110 if type cmd_${cmd} >/dev/null 2>&1; then