diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-03-12 21:56:50 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-03-12 21:56:50 +0530 |
| commit | 1127041cda7ff8aaadd5321a27d404a00db2088d (patch) | |
| tree | b241609ece7d9a44c20d2f6436ec494853666e2c /dist/bar.sh | |
| parent | dcfadeeb179db143390e937d3737f8170afe4d3d (diff) | |
Revert "dwm"
This reverts commit 55542f1ce3f313419ebe6a7fa9a7629898e6ce2e.
Diffstat (limited to 'dist/bar.sh')
| -rwxr-xr-x | dist/bar.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dist/bar.sh b/dist/bar.sh new file mode 100755 index 0000000..2b23972 --- /dev/null +++ b/dist/bar.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +wifi() { + iwgetid -r +} + +battery() { + c=$(cat /sys/class/power_supply/BAT1/capacity) + + if [[ $c > 85 ]]; then + echo " $c" + elif [[ $c > 70 ]]; then + echo " $c" + elif [[ $c > 50 ]]; then + echo " $c" + elif [[ $c > 30 ]]; then + echo " $c" + else + echo " $c" + fi +} + +charging() { + if [[ "$(cat /sys/class/power_supply/BAT1/status)" == "Charging" ]]; then + echo "+" + fi +} + +calendar() { + date +'%a, %d %b %Y | %H:%M' +} + +volume() { + pamixer --get-volume +} + +while [[ true ]]; do + dwlb -status all "| ^lm(alacritty -e nmtui-connect) $(wifi)^lm() | $(volume)% | $(battery)%$(charging) | $(calendar) | λ" + sleep 1 +done |
