From 05aea491fec4dd9a68ca90150543e03a32bf6985 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 1 Oct 2023 20:05:37 +0200 Subject: Update the bspwm scripts. Added a theme for rofi --- sxhkd/scripts/sxhkd/macropad_layer.sh | 12 ++++++++++++ sxhkd/scripts/sxhkd/rofi_new.sh | 7 +++++-- sxhkd/scripts/sxhkd/rofi_rotate.sh | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 sxhkd/scripts/sxhkd/macropad_layer.sh (limited to 'sxhkd/scripts') 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 -- cgit v1.2.3