From 3da9555cfd3f55c9d3bb6ddc574064eedf0795f4 Mon Sep 17 00:00:00 2001 From: EdenQwQ Date: Thu, 20 Mar 2025 14:15:54 +0800 Subject: [PATCH] add zotero windowrule; add a new wallpaper --- home/programs/desktop/niri/default.nix | 102 +++++++++++++------------ sharedConfig.nix | 6 ++ 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/home/programs/desktop/niri/default.nix b/home/programs/desktop/niri/default.nix index 62e2866..f8a8977 100644 --- a/home/programs/desktop/niri/default.nix +++ b/home/programs/desktop/niri/default.nix @@ -14,7 +14,6 @@ ]; programs.niri = { - # home.file.".config/niri/config.kdl".source = ./config.kdl; enable = true; package = pkgs.niri-unstable; settings = @@ -49,48 +48,53 @@ ]; "Mod+Shift+C".action = spawn "/home/${user}/scripts/tofi/colorscheme"; }; - window-rules = [ - { - geometry-corner-radius = { - bottom-left = 10.0; - bottom-right = 10.0; - top-left = 10.0; - top-right = 10.0; - }; - clip-to-geometry = true; - draw-border-with-background = false; - } - { - matches = [ - { app-id = "yad"; } - ]; - open-floating = true; - } - { - matches = [ - { app-id = "firefox"; } - { app-id = "org.qutebrowser.qutebrowser"; } - { app-id = "kitty"; } - { app-id = "evince"; } - { app-id = "zathura"; } - ]; - default-column-width = { - proportion = 1.0; - }; - } - { - matches = [ - { is-focused = true; } - ]; - opacity = 0.95; - } - { - matches = [ - { is-focused = false; } - ]; - opacity = 0.85; - } - ]; + window-rules = + let + matchAppIDs = appIDs: map (appID: { app-id = appID; }) appIDs; + in + [ + { + geometry-corner-radius = { + bottom-left = 10.0; + bottom-right = 10.0; + top-left = 10.0; + top-right = 10.0; + }; + clip-to-geometry = true; + draw-border-with-background = false; + } + { + matches = [ + { app-id = "yad"; } + ]; + open-floating = true; + } + { + matches = matchAppIDs [ + "firefox" + "org.qutebrowser.qutebrowser" + "kitty" + "evince" + "zathura" + "Zotero" + ]; + default-column-width = { + proportion = 1.0; + }; + } + { + matches = [ + { is-focused = true; } + ]; + opacity = 0.95; + } + { + matches = [ + { is-focused = false; } + ]; + opacity = 0.85; + } + ]; layer-rules = [ { matches = [ { namespace = "launcher"; } ]; @@ -110,21 +114,21 @@ max-speed = 1500; }; }; - workspaces = { + workspaces = with config.lib.monitors; { "1" = { - open-on-output = config.lib.monitors.mainMonitorName; + open-on-output = mainMonitorName; name = "coding"; }; "2" = { - open-on-output = config.lib.monitors.mainMonitorName; + open-on-output = mainMonitorName; name = "browsing"; }; "3" = { - open-on-output = builtins.head config.lib.monitors.otherMonitorsNames; + open-on-output = builtins.head otherMonitorsNames; name = "reading"; }; "4" = { - open-on-output = config.lib.monitors.mainMonitorName; + open-on-output = mainMonitorName; name = "music"; }; }; @@ -156,9 +160,7 @@ enable = true; display = { gradient = { - # from = "#f9e2af"; from = base0A; - # to = "#eba0ac"; to = base09; angle = 45; }; diff --git a/sharedConfig.nix b/sharedConfig.nix index afea17b..679532d 100644 --- a/sharedConfig.nix +++ b/sharedConfig.nix @@ -71,5 +71,11 @@ sha256 = "0agpr2z7v6q77ypgfsl6b57gac7ncrgf1fh0b5g7g0a53mzib5hm"; convertMethod = "gonord"; } + { + name = "muji-monochrome.jpg"; + url = "https://i.imgur.com/F2h7rsD.jpg"; + sha256 = "02q0wd2xpyjfiifmrsf6sg1ja3zlb9514g98w156f7jdpw2c9ppb"; + convertMethod = "gonord"; + } ]; }