aboutsummaryrefslogtreecommitdiff
path: root/sxhkd/scripts/sxhkd/rofi_new.sh
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/sxhkd/rofi_new.sh
parent18d0291fb3b51797efd67389687b97122d710c89 (diff)
Update the bspwm scripts. Added a theme for rofi
Diffstat (limited to 'sxhkd/scripts/sxhkd/rofi_new.sh')
-rwxr-xr-xsxhkd/scripts/sxhkd/rofi_new.sh7
1 files changed, 5 insertions, 2 deletions
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