diff options
| author | Shubham Saini <shubham6405@gmail.com> | 2020-05-17 11:40:22 +0000 |
|---|---|---|
| committer | Shubham Saini <shubham6405@gmail.com> | 2020-05-17 11:40:22 +0000 |
| commit | 5bc01819f4c9b453e5b66994217aa61260a49201 (patch) | |
| tree | 6fa764cb136fbdc1e91e39b4e60ca1920b9f498d /spectrwm | |
| parent | bbd8414377daeaedce3715517a130f4d1f0e9893 (diff) | |
changes
Diffstat (limited to 'spectrwm')
| -rwxr-xr-x | spectrwm/.config/spectrwm/statusbar | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spectrwm/.config/spectrwm/statusbar b/spectrwm/.config/spectrwm/statusbar new file mode 100755 index 0000000..c90c1df --- /dev/null +++ b/spectrwm/.config/spectrwm/statusbar | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | BOLD='\033[1m' | ||
| 4 | BB='\033[00m' | ||
| 5 | |||
| 6 | vol(){ | ||
| 7 | vol=$(pulsemixer --get-volume | awk '{print $1}') | ||
| 8 | echo -e "+@fg=1;vol+@fg=0; $vol% " | ||
| 9 | } | ||
| 10 | |||
| 11 | bat() { | ||
| 12 | power=$(cat /sys/class/power_supply/BAT0/capacity) | ||
| 13 | echo -e "+@fg=1;bat+@fg=0; $power% " | ||
| 14 | } | ||
| 15 | |||
| 16 | dte() { | ||
| 17 | dte=$(date +"%A, %B %d") | ||
| 18 | echo -e "+@fg=1;date+@fg=0; $dte " | ||
| 19 | } | ||
| 20 | |||
| 21 | tie() { | ||
| 22 | tme=$(date +"%I:%M %p") | ||
| 23 | echo -e "+@fg=1;time+@fg=0; $tme " | ||
| 24 | } | ||
| 25 | |||
| 26 | while :; do | ||
| 27 | echo "$(vol) $(bat) $(tie) $(dte)" | ||
| 28 | sleep 2 | ||
| 29 | done | ||
| 30 | |||
