configuration form the arch linux stored
This commit is contained in:
16
polybar/scripts/toggle_module_batter_label.sh
Executable file
16
polybar/scripts/toggle_module_batter_label.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
TOGGLE_FILE=~/.config/polybar/scripts/battery_toggle_state
|
||||
|
||||
# Read the current state
|
||||
CURRENT_STATE=$(cat $TOGGLE_FILE)
|
||||
|
||||
# Toggle the state
|
||||
if [ "$CURRENT_STATE" == "icon" ]; then
|
||||
echo "percentage" > $TOGGLE_FILE
|
||||
else
|
||||
echo "icon" > $TOGGLE_FILE
|
||||
fi
|
||||
|
||||
# Notify Polybar to refresh the module
|
||||
polybar-msg hook battery 1
|
||||
Reference in New Issue
Block a user