diff options
Diffstat (limited to 'sxhkd/scripts')
-rwxr-xr-x | sxhkd/scripts/sxhkd/macropad_layer.sh | 12 | ||||
-rwxr-xr-x | sxhkd/scripts/sxhkd/rofi_new.sh | 7 | ||||
-rwxr-xr-x | sxhkd/scripts/sxhkd/rofi_rotate.sh | 2 |
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 |