mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos.git
synced 2026-11-03 04:24:27 +00:00
Add on-screen display, sidebar keybinds, function keys, gh package
- Add Osd.qml: themed top-center popup for volume/mic/brightness/media changes. Volume and mic react directly to Pipewire so they fire for any change, not just our own keybinds; brightness is notified explicitly (no live service exists for DDC/CI writes); media is driven by two playerctl --follow watchers (status + metadata) so track changes, pause/resume, and stop all show correctly without double-firing - Add Super+Shift+Z/X to toggle the Left/RightBar sidebars, via a new Quickshell IpcHandler wired to the same expand/collapse logic as the BottomBar arrows - Add function-key binds for volume up/down/mute, mic mute, brightness up/down, and media play/pause/stop/next/prev (wpctl/playerctl); extend brightness-ctl with relative up/down steps for both the backlight and DDC/CI paths - Add gh and playerctl to packages
This commit is contained in:
parent
ea7fefbba8
commit
1f5f9795bc
5 changed files with 267 additions and 1 deletions
|
|
@ -25,8 +25,32 @@ case "${1:-get}" in
|
|||
ddcutil setvcp 10 "$pct" > /dev/null
|
||||
fi
|
||||
;;
|
||||
up|down)
|
||||
# brightnessctl takes a relative step directly, but ddcutil's
|
||||
# setvcp only takes an absolute value — so the DDC/CI path (this
|
||||
# machine's AOC 27G2G8 has no backlight device, so it always takes
|
||||
# this path) has to read the current level and clamp the step
|
||||
# itself.
|
||||
step="${2:-5}"
|
||||
if has_backlight; then
|
||||
if [ "$1" = "up" ]; then
|
||||
brightnessctl set "+${step}%" > /dev/null
|
||||
else
|
||||
brightnessctl set "${step}%-" > /dev/null
|
||||
fi
|
||||
else
|
||||
cur=$(ddcutil getvcp 10 --brief 2>/dev/null | awk '{print $4}')
|
||||
cur="${cur:-50}"
|
||||
if [ "$1" = "up" ]; then
|
||||
new=$(( cur + step > 100 ? 100 : cur + step ))
|
||||
else
|
||||
new=$(( cur - step < 0 ? 0 : cur - step ))
|
||||
fi
|
||||
ddcutil setvcp 10 "$new" > /dev/null
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: brightness-ctl [get|set <0-100>]" >&2
|
||||
echo "usage: brightness-ctl [get|set <0-100>|up [step]|down [step]]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in a new issue