From ada392b3f34919884e109cff9e837d4238a3bdb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 21 Jun 2024 00:30:23 -0300 Subject: [PATCH] sway: add screen brightnes binds --- user/sway/default.nix | 1 + user/sway/sway-binds.nix | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 988453d..57627d6 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -146,6 +146,7 @@ in wdmenu wlauncher volumesh + brightnessctl showkeys pamixer libnotify diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index 543de59..7b33cd0 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -16,7 +16,6 @@ let _lock = pkgs.writeShellScriptBin "_lock" '' ${pkgs.sway}/bin/swaymsg mode default ${pkgs.swaylock}/bin/swaylock -f - systemctl --user start swayidle.service ''; _suspend = pkgs.writeShellScriptBin "_suspend" '' ${pkgs.sway}/bin/swaymsg mode default @@ -158,6 +157,12 @@ let "Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip"; }; + screen_binds = { + "XF86MonBrightnessDown" = "exec brightnessctl --min-value=1 set 5%-"; + "XF86MonBrightnessUp" = "exec brightnessctl --min-value=1 set 5%+"; + "${mod}+l" = lib.getExe _lock; + }; + other_binds = { "${mod}+p" = "exec ${pkgs.wpass}/bin/wpass"; "${mod}+s" = "exec ${menu}"; @@ -196,5 +201,6 @@ in system_binds parenting_binds screenshot_binds + screen_binds ]; }