This script opens Chrome and moves it to workspace 1, System Monitor and moves it to workspace 2, and Update manager and moves it workspace 3. It uses the Window Title to identify the correct window. I saved the script in ~/bin and made it executable. For this example I've then made a desktop launcher pointing to the script. One click and all three apps are open and in their respective workspaces.
Code: Select all
#!/bin/bash #Description: A script to set up applications is specific workspaces cd #open chrome /usr/bin/google-chrome-stable %U #wait until the chrome window opens until wmctrl -l | grep -q "New Tab"; do sleep 0.1 done #move chrome from workspace 0 to workspace 1 wmctrl -r "New Tab - Google Chrome" -t 1 #open system monitor gnome-system-monitor #wait until the system monitor window opens until wmctrl -l | grep -q "System Monitor"; do sleep 0.1 done #move system monitor from workspace 0 to workspace 2 wmctrl -r "System Monitor" -t 2 #open mintupdate mintupdate #wait until the mintupdate window opens until wmctrl -l | grep -q "Update Manager"; do sleep 0.1 done #move mintupdate from workspace 0 to workspace 3 wmctrl -r "Update Manager" -t 3