aboutsummaryrefslogtreecommitdiff
path: root/sxhkd/scripts
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-10-01 20:05:37 +0200
committerSébastien Dailly <sebastien@dailly.me>2023-10-01 20:05:37 +0200
commit05aea491fec4dd9a68ca90150543e03a32bf6985 (patch)
treedb2a710f0b703def82fd59e3cabc94942aa1e522 /sxhkd/scripts
parent18d0291fb3b51797efd67389687b97122d710c89 (diff)
Update the bspwm scripts. Added a theme for rofi
Diffstat (limited to 'sxhkd/scripts')
-rwxr-xr-xsxhkd/scripts/sxhkd/macropad_layer.sh12
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_new.sh7
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_rotate.sh2
3 files changed, 18 insertions, 3 deletions
diff --git a/sxhkd/scripts/sxhkd/macropad_layer.sh b/sxhkd/scripts/sxhkd/macropad_layer.sh
new file mode 100755
index 0000000..4f4659f
--- /dev/null
+++ b/sxhkd/scripts/sxhkd/macropad_layer.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+BIN_PATH=/home/sebastien/Projets/python/serial/
+LAYER_PATH=${BIN_PATH}/layers/
+
+set -u
+set -e
+
+if [ -z ${1+x} ]; then
+ ls ${LAYER_PATH}
+else
+ python3 ${BIN_PATH}/client.py ${BIN_PATH}/config_client.ini --layer ${LAYER_PATH}/$1 > /dev/null
+fi
diff --git a/sxhkd/scripts/sxhkd/rofi_new.sh b/sxhkd/scripts/sxhkd/rofi_new.sh
index 02b37f5..f668268 100755
--- a/sxhkd/scripts/sxhkd/rofi_new.sh
+++ b/sxhkd/scripts/sxhkd/rofi_new.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+set -u
+set -e
+
tmpdir=$(mktemp -d)
on_exit() {
@@ -13,12 +16,12 @@ on_preExit() {
trap on_exit EXIT # EXIT = 0
trap on_preExit HUP INT QUIT TERM STOP PWR # 1 2 3 15 30
-if [ -z $1 ]; then
+if [ -z ${1+x} ]; then
# We are using dash, the process substitution syntax is not allowed
# sort -u <(…) <(…)
# so, we are using pipes for that
mkfifo ${tmpdir}/p1 ${tmpdir}/p2
- echo "Chat\nWeb\nMail\nmusique" > "${tmpdir}/p1" &
+ echo "Chat\nWeb\nMail\nmusique\nDiscord" > "${tmpdir}/p1" &
bspc query --names -D > "${tmpdir}/p2" &
sort -u "${tmpdir}/p1" "${tmpdir}/p2"
else
diff --git a/sxhkd/scripts/sxhkd/rofi_rotate.sh b/sxhkd/scripts/sxhkd/rofi_rotate.sh
index 82ee234..4716d27 100755
--- a/sxhkd/scripts/sxhkd/rofi_rotate.sh
+++ b/sxhkd/scripts/sxhkd/rofi_rotate.sh
@@ -1,8 +1,8 @@
#!/bin/sh
if [ -z $1 ]; then
+ echo "Flip"
echo "Horaire"
echo "Antihoraire"
- echo "Flip"
exit 0
else
case $1 in