summarylogtreecommitdiffstats
path: root/dark-theme.sh
diff options
context:
space:
mode:
authormynacol2022-05-17 11:22:22 +0200
committermynacol2022-05-17 11:22:22 +0200
commita96efd0a04ba76ea38fefc1970ff3599d48a5141 (patch)
treecb3dc855bfb350fbf4af10fcb6198d11853435fa /dark-theme.sh
parent1389ce49224a0ee0fadff2edae604af78204ef38 (diff)
downloadaur-a96efd0a04ba76ea38fefc1970ff3599d48a5141.tar.gz
Check if hooks are executable before executing them
Diffstat (limited to 'dark-theme.sh')
-rwxr-xr-xdark-theme.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/dark-theme.sh b/dark-theme.sh
index 76d0d731127a..92bf957d9634 100755
--- a/dark-theme.sh
+++ b/dark-theme.sh
@@ -8,12 +8,16 @@ CURRENT=$(gsettings get org.gnome.desktop.interface gtk-theme)
case $1 in
dark | night)
for f in "$HOME/.local/share/dark-mode.d/"*; do
- "$f" &
+ if [ -x "$f" ]; then
+ "$f" &
+ fi
done
;;
light | day | daytime)
for f in "$HOME/.local/share/light-mode.d/"*; do
- "$f" &
+ if [ -x "$f" ]; then
+ "$f" &
+ fi
done
;;
toggle | transition)