aboutsummaryrefslogtreecommitdiff
path: root/rofi/workspaces.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rofi/workspaces.sh')
-rwxr-xr-xrofi/workspaces.sh5
1 files changed, 3 insertions, 2 deletions
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