aboutsummaryrefslogtreecommitdiff
path: root/sxhkd/scripts/sxhkd/show.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sxhkd/scripts/sxhkd/show.sh')
-rwxr-xr-xsxhkd/scripts/sxhkd/show.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/sxhkd/scripts/sxhkd/show.sh b/sxhkd/scripts/sxhkd/show.sh
index 4f83617..b87067c 100755
--- a/sxhkd/scripts/sxhkd/show.sh
+++ b/sxhkd/scripts/sxhkd/show.sh
@@ -1,3 +1,7 @@
#!/bin/sh
-bspc query -D --names | grep -q "$1" || bspc monitor -a "$1"
-bspc desktop -f "$1"
+
+# If the required desktop does not exists, create it
+bspc query --desktops --names | grep --quiet "$1" || bspc monitor --add-desktops "$1"
+
+# Switch to the desired desktop
+bspc desktop --focus "$1"