diff options
| author | tmu <t.man.atl.2012@gmail.com> | 2023-01-01 16:02:16 -0700 |
|---|---|---|
| committer | tmu <t.man.atl.2012@gmail.com> | 2023-01-01 16:02:16 -0700 |
| commit | 4c15bd89f528fcb7f9039511cdebd19d2169cf1e (patch) | |
| tree | cf30712fe8514e246800068a7c2a2ba26bde71dc /sway/toEmacs.sh | |
start
Diffstat (limited to 'sway/toEmacs.sh')
| -rwxr-xr-x | sway/toEmacs.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/toEmacs.sh b/sway/toEmacs.sh new file mode 100755 index 0000000..aacf2c1 --- /dev/null +++ b/sway/toEmacs.sh @@ -0,0 +1,12 @@ +#!/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 |
