switch to sway
This commit is contained in:
parent
8b89e664ea
commit
b8b6922e53
7 changed files with 39 additions and 31 deletions
21
sway/scripts/remote.sh
Executable file
21
sway/scripts/remote.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
active_window=$(swaymsg -t get_tree |jq -r '..|try select(.focused == true) |.app_id')
|
||||
|
||||
if [ "$1" = "btn1" ]; then
|
||||
if [ "$active_window" = "anki" ]; then
|
||||
wtype " "
|
||||
elif [ "$active_window" = "foot" ]; then
|
||||
wtype -M ctrl -M shift -k c
|
||||
else
|
||||
wtype -M ctrl -k c
|
||||
fi
|
||||
else
|
||||
if [ "$active_window" = "anki" ]; then
|
||||
wtype "1"
|
||||
elif [ "$active_window" = "foot" ]; then
|
||||
wtype -M ctrl -M shift -k v
|
||||
else
|
||||
wtype -M ctrl -k v
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue