diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 3ae15d2..8bffe08 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -212,7 +212,7 @@ bar { # When the status_command prints a new line to stdout, swaybar updates. # The default just shows the current date and time. - status_command while date +'%Y-%m-%d %X'; do sleep 1; done + status_command while ~/.config/sway/status.sh; do sleep 1; done colors { statusline #ffffff diff --git a/sway/.config/sway/status.sh b/sway/.config/sway/status.sh new file mode 100755 index 0000000..4ad1796 --- /dev/null +++ b/sway/.config/sway/status.sh @@ -0,0 +1,5 @@ +date_formatted=$(date "+%a %F %H:%M") + +battery_status=$(cat /sys/class/power_supply/BAT1/capacity) + +echo $battery_status'% -' $date_formatted