Start a program on a specific workspace

minus 2021-01-10 15:00:32 +00:00
parent 13da43ce1c
commit 6ee45ed345

@ -2,6 +2,12 @@
swaymsg -t get_outputs | jq -r '.[] | select(.focused) | (.current_mode.width | tostring) + "x" + (.current_mode.height | tostring)'
# Start a program on a specific workspace
swaymsg 'workspace test; exec gnome-calculator; workspace back_and_forth'
This works as long as sway can match the PID of a new window to the PID of the exec'd command (or one of its children).
# Upload screenshot and copy url to clipboard
bindsym $mod+Shift+Print exec slurp | grim -g - - | curl --form 'file=@-' http://0x0.st | wl-copy && swaynag -m "screenshot uploaded & url copied to clipboard"