Sway

Ubuntu Sway Remix

Recording changes I make to the default configuration in Ubuntu Sway Remix

brightness control

# from /etc/sway/variables
# brightness control - very fine grained control
set $brightness_step bash -c 'echo $(( $(light -Mr) / 100 * 1 < 100 ? 50 : $(( $(light -Mr) / 100 * 2 )) ))'
set $brightness_up light -r -A $($brightness_step) && $onscreen_bar $(light -G | cut -d'.' -f1)
set $brightness_down light -r -U $($brightness_step) && $onscreen_bar $(light -G | cut -d'.' -f1)

idle configuration

Set $idle_timeout to 300, $locking_timeout to 3600, and $screen_timeout to 600.

Update the timeout $idle_timeout action to set the idle light level to 1 instead of 10.

### Idle configuration
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
#
set $lock ~/.config/swaylock/lock.sh
set $idle_timeout 300
set $locking_timeout 3600
set $screen_timeout 600
set $idle swayidle -w \
    timeout $idle_timeout 'light -G > /tmp/brightness && light -S 1' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)' \
    timeout $locking_timeout $lock \
    timeout $screen_timeout 'swaymsg "output * dpms off"' \
    resume 'swaymsg "output * dpms on"' \
    before-sleep 'playerctl pause' \
    before-sleep $lock & \
    lock $lock &

power alert

Add the following to ~/.config/mako/config and then reload sway:

[app-name="poweralertd"]
invisible=1


#end


Revision #2
Created 12 June 2023 04:45:36 by bluecrow76
Updated 4 July 2024 23:11:26 by bluecrow76