mirror of
https://github.com/duma799/hyprduma-config.git
synced 2026-05-14 06:31:00 +00:00
Waybar is visible only on my main Monitor(tune for your setup), added power profiles script + icon, removed battery percentage.
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
get_profile() {
|
||||
profile=$(powerprofilesctl get)
|
||||
case $profile in
|
||||
"performance")
|
||||
icon=""
|
||||
;;
|
||||
"balanced")
|
||||
icon=""
|
||||
;;
|
||||
"power-saver")
|
||||
icon=""
|
||||
;;
|
||||
esac
|
||||
echo "{\"text\":\"$icon\",\"tooltip\":\"Power Profile: $profile\",\"class\":\"$profile\"}"
|
||||
}
|
||||
|
||||
cycle_profile() {
|
||||
current=$(powerprofilesctl get)
|
||||
case $current in
|
||||
"performance")
|
||||
powerprofilesctl set balanced
|
||||
;;
|
||||
"balanced")
|
||||
powerprofilesctl set power-saver
|
||||
;;
|
||||
"power-saver")
|
||||
powerprofilesctl set performance
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case $1 in
|
||||
"--cycle")
|
||||
cycle_profile
|
||||
;;
|
||||
*)
|
||||
get_profile
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user