From 1c25a32635a8c022cbd940d2520c356ec2b7e5f0 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 22 Jan 2023 17:36:13 +0530 Subject: handle keybinds --- hosts/myrtle/configuration.nix | 11 ++++++++--- services/default.nix | 2 +- services/sxhkd.nix | 8 +++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix index 20855e2..7986e9c 100644 --- a/hosts/myrtle/configuration.nix +++ b/hosts/myrtle/configuration.nix @@ -88,7 +88,7 @@ pulseaudio = { enable = true; package = pkgs.pulseaudioFull; - extraConfig = "load-module module-bluetooth-policy auto_switch=2"; + # extraConfig = "load-module module-bluetooth-policy auto_switch=2"; }; # opengl.enable = true; bluetooth = { @@ -117,9 +117,14 @@ enable = true; enableUserService = true; }; - services.supergfxd.enable = false; + services.supergfxd.enable = true; - powerManagement.powertop.enable = true; + services.logind.extraConfig = '' + HandlePowerKey=suspend-then-hibernate + HandlePowerKeyLongPress=poweroff + ''; + + powerManagement.powertop.enable = false; users.users.np = { isNormalUser = true; diff --git a/services/default.nix b/services/default.nix index 83955bf..dda2992 100644 --- a/services/default.nix +++ b/services/default.nix @@ -8,7 +8,7 @@ imports = [ ./dunst.nix - ./picom.nix + # ./picom.nix ./redshift.nix ./sxhkd.nix ./mbsync.nix diff --git a/services/sxhkd.nix b/services/sxhkd.nix index debe1b5..fe54cbf 100644 --- a/services/sxhkd.nix +++ b/services/sxhkd.nix @@ -11,9 +11,11 @@ in services.sxhkd = { enable = true; keybindings = { - "XF86Audio{Lower,Raise}Volume" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%{-,+}"; - "XF86AudioMute" = "${pkgs.alsaUtils}/bin/amixer sset Master toggle"; - "XF86MonBrightness{Down,Up}" = "${pkgs.light}/bin/light -{U,A} 5"; + "super + slash" = "${pkgs.light}/bin/light -A 5"; + "super + shift + slash" = "${pkgs.light}/bin/light -U 5"; + + "super + semicolon" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%+"; + "super + shift + semicolon" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%-"; # jump to firefox "super + alt + shift + ctrl + f" = jumpTo "Mozilla Firefox"; -- cgit v1.2.3