diff options
Diffstat (limited to 'bin/gnome-move-windows')
-rwxr-xr-x | bin/gnome-move-windows | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/bin/gnome-move-windows b/bin/gnome-move-windows new file mode 100755 index 0000000..0b6c0cc --- /dev/null +++ b/bin/gnome-move-windows @@ -0,0 +1,36 @@ +#!/bin/sh +# Move windows according to my workflow. Check bin/gnome-set-config to +# see its key-binding. Needs wmctrl. + +# Move all windows to the primary display. If they're on the secondary +# display, and we try to move them to a workspace, it won't work. +for window_id in $(wmctrl -l | awk '{print $1}'); do + wmctrl -i -r $window_id -e 0,0,0,-1,-1 +done + +# Assign windows to predetermined workplaces +misc=$(wmctrl -l | awk '/isco|eepa/ {print $1}') +main="$(wmctrl -xl | awk '/ emacs/ {print $1}')" +communications="$(wmctrl -l | awk '/ebex|lack|communications|notmuch|elfeed/ {print $1}')" +terminals="$(wmctrl -l | awk '/Alacritty|kitty|terminal/ {print $1}')" +browsers="$(wmctrl -xl | awk '/irefox|hrom/ {print $1}')" + +for window_id in $misc; do + wmctrl -i -r $window_id -t 4 +done + +for window_id in $main; do + wmctrl -i -r $window_id -t 0 +done + +for window_id in $browsers; do + wmctrl -i -r $window_id -t 1 +done + +for window_id in $communications; do + wmctrl -i -r $window_id -t 2 +done + +for window_id in $terminals; do + wmctrl -i -r $window_id -t 3 +done |