updates to tiling
This commit is contained in:
parent
8a7dd224f9
commit
53973bbfb1
8 changed files with 122 additions and 13 deletions
|
|
@ -179,7 +179,7 @@ layout {
|
|||
// off
|
||||
|
||||
width 1
|
||||
active-color "#6c7086"
|
||||
active-color "#fab387"
|
||||
// active-gradient from="#fab387" to="#89b4fa" angle=90
|
||||
inactive-color "#313244"
|
||||
// inactive-gradient from="#313244" to="#6c7086" angle=90
|
||||
|
|
@ -252,6 +252,10 @@ layout {
|
|||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||
spawn-at-startup "waybar"
|
||||
|
||||
// run tailscale system tray
|
||||
spawn-at-startup "sudo tailscale set --operator=$USER"
|
||||
spawn-at-startup "tailscale systray"
|
||||
|
||||
// Instead let's start quickshell, which is similar but made with Qt/QML
|
||||
// spawn-at-startup "quickshell"
|
||||
|
||||
|
|
@ -374,8 +378,8 @@ binds {
|
|||
// Example brightness key mappings for brightnessctl.
|
||||
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
|
||||
// but you need to manually put each argument in separate "" quotes.
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "/home/sckova/.config/niri/scripts/brightness.sh" "5"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "/home/sckova/.config/niri/scripts/brightness.sh" "-5"; }
|
||||
|
||||
// Open/close the Overview: a zoomed-out view of workspaces and windows.
|
||||
// You can also move the mouse into the top-left hot corner,
|
||||
|
|
|
|||
29
home/tiling/niri/config/scripts/brightness.sh
Executable file
29
home/tiling/niri/config/scripts/brightness.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
WAYBAR_SIGNAL=8 # SIGRTMIN+8
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <integer -100..100>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
value="$1"
|
||||
|
||||
# Validate integer range
|
||||
if ! [[ "$value" =~ ^-?[0-9]+$ ]] || [ "$value" -lt -100 ] || [ "$value" -gt 100 ]; then
|
||||
echo "Error: argument must be an integer between -100 and 100" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Apply brightness change with correct syntax
|
||||
if [ "$value" -gt 0 ]; then
|
||||
brightnessctl s "+${value}%" >/dev/null
|
||||
elif [ "$value" -lt 0 ]; then
|
||||
brightnessctl s "${value#-}%-" >/dev/null
|
||||
else
|
||||
: # no-op for 0
|
||||
fi
|
||||
|
||||
# Notify Waybar to refresh
|
||||
pkill -RTMIN+"$WAYBAR_SIGNAL" waybar
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue