diff --git a/home/wm/addon/waybar/default.nix b/home/wm/addon/waybar/default.nix index 005fe5b..3b3f6d0 100644 --- a/home/wm/addon/waybar/default.nix +++ b/home/wm/addon/waybar/default.nix @@ -13,7 +13,7 @@ height = 28; modules-left = [ "sway/workspaces" "wlr/workspaces" "sway/window" "hyprland/window" "sway/mode" "hyprland/submap" ]; modules-center = [ ]; - modules-right = [ "tray" "custom/power_profile" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock" ]; + modules-right = [ "tray" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock" ]; "sway/mode" = { "format" = "{}"; }; @@ -89,17 +89,6 @@ "tray" = { "spacing" = 4; }; - "custom/power_profile" = - let - script = "${config.xdg.configHome}/scripts/power_profile.sh"; - in - { - exec = "${script} icon"; - on-click = "${script} toggle"; - format = "{}"; - tooltip = false; - interval = "10"; - }; }; }; } diff --git a/packages/scripts/default.nix b/packages/scripts/default.nix index 12a9b86..fd48559 100644 --- a/packages/scripts/default.nix +++ b/packages/scripts/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, makeWrapper, libnotify, rofi-wayland, power-profiles-daemon }: +{ lib, stdenvNoCC, makeWrapper, libnotify, rofi-wayland }: stdenvNoCC.mkDerivation { pname = "scripts"; @@ -13,9 +13,5 @@ stdenvNoCC.mkDerivation { cp power-menu.sh $out/bin/power-menu chmod +x $out/bin/power-menu wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [ libnotify rofi-wayland ]} - - cp power-profiles.sh $out/bin/power-profiles - chmod +x $out/bin/power-profiles - wrapProgram $out/bin/power-profiles --prefix PATH : ${lib.makeBinPath [ libnotify power-profiles-daemon ]} ''; } diff --git a/packages/scripts/power-profiles.sh b/packages/scripts/power-profiles.sh deleted file mode 100644 index fc64861..0000000 --- a/packages/scripts/power-profiles.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -eu - -POWER_PROFILE_FILE="$HOME/.cache/power_profile" -POWER_PROFILE="powersave" - -if [ -f "$POWER_PROFILE_FILE" ]; then - POWER_PROFILE="$(<$POWER_PROFILE_FILE)" -fi - -case "$1" in - "toggle") - if [ "$POWER_PROFILE" == "powersave" ]; then - powerprofilesctl set performance - POWER_PROFILE="performance" - elif [ "$POWER_PROFILE" == "performance" ]; then - powerprofilesctl set power-saver - POWER_PROFILE="powersave" - fi - echo $POWER_PROFILE > $POWER_PROFILE_FILE - notify-send -u normal "Power Profile" "Switched to $POWER_PROFILE mode." - ;; - "icon") - if [ "$POWER_PROFILE" == "powersave" ]; then - echo "󰌪" - elif [ "$POWER_PROFILE" == "performance" ]; then - echo "󰓅" - fi - ;; - *) - ;; -esac -