diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 09574ff7..dd32d115 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -33,6 +33,7 @@ networkmanager_dmenu # Network Manager dmenu script wdisplays # Manage wayland displays wlsunset # Day/night gamma adjustment/filter for wayland + light # GNU/Linux application to control backlights sway-contrib.grimshot # Screenshot tool for wayland mako # Notification Daemon wlprop # Clone of X11 xprop for wayland (To get window class names etc) @@ -119,6 +120,20 @@ xdg-user-dirs ]; + security.sudo = { + extraRules = [ + { + commands = [ + { + command = "/run/current-system/sw/bin/light"; + options = [ "NOPASSWD" ]; + } + ]; + groups = [ "wheel" ]; + } + ]; + }; + environment.sessionVariables = { TERM = "foot"; QT_QPA_PLATFORM = "wayland-egl"; diff --git a/configurations/laptop/resources/home-manager/.config/sway/config b/configurations/laptop/resources/home-manager/.config/sway/config index b6e708f5..bc602278 100755 --- a/configurations/laptop/resources/home-manager/.config/sway/config +++ b/configurations/laptop/resources/home-manager/.config/sway/config @@ -101,6 +101,10 @@ gaps outer 5 # Lock screen bindsym Mod4+l exec swaylock -c 000000 + # Brightness Controls + bindsym XF86MonBrightnessUp exec sudo light -A 10 + bindsym XF86MonBrightnessDown exec sudo light -U 10 + # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. @@ -259,4 +263,8 @@ bar { include /etc/sway/config.d/* # Autostart + +# London Longitude/Latitude +exec wlsunset -l 51.5 -L -0.1 + exec qpwgraph \ No newline at end of file