From 4e3bbbc43654f4c4d4e992d9c09bc270572f6032 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 22 Apr 2019 11:45:44 +0200 Subject: Update conf --- rofi/workspaces.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'rofi/workspaces.sh') 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 -- cgit v1.2.3