Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Ability implement hook like gammastep #7

Open
ansdim1 opened this issue Nov 14, 2024 · 0 comments
Open

[Feature] Ability implement hook like gammastep #7

ansdim1 opened this issue Nov 14, 2024 · 0 comments

Comments

@ansdim1
Copy link

ansdim1 commented Nov 14, 2024

Would it be possible for hyprsunset to have the ability implement hook like gammastep?

HOOKS
Executables (e.g. scripts) placed in folder ~/.config/gammastep/hooks will be run when a certain event happens. The first parameter to the
script indicates the event and further parameters may indicate more details about the event. The event period-changed is indicated when the
period changes (night, daytime, transition). The second parameter is the old period and the third is the new period. The event is also sig‐
naled at startup with the old period set to none. Any dotfiles in the folder are skipped.

   A simple script to handle these events can be written like this:

#!/bin/sh
case $1 in
period-changed)
#echo $3 >> /tmp/gammastep.txt
case $3 in
night)
brightnessctl set 45% #70%
sed -i 's/Mariana/Monokai/' .config/sublime-text/Packages/User/Preferences.sublime-settings
sed -i 's/simple/sand/' .config/qt5ct/qt5ct.conf
#sed -i 's/"system_dark_mode_enabled":false/"system_dark_mode_enabled":true/' .config/yandex-browser/Default/Preferences
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
sed -i 's/opacity = 0.8/opacity = 0.93/' ~/.config/alacritty/alacritty.toml
#sed -i 's/100%/70%/' ~/.config/hypr/hypridle.conf
sed -i 's/Light/Dark/' ~/.config/alacritty/alacritty.toml
sed -i 's/theme=0/theme=1/' /.config/gtk-3.0/settings.ini
#systemctl --user restart hypridle.service
hyprctl hyprpaper wallpaper "LVDS-1,
/.config/hypr/wallpaper/1.png"
#notify-send "Gammastep" "Period changed to $3. Brightness set 70%";;
notify-send -a gammastep -i /usr/share/swcatalog/icons/archlinux-arch-extra/48x48/snapshot_org.gnome.Snapshot.png "Period changed to $3. Brightness set 70%";;
daytime)
brightnessctl set 70% #100%
sed -i 's/Monokai/Mariana/' .config/sublime-text/Packages/User/Preferences.sublime-settings
sed -i 's/sand/simple/' .config/qt5ct/qt5ct.conf
sed -i 's/opacity = 0.93/opacity = 0.8/' ~/.config/alacritty/alacritty.toml
#sed -i 's/70%/100%/' ~/.config/hypr/hypridle.conf
sed -i 's/Dark/Light/' ~/.config/alacritty/alacritty.toml
sed -i 's/theme=1/theme=0/' /.config/gtk-3.0/settings.ini
#sed -i 's/"system_dark_mode_enabled":true/"system_dark_mode_enabled":false/' .config/yandex-browser/Default/Preferences
gsettings set org.gnome.desktop.interface color-scheme 'default' #'prefer-dark' 'prefer-light'
#systemctl --user restart hypridle.service
hyprctl hyprpaper wallpaper "LVDS-1,
/.config/hypr/wallpaper/2.png"
notify-send -a gammastep -i /usr/share/swcatalog/icons/archlinux-arch-extra/48x48/sysprof_org.gnome.Sysprof.png "Period changed to $3. Brightness set 100%";;
transition)
notify-send -a gammastep -i /usr/share/swcatalog/icons/archlinux-arch-extra/128x128/warpinator_org.x.Warpinator.png "Period changed to $3.";;
esac;;
*) notify-send -a gammastep -t 120000 "Var1 $1, Var2 $2, Var3 $3.";;
esac

@ansdim1 ansdim1 changed the title Ability implement hook like gammastep [Feature] Ability implement hook like gammastep Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant