Base scripts for Artix and startx config.
This commit is contained in:
1 parent
9d2999d5c0
commit
459bfff2ca
8 files changed
+218
No files matched your search
Executable
+19
@@ -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
|
||||
Executable
+10
@@ -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"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#/bin/sh
|
||||
|
||||
PIDFILE="/tmp/screen_recorder.pid"
|
||||
|
||||
if [ -f "$PIDFILE" ]; then
|
||||
echo "Rec *"
|
||||
fi
|
||||
Executable
+8
@@ -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"
|
||||
Reference in new issue
Block a user