diff --git a/bin/omarchy-hook b/bin/omarchy-hook index db647881..c6c6f87f 100755 --- a/bin/omarchy-hook +++ b/bin/omarchy-hook @@ -22,6 +22,7 @@ fi if [[ -d $HOOK_DIR ]]; then for hook in "$HOOK_DIR"/*; do [[ -f $hook ]] || continue + [[ $hook == *.sample ]] && continue bash "$hook" "$@" done fi diff --git a/config/omarchy/hooks/battery-low.sample b/config/omarchy/hooks/battery-low.d/play-warning-sound.sample similarity index 95% rename from config/omarchy/hooks/battery-low.sample rename to config/omarchy/hooks/battery-low.d/play-warning-sound.sample index dc3726a9..61da3320 100644 --- a/config/omarchy/hooks/battery-low.sample +++ b/config/omarchy/hooks/battery-low.d/play-warning-sound.sample @@ -1,7 +1,7 @@ #!/bin/bash # This hook is called with the current battery percentage when the low battery -# notification is sent. To put it into use, remove .sample from the name. +# notification is sent. To put it into use, remove .sample from this file name. SOUND_FILE="/usr/share/sounds/freedesktop/stereo/dialog-warning.oga" diff --git a/config/omarchy/hooks/font-set.sample b/config/omarchy/hooks/font-set.d/show-font-notification.sample similarity index 57% rename from config/omarchy/hooks/font-set.sample rename to config/omarchy/hooks/font-set.d/show-font-notification.sample index 3f0109a9..a75f2fa8 100644 --- a/config/omarchy/hooks/font-set.sample +++ b/config/omarchy/hooks/font-set.d/show-font-notification.sample @@ -1,7 +1,7 @@ #!/bin/bash # This hook is called with the snake-cased name of the font that has just been set. -# To put it into use, remove .sample from the name. +# To put it into use, remove .sample from this file name. -# Example: Show the name of the theme that was just set. +# Example: Show the name of the font that was just set. # notify-send -u low "New font" "Your new font is $1" diff --git a/config/omarchy/hooks/post-update.sample b/config/omarchy/hooks/post-update.d/show-update-notification.sample similarity index 79% rename from config/omarchy/hooks/post-update.sample rename to config/omarchy/hooks/post-update.d/show-update-notification.sample index f740d5bb..f6ba07b0 100644 --- a/config/omarchy/hooks/post-update.sample +++ b/config/omarchy/hooks/post-update.d/show-update-notification.sample @@ -1,7 +1,7 @@ #!/bin/bash # This hook is called after an Omarchy system update has been performed. -# To put it into use, remove .sample from the name. +# To put it into use, remove .sample from this file name. # Example: Show notification after the system has been updated. # notify-send -u low "Update Performed" "Your system is now up to date" diff --git a/config/omarchy/hooks/theme-set.sample b/config/omarchy/hooks/theme-set.d/show-theme-notification.sample similarity index 78% rename from config/omarchy/hooks/theme-set.sample rename to config/omarchy/hooks/theme-set.d/show-theme-notification.sample index 2d13287f..db19b298 100644 --- a/config/omarchy/hooks/theme-set.sample +++ b/config/omarchy/hooks/theme-set.d/show-theme-notification.sample @@ -1,7 +1,7 @@ #!/bin/bash # This hook is called with the snake-cased name of the theme that has just been set. -# To put it into use, remove .sample from the name. +# To put it into use, remove .sample from this file name. # Example: Show the name of the theme that was just set. # notify-send -u low "New theme" "Your new theme is $1" diff --git a/migrations/1772990935.sh b/migrations/1772990935.sh index 2f3526c2..2b58912d 100644 --- a/migrations/1772990935.sh +++ b/migrations/1772990935.sh @@ -1,7 +1,7 @@ echo "Add sample low battery notification hook" -mkdir -p ~/.config/omarchy/hooks +mkdir -p ~/.config/omarchy/hooks/battery-low.d -if [[ ! -f ~/.config/omarchy/hooks/battery-low.sample ]]; then - cp "$OMARCHY_PATH/config/omarchy/hooks/battery-low.sample" ~/.config/omarchy/hooks/battery-low.sample +if [[ ! -f ~/.config/omarchy/hooks/battery-low.d/play-warning-sound.sample ]]; then + cp "$OMARCHY_PATH/config/omarchy/hooks/battery-low.d/play-warning-sound.sample" ~/.config/omarchy/hooks/battery-low.d/play-warning-sound.sample fi