mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
Minimal i3 setup
This commit is contained in:
14
dotfiles/desktop/.config/i3blocks/scripts/backlight
Executable file
14
dotfiles/desktop/.config/i3blocks/scripts/backlight
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
cur="$(brightnessctl g 2>/dev/null)"
|
||||
max="$(brightnessctl m 2>/dev/null)"
|
||||
|
||||
[ -n "$cur" ] || exit 0
|
||||
[ -n "$max" ] || exit 0
|
||||
[ "$max" -gt 0 ] || exit 0
|
||||
|
||||
pct=$((100 * cur / max))
|
||||
|
||||
echo "BL ${pct}%"
|
||||
echo "BL ${pct}%"
|
||||
echo "#6daeea"
|
||||
Reference in New Issue
Block a user