From aa18d3f888d6fb4d598c22fcf825a78e5540c1e7 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 1 Sep 2019 22:12:27 +0200 Subject: Update i3 config --- rofi/workspaces.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rofi') diff --git a/rofi/workspaces.sh b/rofi/workspaces.sh index 8495f8d..2dc3a6a 100755 --- a/rofi/workspaces.sh +++ b/rofi/workspaces.sh @@ -8,8 +8,9 @@ if [ -z $1 ]; then exit 0 else WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) "" 2>/dev/null) + code=$(echo $1 | cut -d: -f1) # Load the workspace - i3-msg "workspace $1; append_layout ${WORKSPACES}/${1}.json; workspace back_and_forth" > /dev/null + i3-msg "workspace ${code}:; append_layout ${WORKSPACES}/${1}.json; workspace back_and_forth" > /dev/null # get the list of windows on the current workspace for window in $WINDOWS; do HAS_PID=$(xdotool getwindowpid $window 2>&1 | grep "pid" | wc -l) @@ -18,6 +19,6 @@ else xdotool windowunmap $window xdotool windowmap $window done - i3-msg "workspace $1" > /dev/null + i3-msg "workspace ${code}:" > /dev/null exit 1 fi -- cgit v1.2.3