diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 08:25:41 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 08:25:41 +0200 |
| commit | dc98cba24cb5f1f3e260c49fc61add4a113a1df0 (patch) | |
| tree | 2f5b996f57a2e332884849e7d29fdadf5c698382 /status | |
| parent | af05c6c366ce928818848a3d8c897e7c52ae9d0f (diff) | |
| download | scripts-dc98cba24cb5f1f3e260c49fc61add4a113a1df0.tar.gz scripts-dc98cba24cb5f1f3e260c49fc61add4a113a1df0.zip | |
Update to status (now I use a statusbar)
Diffstat (limited to 'status')
| -rwxr-xr-x | status | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -10,9 +10,15 @@ | |||
| 10 | 10 | ||
| 11 | sep=${1:-" | "} | 11 | sep=${1:-" | "} |
| 12 | 12 | ||
| 13 | time=$(date +"%H:%M:%S") | 13 | time=$(date +"%H:%M") |
| 14 | date=$(date +"%d %B %Y, %A") | 14 | date=$(date +"%d %B %Y, %A") |
| 15 | 15 | ||
| 16 | if [ "$(pulsemixer --get-mute)" -eq 1 ]; then | ||
| 17 | volume="Audio muted" | ||
| 18 | else | ||
| 19 | volume="Volume: $(pulsemixer --get-volume | awk '{print $1}')%%" | ||
| 20 | fi | ||
| 21 | |||
| 16 | bat="/sys/class/power_supply/BAT0" | 22 | bat="/sys/class/power_supply/BAT0" |
| 17 | if [ -d $bat ]; then | 23 | if [ -d $bat ]; then |
| 18 | battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)" | 24 | battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)" |
| @@ -28,6 +34,6 @@ network="Network: $(nmcli device status | head -n 2 | tail -n 1 | sed 's/ *$//' | |||
| 28 | 34 | ||
| 29 | events=$(sdep-list past | wc -l) | 35 | events=$(sdep-list past | wc -l) |
| 30 | 36 | ||
| 31 | printf "$time$sep$date$sep$battery$sep$network" | 37 | printf "$network$sep$volume$sep$battery$sep$date$sep$time" |
| 32 | [ "$events" != "0" ] && printf "$sep$events TODO task(s)" | 38 | [ "$events" != "0" ] && printf "$sep$events TODO task(s)" |
| 33 | printf "\n" | 39 | printf "\n" |
