diff options
| -rw-r--r-- | flake.lock | 34 | ||||
| -rw-r--r-- | home/apps/caelestia/settings.nix | 5 | ||||
| -rw-r--r-- | home/apps/default.nix | 1 | ||||
| -rw-r--r-- | home/apps/kanshi.nix | 53 | ||||
| -rw-r--r-- | home/browsers/firefox/default.nix | 7 | ||||
| -rw-r--r-- | home/desktops/hyprland/settings.nix | 4 | ||||
| -rw-r--r-- | hosts/shinji/default.nix | 2 | ||||
| -rw-r--r-- | options.nix | 6 |
8 files changed, 89 insertions, 23 deletions
@@ -116,11 +116,11 @@ ] }, "locked": { - "lastModified": 1768920389, - "narHash": "sha256-VQO9cX7UWFewVoePJ7FKDSSlh0+oMOzfxq6G+3UyFWw=", + "lastModified": 1769024061, + "narHash": "sha256-7KC8OYI4wsIH+gP+9Var4FILL2qkJi3cIOrjRO5OaUw=", "ref": "refs/heads/main", - "rev": "6c1b374e64eb2e152daea10efee3c1d983739bf7", - "revCount": 1735, + "rev": "2c0dd689145e48e9d3683dfd3556723895fa54aa", + "revCount": 1736, "type": "git", "url": "https://g.freya.cat/caelestia-shell" }, @@ -258,11 +258,11 @@ ] }, "locked": { - "lastModified": 1768927746, - "narHash": "sha256-zyMpWHqcpKVmRc1W2NEK7DAuyVJZV62Jdjqudg70b1k=", + "lastModified": 1769015285, + "narHash": "sha256-MlqzCJbckJsgwfkRs64H2xaX2Uxl4o6Z9XYfkYS1N/E=", "owner": "nix-community", "repo": "home-manager", - "rev": "63a87808f5f9b6e4195a1d33f6ea25d23f4aa0df", + "rev": "ec0247a7a19f641595c24ac1ea4df6461d1cdb36", "type": "github" }, "original": { @@ -707,11 +707,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1768564909, - "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", + "lastModified": 1768886240, + "narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", "type": "github" }, "original": { @@ -799,11 +799,11 @@ ] }, "locked": { - "lastModified": 1768689040, - "narHash": "sha256-Tlnr5BulJcMers/cb+YvmBQW4nKHjdKo9loInJkyO2k=", + "lastModified": 1768985439, + "narHash": "sha256-qkU4r+l+UPz4dutMMRZSin64HuVZkEv9iFpu9yMWVY0=", "ref": "refs/heads/master", - "rev": "7a427ce1979ce7447e885c4f30129b40f3d466f5", - "revCount": 729, + "rev": "191085a8821b35680bba16ce5411fc9dbe912237", + "revCount": 731, "type": "git", "url": "https://git.outfoxxed.me/quickshell/quickshell" }, @@ -1112,11 +1112,11 @@ ] }, "locked": { - "lastModified": 1768919538, - "narHash": "sha256-w10iy/aqd5LtD78NDWWG+eKGzkb+cGhAAo7PVciLbWE=", + "lastModified": 1768999995, + "narHash": "sha256-7OXxa5rG+GeUL0iYkAbpVKFW/QPcThmlZMJufYOiwdc=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "37149a5b77e8fd2b5332e8cec9edf39ca5b8e8bc", + "rev": "13f0273a63b054c4e6de04f0fc838e18f1bf28e7", "type": "github" }, "original": { diff --git a/home/apps/caelestia/settings.nix b/home/apps/caelestia/settings.nix index a529241..c116025 100644 --- a/home/apps/caelestia/settings.nix +++ b/home/apps/caelestia/settings.nix @@ -81,11 +81,6 @@ in { audio = ["pavucontrol"]; playback = ["mpv"]; }; - # disable lock screen - idle = { - lockBeforeSleep = false; - timeouts = []; - }; }; # Background diff --git a/home/apps/default.nix b/home/apps/default.nix index 1823b0d..baf9d82 100644 --- a/home/apps/default.nix +++ b/home/apps/default.nix @@ -7,6 +7,7 @@ _: { ./alacritty.nix ./astal.nix ./hyprlock.nix + ./kanshi.nix ./kitty.nix ./mako.nix ]; diff --git a/home/apps/kanshi.nix b/home/apps/kanshi.nix new file mode 100644 index 0000000..ed7622a --- /dev/null +++ b/home/apps/kanshi.nix @@ -0,0 +1,53 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.kanshi; + + laptopMonitors = lib.lists.filter (mon: mon.laptop) config.monitors; + dockedMonitors = lib.lists.filter (mon: !mon.laptop) config.monitors; + + mkOutput = mon: status: + lib.mkMerge [ + { + criteria = + if mon.desc == "" + then mon.port + else mon.desc; + scale = mon.scale; + inherit status; + } + (lib.mkIf (mon.position.x != 0 || mon.position.y != 0) { + position = "${toString mon.position.x},${toString mon.position.y}"; + }) + (lib.mkIf (mon.size.x != 0 && mon.size.y != 0) { + mode = "${toString mon.size.x}x${toString mon.size.y}"; + }) + ]; + + mkEnabledOutput = mon: (mkOutput mon "enable"); + mkDisabledOutput = mon: (mkOutput mon "disable"); +in { + config = mkIf cfg.enable { + services.kanshi = { + enable = true; + + settings = [ + { + profile = { + name = "laptop"; + outputs = map mkEnabledOutput laptopMonitors; + }; + } + { + profile = { + name = "docked"; + outputs = (map mkEnabledOutput dockedMonitors) ++ (map mkDisabledOutput laptopMonitors); + }; + } + ]; + }; + }; +} diff --git a/home/browsers/firefox/default.nix b/home/browsers/firefox/default.nix index 578efe4..d251ae1 100644 --- a/home/browsers/firefox/default.nix +++ b/home/browsers/firefox/default.nix @@ -16,7 +16,12 @@ in { config = mkIf cfg.enable { default.browser = lib.mkDefault "firefox"; - programs.firefox = rec { + mozilla = { + firefoxNativeMessagingHosts = lib.mkForce []; + thunderbirdNativeMessagingHosts = lib.mkForce []; + }; + + programs.firefox = { enable = true; package = my-firefox; diff --git a/home/desktops/hyprland/settings.nix b/home/desktops/hyprland/settings.nix index d285b04..5458dc8 100644 --- a/home/desktops/hyprland/settings.nix +++ b/home/desktops/hyprland/settings.nix @@ -111,6 +111,7 @@ # Layer rules layerrule = [ + # fix weird borders "blur true, match:namespace wofi" "ignore_alpha 0, match:namespace wofi" "blur true, match:namespace notificaations" @@ -119,6 +120,9 @@ "ignore_alpha 0, match:namespace swaync-notification-window" "blur true, match:namespace swaync-control-center" "ignore_alpha 0, match:namespace swaync-control-center" + + # dont animate slurp + "no_anim true, match:namespace selection" ]; # XWayland diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix index ec86418..d220725 100644 --- a/hosts/shinji/default.nix +++ b/hosts/shinji/default.nix @@ -17,6 +17,7 @@ monitors = [ { port = "eDP-1"; + laptop = true; scale = 1.25; bitdepth = 10; } @@ -70,6 +71,7 @@ caelestia.enable = true; hyprlock.enable = true; rofi.enable = true; + kanshi.enable = true; kitty.enable = true; }; browsers = { diff --git a/options.nix b/options.nix index c80cdfd..241f726 100644 --- a/options.nix +++ b/options.nix @@ -19,6 +19,11 @@ with lib; let default = ""; }; + laptop = mkEnableOption { + description = "Flags this monitor to be part of a laptop and not docked."; + default = false; + }; + position = { enabled = mkEnableOption { description = "Enables hardcoded position of the monitor."; @@ -473,6 +478,7 @@ in { apps = { alacritty.enable = mkEnableOption "Enable the alacritty terminal."; astal.enable = mkEnableOption "Enable the astal gtk shell."; + kanshi.enable = mkEnableOption "Enable the kanshi service."; kitty.enable = mkEnableOption "Enable the kitty terminal."; mako.enable = mkEnableOption "Enable the mako notification daemon."; hyprlock.enable = mkEnableOption "Enable the hyprlock lockscreen."; |