From 6ee45ed34538c2f02e88ba5eb7b9e10ce1192173 Mon Sep 17 00:00:00 2001 From: minus Date: Sun, 10 Jan 2021 15:00:32 +0000 Subject: [PATCH] Start a program on a specific workspace --- Tricks.md | 6 ++++++ 1 file changed, 6 insertions(+) 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"