fix locking and screen sharing

This commit is contained in:
notgne2 2025-10-16 16:36:27 -07:00
parent e831ca5f0a
commit f02e292b01
No known key found for this signature in database
2 changed files with 40 additions and 18 deletions

View file

@ -6,10 +6,6 @@ inputs: {
}: }:
with lib; let with lib; let
cfg = config.ezpcusr; cfg = config.ezpcusr;
lockCommand = pkgs.writeShellScript "lock.sh" ''
exec ${pkgs.swaylock}/bin/swaylock -f
'';
in { in {
options.ezpcusr = { options.ezpcusr = {
enable = mkEnableOption "Enable simple PC user config"; enable = mkEnableOption "Enable simple PC user config";
@ -58,7 +54,7 @@ in {
settings = { settings = {
general = { general = {
lock_cmd = "pidof hyprlock || hyporlock"; lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session"; before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyperctl dispatch dpms on"; after_sleep_cmd = "hyperctl dispatch dpms on";
}; };
@ -76,7 +72,34 @@ in {
}; };
}; };
programs.hyprlock.enable = true; programs.hyprlock = {
enable = true;
settings = {
general = {
hide_cursor = true;
};
animations = {
enabled = true;
fade_in = {
duration = 300;
bezier = "easeOutQuint";
};
fade_out = {
duration = 300;
bezier = "easeOutQuint";
};
};
background = lib.mkForce [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
};
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
@ -96,17 +119,11 @@ in {
no_gaps_when_only = 1; no_gaps_when_only = 1;
}; };
layerrule = [ layerrule = [
"ignorealpha 0.1, ashell-main-layer"
"blur, ashell-main-layer"
"blur, bar-.*" "blur, bar-.*"
"ignorealpha 0.1, bar-.*" "ignorezero, bar-.*"
"blur, .*menu" # "blur, notifications-window"
"ignorealpha 0.1, .*menu" # "blur, indicator"
"blur, notifications-window" # "ignorezero, indicator"
"ignorealpha 0.1, notifications-window"
"blur, indicator"
"ignorealpha 0.1, indicator"
]; ];
ecosystem = { ecosystem = {
no_update_news = true; no_update_news = true;
@ -289,8 +306,8 @@ in {
theme = { theme = {
font.weight = 100; font.weight = 100;
osd.opacity = 60; # osd.opacity = 60;
notification.opacity = 60; # notification.opacity = 60;
bar = { bar = {
transparent = true; transparent = true;
outer_spacing = "0"; outer_spacing = "0";

View file

@ -12,6 +12,11 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
xdg.portal = { xdg.portal = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
xdgOpenUsePortal = true;
config = {
common.default = ["gtk"];
hyprland.default = ["gtk" "hyprland"];
};
}; };
programs.hyprland.enable = true; programs.hyprland.enable = true;