diff --git a/Tricks.md b/Tricks.md index 89492fd..ab77464 100644 --- a/Tricks.md +++ b/Tricks.md @@ -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"