Compare commits
3 Commits
407bdb2ddf
...
dff1560f6f
| Author | SHA1 | Date | |
|---|---|---|---|
| dff1560f6f | |||
| 5c3d5dd41e | |||
| f562c8aecd |
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# 2025-11-10 Hyperling
|
# 2025-11-10 Hyperling
|
||||||
|
|
||||||
function battery {
|
function battery-display {
|
||||||
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage | grep -o "[0-9.%]*"
|
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage | grep -o "[0-9.%]*"
|
||||||
}
|
}
|
||||||
alias show-battery="battery"
|
alias show-battery="battery-display"
|
||||||
alias battery-display="battery"
|
alias battery="battery-display"
|
||||||
|
|||||||
@@ -39,20 +39,24 @@ source "`which volume.function`"
|
|||||||
source "`which battery.function`"
|
source "`which battery.function`"
|
||||||
source "`which storage.function`"
|
source "`which storage.function`"
|
||||||
if [[ "`storage-root`" == "`storage-home`" ]]; then
|
if [[ "`storage-root`" == "`storage-home`" ]]; then
|
||||||
storage_cmd=echo 'Storage: `storage-root-dwm`)"'
|
function dwm-storage {
|
||||||
|
echo "`storage-root-dwm`)"
|
||||||
|
}
|
||||||
else
|
else
|
||||||
storage_cmd=echo '"Storage(Root:`storage-root-dwm` Home:`storage-home-dwm`)'
|
function dwm-storage {
|
||||||
|
echo "(Root#`storage-root-dwm`, Home#`storage-home-dwm`)"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
while true; do
|
while true; do
|
||||||
readout="$readout Battery: `battery-display`"
|
readout="$readout Battery: `battery-display`"
|
||||||
readout="$readout | `storage_cmd`"
|
readout="$readout | Storage: `dwm-storage`"
|
||||||
readout="$readout | `volume-display`"
|
readout="$readout | Volume: `volume-display`"
|
||||||
readout="$readout | `whoami`@`hostname`"
|
readout="$readout | `whoami`@`hostname`"
|
||||||
readout="$readout `date +"%Y-%m-%d %H:%M:%S"`"
|
readout="$readout `date +"%Y-%m-%d %H:%M:%S"`"
|
||||||
xsetroot -name "$readout"
|
xsetroot -name "$readout"
|
||||||
readout=""
|
readout=""
|
||||||
sleep 0.75
|
sleep 0.75
|
||||||
done &
|
done
|
||||||
|
|
||||||
|
|
||||||
## Start ##
|
## Start ##
|
||||||
|
|||||||
@@ -88,6 +88,6 @@
|
|||||||
dest: "{{ global_bin }}"
|
dest: "{{ global_bin }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ root_group }}"
|
group: "{{ root_group }}"
|
||||||
mode: 0644
|
mode: 0755
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- "dwm/*.function"
|
- "dwm/*.function"
|
||||||
|
|||||||
Reference in New Issue
Block a user