aboutsummaryrefslogtreecommitdiff
path: root/sxhkd/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sxhkd/scripts')
-rwxr-xr-xsxhkd/scripts/sxhkd/move.sh4
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_new.sh7
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_rename.sh9
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_resize.sh18
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_rotate.sh21
-rwxr-xr-xsxhkd/scripts/sxhkd/show.sh3
6 files changed, 62 insertions, 0 deletions
diff --git a/sxhkd/scripts/sxhkd/move.sh b/sxhkd/scripts/sxhkd/move.sh
new file mode 100755
index 0000000..2f0d5f1
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/move.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+bspc query -D $1 || bspc monitor -a $1
+bspc node --to-desktop $1
+
diff --git a/sxhkd/scripts/sxhkd/rofi_new.sh b/sxhkd/scripts/sxhkd/rofi_new.sh
new file mode 100755
index 0000000..4e28454
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/rofi_new.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [ -z $1 ]; then
+ cat <(echo -e "Web\nMail\nMusique") <(bspc query --names -D) | sort -u
+else
+ ~/scripts/sxhkd/show.sh $1
+fi
+
diff --git a/sxhkd/scripts/sxhkd/rofi_rename.sh b/sxhkd/scripts/sxhkd/rofi_rename.sh
new file mode 100755
index 0000000..d2bb04d
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/rofi_rename.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+if [ -z $1 ]; then
+ echo "Edit"
+ echo "Musique"
+ exit 0
+else
+ bspc desktop -n ${1}
+ exit 1
+fi
diff --git a/sxhkd/scripts/sxhkd/rofi_resize.sh b/sxhkd/scripts/sxhkd/rofi_resize.sh
new file mode 100755
index 0000000..dfb9679
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/rofi_resize.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+if [ -z $1 ]; then
+ echo "10"
+ echo "20"
+ echo "30"
+ echo "40"
+ echo "50"
+ echo "52"
+ echo "60"
+ echo "70"
+ echo "80"
+ echo "90"
+ exit 0
+else
+ bspc node @parent --ratio .${1}
+ exit 1
+fi
+
diff --git a/sxhkd/scripts/sxhkd/rofi_rotate.sh b/sxhkd/scripts/sxhkd/rofi_rotate.sh
new file mode 100755
index 0000000..6438f2a
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/rofi_rotate.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+if [ -z $1 ]; then
+ echo "Horaire"
+ echo "Antihoraire"
+ echo "Flip"
+ exit 0
+else
+ case $1 in
+ Horaire)
+ bspc node @parent --rotate 90
+ ;;
+ Antihoraire)
+ bspc node @parent --rotate 270
+ ;;
+ Flip)
+ bspc node @parent --rotate 180
+ ;;
+ esac
+ exit 1
+fi
+
diff --git a/sxhkd/scripts/sxhkd/show.sh b/sxhkd/scripts/sxhkd/show.sh
new file mode 100755
index 0000000..4f83617
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/show.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+bspc query -D --names | grep -q "$1" || bspc monitor -a "$1"
+bspc desktop -f "$1"