summaryrefslogtreecommitdiff
path: root/bin/status.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/status.sh')
-rwxr-xr-xbin/status.sh52
1 files changed, 0 insertions, 52 deletions
diff --git a/bin/status.sh b/bin/status.sh
deleted file mode 100755
index aead5aa..0000000
--- a/bin/status.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-volume() {
- volume=$(pactl get-sink-volume @DEFAULT_SINK@ \
- | awk 'match($0, /\d+%/) { print substr($0, RSTART, RLENGTH-1) }')
- if [ "$volume" -eq 0 ]; then
- volume_symbol=""
- elif [ "$volume" -le 50 ]; then
- volume_symbol=""
- else
- volume_symbol=""
- fi
- echo "<span foreground=\"#ed8796\">$volume_symbol $volume%</span>"
-}
-
-network() {
- ssid=$(iwgetid -r)
- if [ -n "$ssid" ]; then
- symbol="直"
- else
- symbol="睊"
- fi
- echo "<span foreground=\"#f5a97f\">$symbol $ssid</span>"
-}
-
-brightness() {
- echo "<span foreground=\"#eed49f\"> $(brightnessctl -m | awk -F, '{ print $4 }')</span>"
-}
-
-battery() {
- status=$(cat /sys/class/power_supply/BAT0/status)
- capacity=$(cat /sys/class/power_supply/BAT0/capacity)
-
- idx=$(( ($capacity - 1) / 10 ))
- case "$status" in
- "Discharging") symbol=$(echo "<span foreground=\"#ed8796\">󰂃</span>,,,,,,,,," | awk -F, "{ print \$$idx }" ) ;;
- "Charging" ) symbol=$(echo "         " | awk "{ print \$$idx }" ) ;;
- "Full" ) symbol="" ;;
- esac
- echo "<span foreground=\"#a6da95\">$symbol $capacity%</span>"
-}
-
-clock() {
- echo "<span foreground=\"#7dc4e4\"> $(date '+%b %d %H:%M')</span>"
-}
-
-while true; do
- somebar -c status "$(volume) | $(network) | $(brightness) | $(battery) | $(clock)" || true
- sleep 0.2
-done