update status bar scripts
This commit is contained in:
parent
77a6828d60
commit
2f32b1f1c1
5 changed files with 16 additions and 31 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 376fa3bf0d9d14d8a1b4303875f43fee95cd3399
|
||||
Subproject commit 5d5148ee33960877240faf91ec63ae986f4987be
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
# clock=$(date '+%I')
|
||||
# case "$clock" in
|
||||
# "00") icon="" ;;
|
||||
# "01") icon="" ;;
|
||||
# "02") icon="" ;;
|
||||
# "03") icon="" ;;
|
||||
# "04") icon="" ;;
|
||||
# "05") icon="" ;;
|
||||
# "06") icon="" ;;
|
||||
# "07") icon="" ;;
|
||||
# "08") icon="" ;;
|
||||
# "09") icon="" ;;
|
||||
# "10") icon="" ;;
|
||||
# "11") icon="" ;;
|
||||
# "12") icon="" ;;
|
||||
# esac
|
||||
# printf "%s \e[11m%s\e[10m %s\n" "$(date "+%H:%M")" "$icon" "$(date "+%d.%m.%Y")"
|
||||
date "+%H:%M %d.%m.%Y"
|
|
@ -1,12 +1,17 @@
|
|||
#!/bin/sh
|
||||
# $1 should be drive mountpoint, otherwise assumed /.
|
||||
# $2 should be an icon, otherwise is used.
|
||||
|
||||
reset="\033[0m"
|
||||
big="\033[12m"
|
||||
defaulticon=""
|
||||
IFS='
|
||||
'
|
||||
|
||||
location=${1:-/}
|
||||
[ -d "$location" ] || exit
|
||||
[ -z "$2" ] && icon="$defaulticon" || icon="$2"
|
||||
printf "%b" "$big$icon$reset $(df -H "$location" | awk ' /[0-9]/ {print $3 "/" $2}')\n"
|
||||
first=true
|
||||
for mnt in $(findmnt --real -Py -t ext2,ext3,ext4,xfs,btrfs,vfat); do
|
||||
[ "$first" = "false" ] && printf " | "
|
||||
eval $mnt
|
||||
[ -d "$TARGET" ] || break
|
||||
name=$TARGET
|
||||
printf "%b" "${name}: $(df -H "$TARGET" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
||||
first=false
|
||||
done
|
||||
printf "\n"
|
||||
|
|
|
@ -15,8 +15,7 @@ fi
|
|||
|
||||
if ls /sys/class/net/e*/operstate 1>/dev/null 2>&1; then
|
||||
for e in /sys/class/net/e*/operstate; do
|
||||
if_icon="$(sed "s/down//;s/up//" $e)"
|
||||
printf "%b" "$shift$big$if_icon$reset"
|
||||
[ "$e" = "up" ] && printf "%b" "$shift"
|
||||
shift=" "
|
||||
done
|
||||
fi
|
||||
|
@ -28,4 +27,4 @@ if ls /sys/class/net/tun*/operstate 1>/dev/null 2>&1; then
|
|||
done
|
||||
fi
|
||||
|
||||
printf "%b" "\n"
|
||||
printf "\n"
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d3b604b8746615c5f85fe1938253f216b009876d
|
||||
Subproject commit 3ca57136b7a35d990792d946e3611ec7a1a15bbe
|
Loading…
Add table
Reference in a new issue