diff --git a/utility/change_hyprland_mode.sh b/utility/change_hyprland_mode.sh new file mode 100755 index 0000000..3a3518b --- /dev/null +++ b/utility/change_hyprland_mode.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# +# Ferit Yiğit BALABAN, +# change_hyprland_mode.sh, 2024 +# + +path_mode="$HOME/.config/navi/power_mode" +dir_hypr="$HOME/.config/hypr" +path_save="$dir_hypr/hyprland.s.conf" +path_normal="$dir_hypr/hyprland.n.conf" +target="$dir_hypr/hyprland.conf" + +powersave() { + cp "$path_save" "$target" + echo "powersave" > "$path_mode" +} + +performance() { + cp "$path_normal" "$target" + echo "performance" > "$path_mode" +} + +if [ "$1" == "save" ]; then + powersave +elif [ "$1" == "normal" ]; then + performance +else + current=$(cat "$path_mode") + if [ "$current" == "powersave" ]; then + performance + else + powersave + fi +fi +