diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2019-04-22 11:45:44 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2019-04-22 11:45:44 +0200 |
commit | 4e3bbbc43654f4c4d4e992d9c09bc270572f6032 (patch) | |
tree | 34c35f2046f3406e336a4205bcd3e5bb6aa9a42e /rofi | |
parent | 4c7aaef74b7c1507ae79f7794eeef80f01dd40e9 (diff) |
Update conf
Diffstat (limited to 'rofi')
-rwxr-xr-x | rofi/workspaces.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/rofi/workspaces.sh b/rofi/workspaces.sh index 4bff293..8495f8d 100755 --- a/rofi/workspaces.sh +++ b/rofi/workspaces.sh @@ -7,18 +7,17 @@ if [ -z $1 ]; then done exit 0 else + WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) "" 2>/dev/null) + # Load the workspace i3-msg "workspace $1; append_layout ${WORKSPACES}/${1}.json; workspace back_and_forth" > /dev/null # get the list of windows on the current workspace - WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) "" 2>/dev/null) for window in $WINDOWS; do - HAS_PID=$(xdotool getwindowpid $window 2>&1 | grep "pid" | wc -l) - - #if [ ! $HAS_PID -eq 0 ]; then - # echo "$window does not have a process" - #else + HAS_PID=$(xdotool getwindowpid $window 2>&1 | grep "pid" | wc -l) + + # Unmap the window to make it disapear, then map it again for i3 trigger the swallow xdotool windowunmap $window xdotool windowmap $window - #fi -done + done + i3-msg "workspace $1" > /dev/null exit 1 fi |