remove power profile script
This commit is contained in:
parent
bf3152a3da
commit
68bc7f8c78
3 changed files with 2 additions and 51 deletions
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 ]}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in a new issue