.dotfiles/.config/waybar/scripts/power-profile

26 lines
477 B
Plaintext
Raw Normal View History

2022-05-13 19:19:05 +02:00
#!/bin/bash
CURRENT=$(powerprofilesctl get)
LOW="🐢"
BALANCED="☯️"
2022-07-26 19:55:09 +02:00
HIGH="🐇"
2022-05-13 19:19:05 +02:00
if [ "$CURRENT" = 'power-saver' ]; then
if [ "$1" = "--toggle" ]; then
powerprofilesctl set balanced
fi
echo $LOW
elif [ "$CURRENT" = 'balanced' ]; then
if [ "$1" = "--toggle" ]; then
powerprofilesctl set performance
fi
echo $BALANCED
elif [ "$CURRENT" = 'performance' ]; then
if [ "$1" = "--toggle" ]; then
powerprofilesctl set power-saver
fi
echo $HIGH
fi