feat: add gtklock configs to nix

This commit is contained in:
matt1432 2023-08-07 21:39:05 -04:00
parent 3122d6ae25
commit f0c8c6fd51
8 changed files with 38 additions and 3 deletions

View file

@ -247,7 +247,7 @@
(eventbox :class "left-part" (eventbox :class "left-part"
:cursor "pointer" :cursor "pointer"
:onclick "$HOME/.config/gtklock/scripts/lock.sh &" :onclick "$LOCK_PATH/lock.sh &"
(label :text " 󰌾 " (label :text " 󰌾 "
:class "grid-label" :class "grid-label"

View file

@ -0,0 +1,4 @@
[main]
modules=/nix/var/nix/profiles/system/sw/lib/gtklock/powerbar-module.so;/nix/var/nix/profiles/system/sw/lib/gtklock/playerctl-module.so
#;/nix/var/nix/profiles/system/sw/lib/gtklock/userinfo-module.so

5
config/gtklock/scripts/blur.sh Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
grim -t jpeg /tmp/image.jpeg
convert /tmp/image.jpeg -blur 0x8 /tmp/image.jpeg

4
config/gtklock/scripts/lock.sh Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
$HYPR_PATH/laptop-mode.sh &
$LOCK_PATH/blur.sh
gtklock

17
config/gtklock/style.css Normal file
View file

@ -0,0 +1,17 @@
@define-color accent rgba(189, 147, 249, 0.8);
@define-color background rgb(40, 42, 54);
window {
background-image: url("/tmp/image.jpeg");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: rgba(0, 0, 0, 0);
}
#window-box {
padding: 64px;
border: 2px solid @accent;
border-radius: 30px;
background-color: @background;
}

View file

@ -48,7 +48,7 @@ exec-once = wl-paste --watch cliphist store
exec-once = swayosd exec-once = swayosd
# Change HandleLidSwitch to lock in logind.conf # Change HandleLidSwitch to lock in logind.conf
exec-once = swayidle -w lock $HOME/.config/gtklock/scripts/lock.sh exec-once = swayidle -w lock $LOCK_PATH/lock.sh
# Some default env vars. # Some default env vars.
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
@ -176,7 +176,7 @@ bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-co
bind = $mainMod, Q, exec, alacritty bind = $mainMod, Q, exec, alacritty
bind = $mainMod, C, killactive, bind = $mainMod, C, killactive,
bind = $mainMod, L, exec, $HOME/.config/gtklock/scripts/lock.sh bind = $mainMod, L, exec, $LOCK_PATH/lock.sh
bind = $mainMod SHIFT, E, exec, eww open closer && $EWW_PATH/open.sh powermenu bind = $mainMod SHIFT, E, exec, eww open closer && $EWW_PATH/open.sh powermenu
bindn =, Escape, exec, $EWW_PATH/close-opened.sh bindn =, Escape, exec, $EWW_PATH/close-opened.sh
bind = $mainMod SHIFT, SPACE, togglefloating, bind = $mainMod SHIFT, SPACE, togglefloating,

View file

@ -8,7 +8,11 @@ in
xdg.configFile = { xdg.configFile = {
"swaync/config.json".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swaync/config.json"; "swaync/config.json".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swaync/config.json";
"swaync/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swaync/style.css"; "swaync/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swaync/style.css";
"swayosd/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swayosd/style.css"; "swayosd/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swayosd/style.css";
"gtklock/config.ini".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/gtklock/config.ini";
"gtklock/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/gtklock/style.css";
}; };
programs = { programs = {

View file

@ -34,6 +34,7 @@ in
env = EWW_PATH, ${configDir}/eww/scripts env = EWW_PATH, ${configDir}/eww/scripts
env = HYPR_PATH, ${configDir}/hypr/scripts env = HYPR_PATH, ${configDir}/hypr/scripts
env = LOCK_PATH, ${configDir}/gtklock/scripts
exec-once = ${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1 exec-once = ${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
source = ~/.config/hypr/main.conf source = ~/.config/hypr/main.conf