aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNicholas <nbnoll@eml.cc>2021-11-07 11:43:28 -0800
committerNicholas <nbnoll@eml.cc>2021-11-07 11:43:28 -0800
commit0a1041044141ddbda0c67602e70fe8894e7430fd (patch)
tree1cba0e61e397f55218a90e04df5423f75dae4409 /bin
parent5d1e21d28a93415b66401d27a30ee8eb6b2b66a8 (diff)
config changes for laptop
Diffstat (limited to 'bin')
-rwxr-xr-xbin/status22
-rwxr-xr-xbin/updatedirs3
2 files changed, 12 insertions, 13 deletions
diff --git a/bin/status b/bin/status
index bca791a..67c0ff6 100755
--- a/bin/status
+++ b/bin/status
@@ -7,7 +7,7 @@ cpu() {
}
mail() {
- NEWMAIL=$(expr $(ls -1 ~/mail/*/INBOX/new | wc -l) - 7)
+ NEWMAIL=$(expr $(ls -1 ~/mail/*/INBOX/new | wc -l) - 5)
if [ "${NEWMAIL%% *}" -eq 0 ]; then
printf " (%s)" "${NEWMAIL%% *}"
@@ -17,8 +17,8 @@ mail() {
}
battery() {
- CHARGE=$(cat /sys/class/power_supply/BAT0/capacity)
- STATUS=$(cat /sys/class/power_supply/BAT0/status)
+ CHARGE=$(cat /sys/class/power_supply/BAT1/capacity)
+ STATUS=$(cat /sys/class/power_supply/BAT1/status)
if [ "$STATUS" = "Charging" ]; then
printf " %s%%" "$CHARGE"
else
@@ -35,16 +35,17 @@ battery() {
}
volume() {
- VOL=$(amixer get Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/")
+ VOL=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}')
+ VOL=${VOL::-1}
if [ "$VOL" -eq 0 ]; then
- printf "🔇"
+ printf ""
elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then
- printf "🔈%s%%" "$VOL"
+ printf "%s%%" "$VOL"
elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then
- printf "🔉%s%%" "$VOL"
+ printf "%s%%" "$VOL"
else
- printf "🔊%s%%" "$VOL"
+ printf "%s%%" "$VOL"
fi
}
@@ -71,8 +72,7 @@ ipaddr() {
dostatus() {
# xsetroot -name "$VOL│$MEM│$IP│$CPU│$NML│$WTR│$TIM"
- xsetroot -name "$VOL│$BAT│$MEM│$IP│$CPU│$NML│$WTR│$TIM"
- # echo "$VOL│$BAT│$MEM│$IP│$CPU│$NML│$WTR│$TIM"
+ exec xsetroot -name "$VOL│$BAT│$MEM│$IP│$CPU│$NML│$WTR│$TIM"
}
# signal handlers
@@ -146,6 +146,6 @@ do
refresh_cpu
refresh_mail
refresh_time
- dostatus
+ dostatus &
sleep 1m & wait $!
done
diff --git a/bin/updatedirs b/bin/updatedirs
index 1ec2e25..cde7a6b 100755
--- a/bin/updatedirs
+++ b/bin/updatedirs
@@ -1,8 +1,7 @@
#!/bin/python
-
import os
-ROOT = "/home/nolln/root"
+ROOT = "/home/nolln/u"
SRCS = ["src", "sys"]
BUILD = ".build"
TEST = ".test"