feat(hyprland): replace gtklock with swaylock
This commit is contained in:
parent
f4b2a970b1
commit
0bbd6d47e3
9 changed files with 80 additions and 48 deletions
|
@ -282,8 +282,7 @@ const SecondRow = () => Row({
|
|||
|
||||
GridButton({
|
||||
command: () => {
|
||||
execAsync(['bash', '-c', '$LOCK_PATH/lock.sh'])
|
||||
.catch(print);
|
||||
execAsync(['lock']).catch(print);
|
||||
},
|
||||
secondaryCommand: () => App.openWindow('powermenu'),
|
||||
icon: 'system-lock-screen-symbolic',
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
grim -t jpeg /tmp/image.jpeg
|
||||
convert /tmp/image.jpeg -blur 0x8 /tmp/image.jpeg
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
ags -r 'Tablet.setLaptopMode()'
|
||||
$LOCK_PATH/blur.sh
|
||||
gtklock
|
|
@ -1,17 +0,0 @@
|
|||
@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;
|
||||
}
|
|
@ -22,7 +22,7 @@ exec-once = ags
|
|||
exec-once = sleep 3; ags -t applauncher
|
||||
|
||||
## Change HandleLidSwitch to lock in logind.conf
|
||||
exec-once = swayidle -w lock $LOCK_PATH/lock.sh
|
||||
exec-once = swayidle -w lock lock
|
||||
|
||||
## Special window apps
|
||||
exec-once = [workspace special:thunder silent] thunderbird
|
||||
|
@ -55,7 +55,6 @@ binde =, XF86MonBrightnessDown, exec, ags -r 'Brightness.screen -= 0.05'
|
|||
bindr = CAPS, Caps_Lock, exec, ags -r 'Brightness.fetchCapsState()'
|
||||
|
||||
## Ags & co
|
||||
bind = $mainMod , L , exec, $LOCK_PATH/lock.sh
|
||||
bindn = , Escape, exec, ags run-js 'closeAll()'
|
||||
bind = $mainMod SHIFT, E , exec, ags -t powermenu
|
||||
bind = $mainMod , D , exec, ags -t applauncher
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{config, ...}: let
|
||||
configDir = config.vars.configDir;
|
||||
symlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
in {
|
||||
|
@ -11,21 +7,11 @@ in {
|
|||
env = [
|
||||
"AGS_PATH, ${configDir}/ags/bin"
|
||||
"HYPR_PATH, ${configDir}/hypr/scripts"
|
||||
"LOCK_PATH, ${configDir}/gtklock/scripts"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"gtklock/config.ini".text = ''
|
||||
[main]
|
||||
modules=${builtins.concatStringsSep ";" [
|
||||
"${pkgs.gtklock-powerbar-module}/lib/gtklock/powerbar-module.so"
|
||||
"${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so"
|
||||
]}
|
||||
'';
|
||||
"gtklock/style.css".source = symlink "${configDir}/gtklock/style.css";
|
||||
|
||||
"dolphinrc".source = symlink "${configDir}/dolphinrc";
|
||||
"kdeglobals".source = symlink "${configDir}/kdeglobals";
|
||||
"kiorc".source = symlink "${configDir}/kiorc";
|
||||
|
|
|
@ -23,8 +23,6 @@ in {
|
|||
'';
|
||||
|
||||
security.pam.services = {
|
||||
gtklock = {};
|
||||
|
||||
# all the changes in /etc/pam.d/*
|
||||
sddm.text = lib.mkBefore ''
|
||||
auth [success=1 new_authtok_reqd=1 default=ignore] pam_unix.so try_first_pass likeauth nullok
|
||||
|
|
73
home/swaylock.nix
Normal file
73
home/swaylock.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "lock" ''
|
||||
ags -r 'Tablet.setLaptopMode()'
|
||||
swaylock
|
||||
'')
|
||||
];
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
font = "Ubuntu";
|
||||
|
||||
clock = true;
|
||||
timestr = "%R";
|
||||
datestr = "%a, %e of %B";
|
||||
|
||||
screenshots = true;
|
||||
|
||||
# FIXME: doesn't work
|
||||
submit-on-touch = true;
|
||||
|
||||
# Very delayed for some reason
|
||||
#fade-in = 0.1;
|
||||
|
||||
effect-blur = "20x2";
|
||||
#effect-greyscale = true;
|
||||
#effect-scale = 0.3;
|
||||
|
||||
indicator = true;
|
||||
indicator-radius = 240;
|
||||
indicator-thickness = 20;
|
||||
indicator-caps-lock = true;
|
||||
|
||||
key-hl-color = "880033";
|
||||
|
||||
separator-color = "00000000";
|
||||
|
||||
inside-color = "00000099";
|
||||
inside-clear-color = "ffd20400";
|
||||
inside-caps-lock-color = "009ddc00";
|
||||
inside-ver-color = "d9d8d800";
|
||||
inside-wrong-color = "ee2e2400";
|
||||
|
||||
ring-color = "231f20D9";
|
||||
ring-clear-color = "231f20D9";
|
||||
ring-caps-lock-color = "231f20D9";
|
||||
ring-ver-color = "231f20D9";
|
||||
ring-wrong-color = "231f20D9";
|
||||
|
||||
line-color = "00000000";
|
||||
line-clear-color = "ffd204FF";
|
||||
line-caps-lock-color = "009ddcFF";
|
||||
line-ver-color = "d9d8d8FF";
|
||||
line-wrong-color = "ee2e24FF";
|
||||
|
||||
text-color = "CBA6F7FF";
|
||||
text-clear-color = "ffd20400";
|
||||
text-ver-color = "d9d8d800";
|
||||
text-wrong-color = "ee2e2400";
|
||||
|
||||
bs-hl-color = "ee2e24FF";
|
||||
caps-lock-key-hl-color = "ffd204FF";
|
||||
caps-lock-bs-hl-color = "ee2e24FF";
|
||||
disable-caps-lock-text = true;
|
||||
text-caps-lock-color = "009ddc";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -19,6 +19,8 @@ in {
|
|||
../dolphin.nix
|
||||
];
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
programs = {
|
||||
kdeconnect.enable = true;
|
||||
dconf.enable = true;
|
||||
|
@ -44,6 +46,7 @@ in {
|
|||
../../home/alacritty.nix
|
||||
../../home/dconf.nix
|
||||
../../home/obs.nix
|
||||
../../home/swaylock.nix
|
||||
../../home/theme.nix
|
||||
../../home/wofi
|
||||
];
|
||||
|
@ -135,6 +138,7 @@ in {
|
|||
|
||||
bind = [
|
||||
# Defaults
|
||||
"$mainMod, L, exec, lock"
|
||||
"$mainMod, Q, exec, alacritty"
|
||||
"$mainMod, F, fullscreen"
|
||||
"$mainMod, C, killactive, "
|
||||
|
@ -245,7 +249,6 @@ in {
|
|||
gnome.seahorse
|
||||
p7zip # for reshade
|
||||
|
||||
gtklock # FIXME: find replacement
|
||||
swww
|
||||
|
||||
## libs
|
||||
|
|
Loading…
Reference in a new issue