mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Move to .d directories for hooks instead of a single file
Easier to manage especially with separate installs
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+2
-2
@@ -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"
|
||||
+1
-1
@@ -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"
|
||||
+1
-1
@@ -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"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user