From ee2b929838456d9236fecd02653cde00a1576290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 24 Mar 2023 00:12:23 +0100 Subject: [PATCH] feat: slock --- configs/i3.nix | 4 +++- configs/picom.nix | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configs/i3.nix b/configs/i3.nix index 2f9d44e..ead87a2 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -216,6 +216,9 @@ in { "k" = "resize shrink height 10 px or 5 ppt"; "l" = "resize grow width 10 px or 5 ppt"; }; + extraConfig = '' + bindsym --release ${modifier}+Shift+w exec /run/wrappers/bin/slock + ''; keybindings = { "${modifier}+Shift+h" = "move left 25 px"; "${modifier}+Shift+j" = "move down 25 px"; @@ -261,7 +264,6 @@ in { "${modifier}+y" = "exec ${(defaultApplications pkgs).browser}"; "${modifier}+0" = "exec ${niveumPackages.menu-calc}/bin/="; - "${modifier}+Shift+w" = "exec slock"; "${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}"; "${modifier}+Shift+d" = "exec ${ pkgs.writers.writeDash "notemenu" '' diff --git a/configs/picom.nix b/configs/picom.nix index 66ffd9b..e798fd6 100644 --- a/configs/picom.nix +++ b/configs/picom.nix @@ -8,14 +8,18 @@ shadow = true; menuOpacity = 0.9; shadowOpacity = 0.3; + fadeExclude = [ + "class_g = 'slock'" # don't want a transparent lock screen! + "name *?= 'slock'" + "focused = 1" + ]; opacityRules = [ # opacity-rule overrides both inactive and active opacity - "100:class_g = 'slock'" # don't want a transparent lock screen! # video in browser tabs # substring /regex match of title bar text - "100:name *?= 'Youtube'" - "100:name *?= 'slock'" + "99:name *?= 'Youtube'" + "99:WM_CLASS@:s *= 'mpv$'" ]; }; }