Base scripts for Artix and startx config.

This commit is contained in:
ikolokolnikov committed 2026-09-15 16:09:40 -07:00
1 parent 9d2999d5c0
commit 459bfff2ca
8 files changed
+218

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
for battery in /sys/class/power_supply/BAT?*; do
status=""
case "$(cat "$battery/status" 2>&1)" in
"Full") status="=" ;;
"Charging") status="+" ;;
"Discharging") status="-" ;;
"Not charging") status="/" ;;
"Unknown") status="?" ;;
*) exit 1 ;;
esac
capacity="$(cat "$battery/capacity" 2>&1)"
warn=""
[ "$capacity" -le 25 ] && warn="!"
printf "%s[%s]%s" "$warn" "$capacity" "$status"
done
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
set -- /sys/class/backlight/*/
read -r curr_brightness <"${1%/}/brightness"
read -r max_brightness <"${1%/}/max_brightness"
brightness_per=$((100 * curr_brightness / max_brightness))
printf "Bri:%d%%\n" "$brightness_per"
+7
View File
@@ -0,0 +1,7 @@
#/bin/sh
PIDFILE="/tmp/screen_recorder.pid"
if [ -f "$PIDFILE" ]; then
echo "Rec *"
fi
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
raw_volume="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
volume="$(echo $raw_volume | awk '{print $2 * 100}')"
echo $raw_volume | grep -q 'MUTED' &&
printf "Vol:%s%%" "$volume" ||
printf "Vol:[%s%%]" "$volume"