aboutsummaryrefslogtreecommitdiff
path: root/sxhkd
diff options
context:
space:
mode:
Diffstat (limited to 'sxhkd')
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_new.sh4
-rwxr-xr-xsxhkd/scripts/sxhkd/show.sh8
2 files changed, 9 insertions, 3 deletions
diff --git a/sxhkd/scripts/sxhkd/rofi_new.sh b/sxhkd/scripts/sxhkd/rofi_new.sh
index 47a0ae7..b1e19d8 100755
--- a/sxhkd/scripts/sxhkd/rofi_new.sh
+++ b/sxhkd/scripts/sxhkd/rofi_new.sh
@@ -2,6 +2,8 @@
if [ -z $1 ]; then
cat <(echo -e "Chat\nWeb\nMail\nMusique") <(bspc query --names -D) | sort -u
else
- ~/scripts/sxhkd/show.sh $1
+ for desktop in $(echo $1 | tr "," "\n"); do
+ ~/scripts/sxhkd/show.sh $desktop
+ done
fi
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"