diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2021-06-03 21:33:31 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2021-06-03 21:33:31 +0000 |
| commit | 6e4a15d79352ca2707a3b0d81d158228a7d14704 (patch) | |
| tree | a526da4169c76175f1e528534d67772bc13dfabb | |
| parent | a38dc1a774d012b2da71716365d1d254b650dd48 (diff) | |
Add/move statusbar scripts
| -rwxr-xr-x | .local/bin/statusbar/batinfo (renamed from .scripts/batinfo) | 0 | ||||
| -rwxr-xr-x | .local/bin/statusbar/checkupdates (renamed from .scripts/checkupdates) | 0 | ||||
| -rwxr-xr-x | .local/bin/statusbar/cpuinfo (renamed from .scripts/cpuinfo) | 0 | ||||
| -rwxr-xr-x | .local/bin/statusbar/meminfo (renamed from .scripts/meminfo) | 0 | ||||
| -rwxr-xr-x | .local/bin/statusbar/netinfo (renamed from .scripts/netinfo) | 12 | ||||
| -rwxr-xr-x | .local/bin/statusbar/timeinfo | 15 | ||||
| -rwxr-xr-x | .local/bin/statusbar/volinfo | 13 |
7 files changed, 34 insertions, 6 deletions
diff --git a/.scripts/batinfo b/.local/bin/statusbar/batinfo index 1719181..1719181 100755 --- a/.scripts/batinfo +++ b/.local/bin/statusbar/batinfo diff --git a/.scripts/checkupdates b/.local/bin/statusbar/checkupdates index 5a95974..5a95974 100755 --- a/.scripts/checkupdates +++ b/.local/bin/statusbar/checkupdates diff --git a/.scripts/cpuinfo b/.local/bin/statusbar/cpuinfo index f46121b..f46121b 100755 --- a/.scripts/cpuinfo +++ b/.local/bin/statusbar/cpuinfo diff --git a/.scripts/meminfo b/.local/bin/statusbar/meminfo index 2b31b97..2b31b97 100755 --- a/.scripts/meminfo +++ b/.local/bin/statusbar/meminfo diff --git a/.scripts/netinfo b/.local/bin/statusbar/netinfo index ceb79f7..d59ef05 100755 --- a/.scripts/netinfo +++ b/.local/bin/statusbar/netinfo @@ -19,16 +19,16 @@ function add_connected_address() { IFS=$TMPIFS } -case $BLOCK_BUTTON in +ARG=${1:-$BLOCK_BUTTON} + +case $ARG in 1) notify-send --urgency=low "Internet connection" "$(add_connected_address)" ;; esac -#echo "$(echo -e "$netstatus" | sed -En '/up$/p')" -#echo ====== - if [ -z "$(echo -e "${netstatus}" | sed -En '/up$/p' | tr -d '\n')" ]; then - echo -n '' + echo -en '\x0c' else - echo -n "${netstatus}" | sed -En 's/^(w[^ ]+).*up//p;s/^(e[^ ]+).*up//p' + echo -n "${netstatus}" | sed -En 's/^(w[^ ]+).*up//p;s/^(e[^ ]+).*up/\x0d/p' fi +echo -en '\x0b' diff --git a/.local/bin/statusbar/timeinfo b/.local/bin/statusbar/timeinfo new file mode 100755 index 0000000..a091f84 --- /dev/null +++ b/.local/bin/statusbar/timeinfo @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +ARG=${1:-$BLOCK_BUTTON} + +case $ARG in + 1) notify-send --urgency=low \ + "Calendar" \ + "$(cal -w -m)" + ;; + 3) notify-send --urgency=low \ + "Weather" \ + "$(weather)" + ;; + esac +date +'%F %R' diff --git a/.local/bin/statusbar/volinfo b/.local/bin/statusbar/volinfo new file mode 100755 index 0000000..fd09b13 --- /dev/null +++ b/.local/bin/statusbar/volinfo @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +ARG=${1:-$BLOCK_BUTTON} + +case $ARG in + 1) pamixer -t && sigdwmblocks 4;; + 4) pamixer -i 1 && sigdwmblocks 4;; + 5) pamixer -d 1 && sigdwmblocks 4;; +esac + +VOL=$(pamixer --get-volume) + +pamixer --get-mute >/dev/null && echo -ne "\x0c\ufa80${VOL}\x0b" || echo -ne "\ufa7d${VOL}" |
