feat: mimeapps, remove p10k

This commit is contained in:
ange 2024-04-24 11:25:04 +02:00
parent 03a0bab194
commit 32cb220161
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
29 changed files with 1383 additions and 11738 deletions

View file

@ -11,7 +11,7 @@ function update_cpu() {
}
function update_memory() {
memory=" $(free -h | awk '/^Mem:/ {print $3}')"
memory=" $(free -h | awk '/^Mem:/{print $3}')"
}
function update_bat() {
@ -53,14 +53,14 @@ function update_source_vol() {
}
function update_wlp() {
local sig ssid
local sig ssid dev=wlan0
sig="$(awk '/^wlp/ {print int($3)}' /proc/net/wireless)"
sig="$(awk "/$dev/{print int(\$3)}" /proc/net/wireless)"
if [ -z "$sig" ]; then
wlp='⚠'
return
fi
ssid="$(nmcli device wifi show-password | sed -n 's/^SSID:\s*//p')"
ssid="$(networkctl status "$dev" | grep -Po 'Wi-Fi access point:\s*\K\w+')"
{ [ "$sig" -gt 56 ] && wlp="▂▄▆█ $ssid"; } ||
{ [ "$sig" -gt 38 ] && wlp="▂▄▆_ $ssid"; } ||
{ [ "$sig" -gt 21 ] && wlp="▂▄__ $ssid"; } ||
@ -83,8 +83,9 @@ else
fi
# SIGNALING
# trap '<function>;display' 'RTMIN+n'
trap 'update_sink_vol;display' 'RTMIN'
# trap '<function>;display;wait' 'RTMIN+n'
trap 'update_sink_vol;display;wait' 'RTMIN'
trap 'update_wlp;display;wait' 'RTMIN+1'
# to update it from external commands
## kill -m "$(cat ~/.cache/pidofbar)"
# where m = 34 + n
@ -107,5 +108,5 @@ while true; do
}
sec="$((sec + 10))"
}
awk '@load "time"; BEGIN {d=10; s=system("date \"+%S.%N\""); sleep(d - s % d)}' &
awk "@load \"time\"; BEGIN {d=10; s=$(date '+%S.%N'); sleep(d - s % d)}" &
done