diff options
Diffstat (limited to 'sway/toEmacs.sh~')
| -rwxr-xr-x | sway/toEmacs.sh~ | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/toEmacs.sh~ b/sway/toEmacs.sh~ new file mode 100755 index 0000000..30d1dc3 --- /dev/null +++ b/sway/toEmacs.sh~ @@ -0,0 +1,11 @@ +#!/bin/bash + +#get be to emacs and back + +f=$(swaymsg -t get_tree | jq '.. | objects | select(.focused) | .app_id') + +if [ $f = "emacs" ]; then + swaymsg '[con_mark="E"] focus' +else + swaymsg 'mark --add "E", [app_id="emacs"] focus' +fi |
