Swap swaync for mako

Remove separate swaylockfx file, combine in default
This commit is contained in:
Evie Litherland-Smith 2024-09-14 09:27:35 +01:00
parent 9af40b1b40
commit c9b3731026
4 changed files with 13 additions and 27 deletions

View file

@ -10,9 +10,9 @@
imports = [ imports = [
../avizo/default.nix ../avizo/default.nix
../fuzzel/default.nix ../fuzzel/default.nix
../mako/default.nix
../swaylock/default.nix ../swaylock/default.nix
../swayidle/default.nix ../swayidle/default.nix
../swaync/default.nix
../waybar/default.nix ../waybar/default.nix
../wlogout/default.nix ../wlogout/default.nix
]; ];
@ -175,6 +175,7 @@
{ {
command = "${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg}"; command = "${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg}";
} }
{ command = "${config.services.mako.package}/bin/mako"; }
]; ];
window = { window = {
border = 1; border = 1;
@ -243,8 +244,8 @@
# System utilities # System utilities
"Mod4+Mod1+l" = "exec swaylockfx"; "Mod4+Mod1+l" = "exec swaylockfx";
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; "${modifier}+z" = "exec ${config.services.mako.package}/bin/makoctl restore";
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"; "${modifier}+Shift+z" = "exec ${config.services.mako.package}/bin/makoctl dismiss -a";
"${modifier}+Shift+p" = "exec ${config.programs.wlogout.package}/bin/wlogout"; "${modifier}+Shift+p" = "exec ${config.programs.wlogout.package}/bin/wlogout";
"${modifier}+Shift+Return" = "exec ${config.programs.emacs.finalPackage}/bin/emacsclient -c"; "${modifier}+Shift+Return" = "exec ${config.programs.emacs.finalPackage}/bin/emacsclient -c";
}; };
@ -266,8 +267,6 @@
layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "swaync-notification-window" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "swaync-control-center" blur enable; blur_ignore_transparent enable; shadows enable
titlebar_separator enable titlebar_separator enable
''; '';
}; };

View file

@ -6,7 +6,9 @@
}: }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
(callPackage ./swaylockfx.nix { swaylock-effects = config.programs.swaylock.package; }) (writeShellScriptBin "swaylockfx" ''
${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse
'')
]; ];
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;

View file

@ -1,2 +0,0 @@
{ writeShellScriptBin, swaylock-effects, ... }:
writeShellScriptBin "swaylockfx" "${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"

View file

@ -245,27 +245,14 @@
}; };
"custom/notification" = "custom/notification" =
let let
swaync = pkgs.swaynotificationcenter; makoctl = "${config.services.mako.package}/bin/makoctl";
jq = "${pkgs.jq}/bin/jq";
in in
{ {
tooltip = false; exec = "( ${makoctl} list | ${jq} -e '.data[] | length > 0' >/dev/null && echo '󱅫 ' ) || echo '󰂚 ' ";
format = "{icon}{}"; format = "{}";
format-icons = { on-click = "${makoctl} dismiss -a";
notification = "󱅫 "; interval = 3;
none = "󰂚 ";
dnd-notification = "󰅸 ";
dnd-none = "󰂜 ";
inhibited-notification = "󰅸 ";
inhibited-none = "󰂜 ";
dnd-inhibited-notification = "󰅸 ";
dnd-inhibited-none = "󰂜 ";
};
return-type = "json";
exec-if = "which ${swaync}/bin/swaync-client";
exec = "${swaync}/bin/swaync-client -swb";
on-click = "${swaync}/bin/swaync-client -t -sw";
on-click-right = "${swaync}/bin/swaync-client -d -sw";
escape = true;
}; };
"custom/weather" = "custom/weather" =
let let