Compare commits

...

2 commits

Author SHA1 Message Date
Emmet 5855e5a94b Fixes reboot from waybar menu 2024-07-31 18:44:05 -05:00
Emmet c4a3edc828 fixed hyprprofiles exit hooks not being called 2024-07-31 18:43:50 -05:00
2 changed files with 4 additions and 4 deletions

View file

@ -810,7 +810,7 @@ in
"custom/reboot" = {
"format" = "󰜉";
"tooltip" = false;
"on-click" = "reboot now";
"on-click" = "reboot";
};
"custom/power" = {
"format" = "󰐥";

View file

@ -11,7 +11,7 @@ in
(pkgs.writeScriptBin "hyprprofile" ''
#!/bin/sh
prevprofile="$(cat ~/.hyprprofile)"
newprofile=$1
newprofile="$1"
if [ $# -eq 1 ]; then
if [ $newprofile = "Default" ]; then
echo "" > ~/.hyprprofile;
@ -19,10 +19,10 @@ in
echo $newprofile > ~/.hyprprofile;
fi
if [ -f ~/.config/hyprprofiles/$prevprofile/exit-hook.sh ]; then
exec ~/.config/hyprprofiles/$prevprofile/exit-hook.sh;
~/.config/hyprprofiles/$prevprofile/exit-hook.sh;
fi
if [ -f ~/.config/hyprprofiles/$newprofile/start-hook.sh ]; then
exec ~/.config/hyprprofiles/$newprofile/start-hook.sh;
~/.config/hyprprofiles/$newprofile/start-hook.sh;
fi
fi
'')