diff --git a/common.nix b/common.nix index ab5a257..c8cc674 100644 --- a/common.nix +++ b/common.nix @@ -4,8 +4,6 @@ { pkgs, lib, - niri, - # lix-module, rs-programs, ... }: diff --git a/flake.lock b/flake.lock index 1cd5354..cd80714 100644 --- a/flake.lock +++ b/flake.lock @@ -283,67 +283,11 @@ "type": "github" } }, - "niri": { - "inputs": { - "niri-stable": "niri-stable", - "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable", - "xwayland-satellite-stable": "xwayland-satellite-stable", - "xwayland-satellite-unstable": "xwayland-satellite-unstable" - }, - "locked": { - "lastModified": 1767166320, - "narHash": "sha256-JhE7GgwcKCtkBmP4Gk7r27QmrlCV4As4Dq+fHESW+Ds=", - "owner": "sodiboo", - "repo": "niri-flake", - "rev": "947c5bc805ec346a305e00faa8cfe476b8a9c679", - "type": "github" - }, - "original": { - "owner": "sodiboo", - "repo": "niri-flake", - "type": "github" - } - }, - "niri-stable": { - "flake": false, - "locked": { - "lastModified": 1756556321, - "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", - "owner": "YaLTeR", - "repo": "niri", - "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", - "type": "github" - }, - "original": { - "owner": "YaLTeR", - "ref": "v25.08", - "repo": "niri", - "type": "github" - } - }, - "niri-unstable": { - "flake": false, - "locked": { - "lastModified": 1767160009, - "narHash": "sha256-aTj88rDBdhmzaGXoFPOsHjXYM2OjNttixsGftT/X0dI=", - "owner": "YaLTeR", - "repo": "niri", - "rev": "cf0b4bc0ca93ab5c18b562ada1d8609b67b3c4e3", - "type": "github" - }, - "original": { - "owner": "YaLTeR", - "repo": "niri", - "type": "github" - } - }, "nixcord": { "inputs": { "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1767190262, @@ -375,16 +319,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1766902085, - "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", + "lastModified": 1766885793, + "narHash": "sha256-P6RVkrM9JLCW6xBjSwHfgTOQ1JwBUma5xe5LI8xAPC0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4", + "rev": "9ef261221d1e72399f2036786498d78c38185c46", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } @@ -425,25 +369,9 @@ "rev": "89dbf01df72eb5ebe3b24a86334b12c27d68016a", "type": "github" }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1751274312, - "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", - "type": "github" - }, "original": { "id": "nixpkgs", - "ref": "nixos-24.11", + "ref": "nixos-25.11", "type": "indirect" } }, @@ -463,22 +391,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1766885793, - "narHash": "sha256-P6RVkrM9JLCW6xBjSwHfgTOQ1JwBUma5xe5LI8xAPC0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9ef261221d1e72399f2036786498d78c38185c46", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1766902085, "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", @@ -493,7 +405,7 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1764517877, "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", @@ -509,7 +421,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1726937504, "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", @@ -555,11 +467,10 @@ "crane": "crane", "fenix": "fenix", "home-manager": "home-manager", - "niri": "niri", "nixcord": "nixcord", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", - "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable-small": "nixpkgs-unstable-small", "stylix": "stylix", "typst-within": "typst-within" @@ -620,7 +531,7 @@ "firefox-gnome-theme": "firefox-gnome-theme", "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "nur": "nur", "systems": "systems", "tinted-foot": "tinted-foot", @@ -759,7 +670,7 @@ "crane": "crane_2", "fenix": "fenix_2", "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "rust-manifest": "rust-manifest", "systems": "systems_2" }, @@ -776,39 +687,6 @@ "repo": "typst", "type": "github" } - }, - "xwayland-satellite-stable": { - "flake": false, - "locked": { - "lastModified": 1755491097, - "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", - "owner": "Supreeeme", - "repo": "xwayland-satellite", - "rev": "388d291e82ffbc73be18169d39470f340707edaa", - "type": "github" - }, - "original": { - "owner": "Supreeeme", - "ref": "v0.7", - "repo": "xwayland-satellite", - "type": "github" - } - }, - "xwayland-satellite-unstable": { - "flake": false, - "locked": { - "lastModified": 1766429945, - "narHash": "sha256-9Kv4gWagx/u4RfZJzBMAoagW9ava5waxd+XoTkzqF7E=", - "owner": "Supreeeme", - "repo": "xwayland-satellite", - "rev": "0dde7ca1d3a8e8c5082533d76084e2aa02bef70e", - "type": "github" - }, - "original": { - "owner": "Supreeeme", - "repo": "xwayland-satellite", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 51295e0..1b8f88f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,8 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "nixpkgs/nixos-24.11"; + nixpkgs-stable.url = "nixpkgs/nixos-25.11"; nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small"; - niri.url = "github:sodiboo/niri-flake"; stylix.url = "github:danth/stylix"; typst-within.url = "github:schrottkatze/typst"; crane.url = "github:ipetkov/crane"; @@ -29,7 +28,6 @@ typst-within, home-manager, nixos-hardware, - niri, stylix, fenix, crane, @@ -72,12 +70,10 @@ pkgs-unstable-small pkgs-stable rs-programs - niri ; }; system = "x86_64-linux"; modules = [ - inputs.niri.nixosModules.niri stylix.nixosModules.stylix ./hosts/monosodium-glutamate-g/configuration.nix home-manager.nixosModules.home-manager @@ -110,12 +106,10 @@ pkgs-unstable-small pkgs-stable rs-programs - niri ; }; system = "x86_64-linux"; modules = [ - inputs.niri.nixosModules.niri stylix.nixosModules.stylix ./hosts/denkbrett/configuration.nix home-manager.nixosModules.home-manager diff --git a/modules/desktop/home/default.nix b/modules/desktop/home/default.nix index 4cf7f9f..55cb35d 100644 --- a/modules/desktop/home/default.nix +++ b/modules/desktop/home/default.nix @@ -10,12 +10,11 @@ ./layaway.nix ./swayidle.nix ./browser.nix + ./fuzzel.nix ./eww ./niri ]; - # temporary(tm) - programs.wofi.enable = true; programs.swaylock.enable = true; services.network-manager-applet.enable = true; xsession.enable = true; @@ -27,6 +26,10 @@ # fucking hell. pkgs.obsidian pkgs.zsh + pkgs.hyprpicker + pkgs.bemoji + pkgs.librsvg + pkgs.cairo ]; services.gpg-agent = { diff --git a/modules/desktop/home/fuzzel.nix b/modules/desktop/home/fuzzel.nix new file mode 100644 index 0000000..2599e27 --- /dev/null +++ b/modules/desktop/home/fuzzel.nix @@ -0,0 +1,28 @@ +{ lib, ... }: +{ + programs.fuzzel = { + enable = true; + settings = { + main = { + font = lib.mkForce "Departure Mono:size=13"; + terminal = "kitty"; + lines = 15; + width = 50; + horizontal-pad = 20; + vertical-pad = 12; + }; + colors = { + background = lib.mkForce "282828ff"; + match = lib.mkForce "d65d0eff"; + selection-match = lib.mkForce "fe8019ff"; + border = lib.mkForce "bab9e5ff"; + }; + border = { + radius = 10; + selection-radius = 3; + width = 3; + }; + }; + }; + +} diff --git a/modules/desktop/home/niri/binds.nix b/modules/desktop/home/niri/binds.nix deleted file mode 100644 index 1df47c0..0000000 --- a/modules/desktop/home/niri/binds.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ pkgs, ... }: -{ - programs.niri.settings.binds = { - # spawn terminal - "Mod+Return".action.spawn = "kitty"; - "Mod+Return".repeat = false; - "Mod+D".action.spawn = [ - "wofi" - "-S" - "drun" - "--allow-images" - ]; - "Mod+D".repeat = false; - "Mod+I".action.spawn = [ - "${pkgs.rofimoji}/bin/rofimoji" - "--selector" - "wofi" - "-f" - "alchemical_symbols" - "anatolian_hieroglyphs" - "emojis" - "braille_patterns" - "box_drawing" - "chess_symbols" - "emoticons" - "geometric_shapes" - "gothic" - "greek_extended" - "math" - "mathematical_alphanumeric_symbols" - "mathematical_operators" - "miscellaneous_symbols" - "miscellaneous_mathematical_symbols-a" - "miscellaneous_mathematical_symbols-b" - "miscellaneous_symbols_and_arrows" - "miscellaneous_symbols_and_pictographs" - "miscellaneous_technical" - "modi" - "modifier_tone_letters" - "musical_symbols" - "nerd_font" - "number_forms" - "shorthand_format_controls" - "specials" - "variation_selectors" - "vertical_forms" - "-a" - "copy" - ]; - - "Mod+Shift+E".action.quit = [ ]; - "Mod+Shift+Q".action.close-window = [ ]; - "Mod+Ctrl+Shift+P".action.power-off-monitors = [ ]; - - "Mod+Shift+Ctrl+Slash".action.toggle-keyboard-shortcuts-inhibit = [ ]; - "Mod+Shift+Ctrl+Slash".allow-inhibiting = false; - - "Mod+Shift+Slash".action.show-hotkey-overlay = [ ]; - - "Mod+Shift+C".action.set-dynamic-cast-window = [ ]; - "Mod+Ctrl+C".action.set-dynamic-cast-monitor = [ ]; - "Mod+Shift+Ctrl+C".action.clear-dynamic-cast-target = [ ]; - - # window/columns controls - "Mod+H".action.focus-column-left = [ ]; - "Mod+J".action.focus-window-down = [ ]; - "Mod+K".action.focus-window-up = [ ]; - "Mod+L".action.focus-column-right = [ ]; - "Mod+Ctrl+H".action.move-column-left = [ ]; - "Mod+Ctrl+J".action.move-window-down = [ ]; - "Mod+Ctrl+K".action.move-window-up = [ ]; - "Mod+Ctrl+L".action.move-column-right = [ ]; - "Mod+R".action.switch-preset-column-width = [ ]; - - "Mod+G".action.toggle-overview = [ ]; - - "Mod+V".action.toggle-window-floating = [ ]; - "Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [ ]; - - # monitor controls - "Mod+Shift+H".action.focus-monitor-left = [ ]; - "Mod+Shift+J".action.focus-monitor-down = [ ]; - "Mod+Shift+K".action.focus-monitor-up = [ ]; - "Mod+Shift+L".action.focus-monitor-right = [ ]; - "Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = [ ]; - "Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = [ ]; - "Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = [ ]; - "Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = [ ]; - - # column editing stuffs - "Mod+BracketLeft".action.consume-or-expel-window-left = [ ]; - "Mod+BracketRight".action.consume-or-expel-window-right = [ ]; - "Mod+F".action.maximize-column = [ ]; - "Mod+C".action.center-column = [ ]; - "Mod+Minus".action.set-column-width = "-5%"; - "Mod+Equal".action.set-column-width = "+5%"; - "Mod+Shift+Minus".action.set-window-height = "-10%"; - "Mod+Shift+Equal".action.set-window-height = "+10%"; - "Mod+Shift+W".action.toggle-column-tabbed-display = [ ]; - - "Mod+Shift+F".action.expand-column-to-available-width = [ ]; - "Mod+Ctrl+F".action.fullscreen-window = [ ]; - "Mod+Shift+Ctrl+F".action.toggle-windowed-fullscreen = [ ]; - - # media keys - "XF86AudioRaiseVolume".action.spawn = [ - "wpctl" - "set-volume" - "@DEFAULT_AUDIO_SINK@" - "0.1+" - ]; - "XF86AudioLowerVolume".action.spawn = [ - "wpctl" - "set-volume" - "@DEFAULT_AUDIO_SINK@" - "0.1-" - ]; - "XF86AudioMute".action.spawn = [ - "wpctl" - "set-mute" - "@DEFAULT_AUDIO_SINK@" - "toggle" - ]; - "XF86AudioMicMute".action.spawn = [ - "wpctl" - "set-mute" - "@DEFAULT_AUDIO_SOURCE@" - "toggle" - ]; - "XF86AudioRaiseVolume".allow-when-locked = true; - "XF86AudioLowerVolume".allow-when-locked = true; - "XF86AudioMute".allow-when-locked = true; - "XF86AudioMicMute".allow-when-locked = true; - }; -} diff --git a/modules/desktop/home/niri/default.nix b/modules/desktop/home/niri/default.nix index 98ec63f..af46172 100644 --- a/modules/desktop/home/niri/default.nix +++ b/modules/desktop/home/niri/default.nix @@ -1,38 +1,43 @@ -{ pkgs, ... }: +# this file must only be saved via autosave due to the formatter. +# else it will be ugly +{ pkgs, lib, ... }: { - imports = [ - ./binds.nix - ./input.nix - ./privacy.nix - ./quirks.nix - ./screenshot.nix - ./style.nix - ./workspaces.nix - ./xwayland-sat.nix - ]; - programs.niri.settings = { - outputs."eDP-1" = { - scale = 1.0; + home.file."config" = + let + kdlfiles = + builtins.readDir ./kdl + |> lib.filterAttrs (key: value: value == "regular") + |> lib.mapAttrsToList (filename: _value: "include \"${./kdl}/${filename}\""); + startups = + [ + [ + "eww" + "open-many" + "topBar" + "bottomBar" + ] + [ + "${pkgs.swaybg}/bin/swaybg" + "-i" + "${./wallpaper.jpg}" + "-m" + "fill" + ] + [ + "touch" + ".config/niri/live.kdl" + ] + ] + |> map (map (word: "\"${word}\"")) + |> map (lib.concatStringsSep " ") + |> map (it: "spawn-at-startup ${it}"); + other = [ + "include \"live.kdl\"" + "output \"eDP-1\" { scale 1.1; }" + ]; + in + { + target = ".config/niri/config.kdl"; + text = lib.concatLines (startups ++ kdlfiles ++ other); }; - - spawn-at-startup = [ - { - command = [ - "eww" - "open-many" - "topBar" - "bottomBar" - ]; - } - { - command = [ - "${pkgs.swaybg}/bin/swaybg" - "-i" - "${./wallpaper.jpg}" - "-m" - "fill" - ]; - } - ]; - }; } diff --git a/modules/desktop/home/niri/input.nix b/modules/desktop/home/niri/input.nix deleted file mode 100644 index e93fd3e..0000000 --- a/modules/desktop/home/niri/input.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ ... }: -{ - programs.niri.settings.input = { - keyboard = { - xkb = { - layout = "us"; - variant = "altgr-intl"; - }; - }; - mouse = { - accel-profile = "flat"; - }; - touchpad = { - tap = false; - natural-scroll = true; - dwt = true; - dwtp = true; - }; - }; -} diff --git a/modules/desktop/home/niri/kdl/binds.kdl b/modules/desktop/home/niri/kdl/binds.kdl new file mode 100644 index 0000000..f578e07 --- /dev/null +++ b/modules/desktop/home/niri/kdl/binds.kdl @@ -0,0 +1,77 @@ +binds { + // spawn terminal + Mod+Return repeat=false { spawn "kitty"; } + Mod+D repeat=false { spawn "fuzzel"; } + Mod+I repeat=false { spawn "bemoji"; } + Mod+M repeat=false { spawn "hyprpicker"; } + Mod+E repeat=false { spawn "kitty" "hx" "~/.config/niri/live.kdl"; } + + Mod+Shift+E { quit; } + Mod+Shift+Q { close-window; } + Mod+Ctrl+Shift+P { power-off-monitors; } + + Mod+Shift+Ctrl+Slash allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+Shift+C { set-dynamic-cast-window; } + Mod+Ctrl+C { set-dynamic-cast-monitor; } + Mod+Shift+Ctrl+C { clear-dynamic-cast-target; } + + // window/columns controls + Mod+H { focus-column-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-right; } + Mod+Ctrl+H { move-column-left; } + Mod+Ctrl+J { move-window-down; } + Mod+Ctrl+K { move-window-up; } + Mod+Ctrl+L { move-column-right; } + Mod+R { switch-preset-column-width; } + + Mod+G { toggle-overview; } + + Mod+V { toggle-window-floating; } + Mod+Shift+V { switch-focus-between-floating-and-tiling; } + + // monitor controls + Mod+Shift+H { focus-monitor-left; } + Mod+Shift+J { focus-monitor-down; } + Mod+Shift+K { focus-monitor-up; } + Mod+Shift+L { focus-monitor-right; } + Mod+Shift+Ctrl+H { move-column-to-monitor-left; } + Mod+Shift+Ctrl+J { move-column-to-monitor-down; } + Mod+Shift+Ctrl+K { move-column-to-monitor-up; } + Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + + // column editing stuffs + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+C { center-column; } + Mod+Minus { set-column-width "-5%"; } + Mod+Equal { set-column-width "+5%"; } + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + Mod+Shift+W { toggle-column-tabbed-display; } + + Mod+F { maximize-column; } + Alt+F { expand-column-to-available-width; } + Mod+Shift+F { maximize-window-to-edges; } + Mod+Ctrl+F { fullscreen-window; } + + Mod+Shift+Ctrl+F { toggle-windowed-fullscreen; } + + // media keys + XF86AudioLowerVolume \ + allow-when-locked=true \ + { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; } + XF86AudioMicMute \ + allow-when-locked=true \ + { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + XF86AudioMute \ + allow-when-locked=true \ + { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } + XF86AudioRaiseVolume \ + allow-when-locked=true \ + { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; } +} diff --git a/modules/desktop/home/niri/kdl/input.kdl b/modules/desktop/home/niri/kdl/input.kdl new file mode 100644 index 0000000..a8be309 --- /dev/null +++ b/modules/desktop/home/niri/kdl/input.kdl @@ -0,0 +1,17 @@ +input { + keyboard { + xkb { + layout "us" + variant "altgr-intl" + } + repeat-delay 600 + repeat-rate 25 + track-layout "global" + } + touchpad { + dwt + dwtp + natural-scroll + } + mouse { accel-profile "flat"; } +} diff --git a/modules/desktop/home/niri/kdl/overviews.kdl b/modules/desktop/home/niri/kdl/overviews.kdl new file mode 100644 index 0000000..5cb4443 --- /dev/null +++ b/modules/desktop/home/niri/kdl/overviews.kdl @@ -0,0 +1,19 @@ +overview { + backdrop-color "110000" + zoom 0.381966 + workspace-shadow { + offset x=0 y=10 + softness 60 + color "#7f00008f" + } +} + +recent-windows { + debounce-ms 1500 + open-delay-ms 300 + highlight { + active-color "f69ecf" + padding 5 + corner-radius 2.5 + } +} diff --git a/modules/desktop/home/niri/kdl/privacy.kdl b/modules/desktop/home/niri/kdl/privacy.kdl new file mode 100644 index 0000000..1190aeb --- /dev/null +++ b/modules/desktop/home/niri/kdl/privacy.kdl @@ -0,0 +1,12 @@ +layer-rule { + match namespace="notifications" + block-out-from "screen-capture" +} + +window-rule { + match app-id="^signal|Element|org.gnome.Evolution$" + match title="^.*(Discord|Beispiel Screenshare block Bug|Bitwarden|Träwelling).*$" + exclude title="^.*((Schrottkatze|Statistics|Leaderboard) - Träwelling|chaos.social|Nekoverse|catgirl.cloud).*$" + exclude is-floating=true + block-out-from "screen-capture" +} diff --git a/modules/desktop/home/niri/kdl/quirks.kdl b/modules/desktop/home/niri/kdl/quirks.kdl new file mode 100644 index 0000000..ecf8e75 --- /dev/null +++ b/modules/desktop/home/niri/kdl/quirks.kdl @@ -0,0 +1,32 @@ +// handle steam grabbing focus 1000 times on startup +window-rule { + match app-id="steam" title="Steam" + open-focused false +} + +// position steam notifs correctly: https://github.com/YaLTeR/niri/wiki/Application-Issues +window-rule { + match app-id="steam" title="^notificationtoasts_[\\d]+_desktop$" + open-focused false + border { off; } + shadow { off; } + baba-is-float false + default-floating-position relative-to="bottom-right" x=0 y=0 +} + +// fix guild wars +window-rule { + match app-id="steam_app_1284210" title="Guild Wars 2" + match app-id="(steam_app_[0-9]+|[Mm]inecraft.*|gamescope)" + border { off; } + shadow { off; } +} + +window-rule { + match app-id="vesktop" is-floating=true title="vesktop" + geometry-corner-radius 5 +} + +environment { + ELECTRON_OZONE_PLATFORM_HINT "auto" +} diff --git a/modules/desktop/home/niri/kdl/screenshot.kdl b/modules/desktop/home/niri/kdl/screenshot.kdl new file mode 100644 index 0000000..9458bdc --- /dev/null +++ b/modules/desktop/home/niri/kdl/screenshot.kdl @@ -0,0 +1,9 @@ +screenshot-path "~/Pictures/screenshots/%Y-%m-%dT%H:%M:%S.png" +binds { + Ctrl+Print { screenshot-screen; } + Mod+Ctrl+S { screenshot-screen; } + Mod+Shift+S { screenshot-window; } + Shift+Print { screenshot-window; } + Mod+S { screenshot; } + Print { screenshot; } +} diff --git a/modules/desktop/home/niri/kdl/style.kdl b/modules/desktop/home/niri/kdl/style.kdl new file mode 100644 index 0000000..74e0e0b --- /dev/null +++ b/modules/desktop/home/niri/kdl/style.kdl @@ -0,0 +1,85 @@ +prefer-no-csd + +cursor { + xcursor-theme "phinger-cursors-dark" + xcursor-size 32 + hide-when-typing + hide-after-inactive-ms 10000 +} + +layout { + gaps 15 + struts { + left 0 + right 0 + top 0 + bottom 0 + } + focus-ring { off; } + border { + on + width 3 + active-gradient angle=135 from="#f69ecf" in="oklch shorter hue" relative-to="window" to="#5bcefa" + inactive-gradient angle=135 from="#f69ecf" in="oklch shorter hue" relative-to="window" to="#ff9a56" + } + tab-indicator { + hide-when-single-tab + gap 2 + width 5 + length total-proportion=0.500000 + position "left" + gaps-between-tabs 0 + corner-radius 3 + active-color "#5bcefa" + inactive-color "#3c3836" + } + default-column-width + center-focused-column "never" +} + +window-rule { + match is-floating=true + exclude app-id="steam_app_[0-9]+" + shadow { + on + offset x=0 y=0 + softness 40 + color "#bab9e5af" + inactive-color "#fa9d99af" + } + baba-is-float true +} + +window-rule { + geometry-corner-radius 1 + clip-to-geometry true +} + +window-rule { + match is-window-cast-target=true + border { + on + active-gradient angle=135 \ + from="#64de50" \ + in="oklch shorter hue" \ + relative-to="window" \ + to="#5bcefa" + inactive-gradient angle=135 \ + from="#64de50" \ + in="oklch shorter hue" \ + relative-to="window" \ + to="#ff9a56" + } +} + +layer-rule { + match namespace="launcher" + geometry-corner-radius 10 + shadow { + on + offset x=0 y=0 + softness 40 + color "#bab9e5af" + } + baba-is-float true +} diff --git a/modules/desktop/home/niri/kdl/workspaces.kdl b/modules/desktop/home/niri/kdl/workspaces.kdl new file mode 100644 index 0000000..ab89dec --- /dev/null +++ b/modules/desktop/home/niri/kdl/workspaces.kdl @@ -0,0 +1,58 @@ +// WS Social +workspace "social" + +spawn-at-startup "signal-desktop" +spawn-at-startup ".evolution-wrapped_" +spawn-at-startup "vesktop" +spawn-at-startup "deltachat" + +window-rule { + match app-id="^(signal|Element|org.gnome.Evolution|discord|steam|DeltaChat)$" + open-on-workspace "social" +} + +// WS Browser +workspace "browser" + +spawn-at-startup "firefox" +spawn-at-startup "obsidian" + +window-rule { + match app-id="^firefox|Chromium-browser|obsidian$" + open-on-workspace "browser" +} + +binds { + Mod+P { focus-workspace-up; } + Mod+N { focus-workspace-down; } + Mod+Ctrl+P { move-workspace-up; } + Mod+Ctrl+N { move-workspace-down; } + Mod+Shift+P { move-column-to-workspace-up; } + Mod+Shift+N { move-column-to-workspace-down; } + + Mod+Q { focus-workspace "social"; } + Mod+W { focus-workspace "browser"; } + Mod+E { focus-workspace 3; } + Mod+Ctrl+Q { move-column-to-workspace "social"; } + Mod+Ctrl+W { move-column-to-workspace "browser"; } + Mod+Ctrl+E { move-column-to-workspace 3; } + + Mod+1 { focus-workspace 4; } + Mod+2 { focus-workspace 5; } + Mod+3 { focus-workspace 6; } + Mod+4 { focus-workspace 7; } + Mod+5 { focus-workspace 8; } + Mod+6 { focus-workspace 9; } + Mod+7 { focus-workspace 10; } + Mod+8 { focus-workspace 11; } + Mod+9 { focus-workspace 12; } + Mod+Ctrl+1 { move-column-to-workspace 4; } + Mod+Ctrl+2 { move-column-to-workspace 5; } + Mod+Ctrl+3 { move-column-to-workspace 6; } + Mod+Ctrl+4 { move-column-to-workspace 7; } + Mod+Ctrl+5 { move-column-to-workspace 8; } + Mod+Ctrl+6 { move-column-to-workspace 9; } + Mod+Ctrl+7 { move-column-to-workspace 10; } + Mod+Ctrl+8 { move-column-to-workspace 11; } + Mod+Ctrl+9 { move-column-to-workspace 12; } +} diff --git a/modules/desktop/home/niri/privacy.nix b/modules/desktop/home/niri/privacy.nix deleted file mode 100644 index 6cd2016..0000000 --- a/modules/desktop/home/niri/privacy.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ ... }: -{ - programs.niri.settings = { - layer-rules = [ - { - matches = [ - { namespace = "notifications"; } - ]; - block-out-from = "screen-capture"; - } - ]; - window-rules = [ - { - matches = [ - { app-id = "^signal|Element|org\.gnome\.Evolution$"; } - { title = "^.*(Discord|Beispiel Screenshare block Bug|Bitwarden|Träwelling).*$"; } - ]; - excludes = [ - { - title = "^.*((Schrottkatze|Statistics|Leaderboard) - Träwelling|chaos.social|Nekoverse|catgirl.cloud).*$"; - } - { is-floating = true; } - ]; - block-out-from = "screen-capture"; - } - ]; - }; -} diff --git a/modules/desktop/home/niri/quirks.nix b/modules/desktop/home/niri/quirks.nix deleted file mode 100644 index e43637f..0000000 --- a/modules/desktop/home/niri/quirks.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = [ pkgs.gamescope ]; - programs.niri.settings = { - window-rules = [ - { - # handle steam grabbing focus 1000 times on startup - matches = [ - { - app-id = "steam"; - title = "Steam"; - } - ]; - open-focused = false; - } - { - # position steam notifs correctly: https://github.com/YaLTeR/niri/wiki/Application-Issues - matches = [ - { - app-id = "steam"; - title = "^notificationtoasts_[\\d]+_desktop$"; - } - ]; - default-floating-position = { - x = 0; - y = 0; - relative-to = "bottom-right"; - }; - shadow.enable = false; - border.enable = false; - baba-is-float = false; - open-focused = false; - } - { - matches = [ - { - title = "Guild Wars 2"; - app-id = "steam_app_1284210"; - } - ]; - border.enable = false; - shadow.enable = false; - } - { - matches = [ - { - app-id = "vesktop"; - title = "vesktop"; - is-floating = true; - } - ]; - geometry-corner-radius = - let - val = 5.; - in - { - bottom-left = val; - bottom-right = val; - top-left = val; - top-right = val; - }; - } - ]; - - # fix electron apps not doing wayland - environment.ELECTRON_OZONE_PLATFORM_HINT = "auto"; - }; -} diff --git a/modules/desktop/home/niri/screenshot.nix b/modules/desktop/home/niri/screenshot.nix deleted file mode 100644 index 9719fcb..0000000 --- a/modules/desktop/home/niri/screenshot.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, ... }: -{ - programs.niri.settings = { - screenshot-path = "~/Pictures/screenshots/%Y-%m-%dT%H:%M:%S.png"; - binds = { - "Print".action.screenshot = [ ]; - "Ctrl+Print".action.screenshot-screen = [ ]; - "Shift+Print".action.screenshot-window = [ ]; - "Mod+S".action.screenshot = [ ]; - "Mod+Ctrl+S".action.screenshot-screen = [ ]; - "Mod+Shift+S".action.screenshot-window = [ ]; - }; - }; -} diff --git a/modules/desktop/home/niri/style.nix b/modules/desktop/home/niri/style.nix deleted file mode 100644 index d41414e..0000000 --- a/modules/desktop/home/niri/style.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ ... }: -{ - programs.niri.settings = { - prefer-no-csd = true; - - cursor = { - theme = "phinger-cursors-dark"; - size = 16; - hide-when-typing = true; - hide-after-inactive-ms = 10000; - }; - - # animations.window-open = { - # kind = "easing"; - # curve = "linear"; - # duration-ms = 230; - # }; - # animations.window-open.custom-shader = builtins.readFile ./shaders/glitch-open.frag; - - layout = { - gaps = 15; # :GAPS:- gaps = %GAPS%;-:# - focus-ring.enable = false; - border = { - enable = true; - width = 3; - inactive.gradient = { - from = "#f69ecf"; - to = "#ff9a56"; - in' = "oklch shorter hue"; - relative-to = "window"; - angle = 135; - }; - active.gradient = { - from = "#f69ecf"; - to = "#5bcefa"; - in' = "oklch shorter hue"; - relative-to = "window"; - angle = 135; - }; - }; - center-focused-column = "never"; - empty-workspace-above-first = false; - tab-indicator = { - hide-when-single-tab = true; - active.color = "#5bcefa"; - inactive.color = "#3c3836"; - gap = 2; - width = 5; - corner-radius = 3; - position = "left"; - gaps-between-tabs = 0; - }; - }; - - window-rules = [ - { - matches = [ - { - is-floating = true; - } - ]; - excludes = [ - { app-id = "steam_app_[0-9]+"; } - ]; - baba-is-float = true; - shadow = { - offset.y = 0; - offset.x = 0; - softness = 40; - color = "#bab9e5af"; - inactive-color = "#fa9d99af"; - enable = true; - }; - } - { - matches = [ - { app-id = "(steam_app_[0-9]+|[Mm]inecraft.*|gamescope)"; } - ]; - border.enable = false; - } - { - geometry-corner-radius = - let - val = 1.; - in - { - bottom-left = val; - bottom-right = val; - top-left = val; - top-right = val; - }; - clip-to-geometry = true; - } - { - matches = [ { is-window-cast-target = true; } ]; - border = { - inactive.gradient = { - from = "#64de50"; - to = "#ff9a56"; - in' = "oklch shorter hue"; - relative-to = "window"; - angle = 135; - }; - active.gradient = { - from = "#64de50"; - to = "#5bcefa"; - in' = "oklch shorter hue"; - relative-to = "window"; - angle = 135; - }; - }; - } - ]; - }; -} diff --git a/modules/desktop/home/niri/workspaces.nix b/modules/desktop/home/niri/workspaces.nix deleted file mode 100644 index 54c1f8d..0000000 --- a/modules/desktop/home/niri/workspaces.nix +++ /dev/null @@ -1,83 +0,0 @@ -# { ... }: -{ - programs.niri.settings = - let - social = "aaa social"; - browser = "bbb browser"; - notes = "ccc notes"; - in - { - workspaces = { - "aaa social" = { }; - "bbb browser" = { }; - "ccc notes" = { }; - }; - - spawn-at-startup = [ - { command = [ "vesktop" ]; } - { command = [ "element-desktop" ]; } - { command = [ "signal-desktop" ]; } - { command = [ ".evolution-wrapped_" ]; } - - { command = [ "obsidian" ]; } - { command = [ "firefox" ]; } - ]; - - window-rules = [ - { - matches = [ - { app-id = "^(signal|Element|org\.gnome\.Evolution|discord|steam)$"; } - ]; - open-on-workspace = social; - } - { - matches = [ - { app-id = "^firefox|Chromium-browser$"; } - ]; - open-on-workspace = browser; - } - { - matches = [ - { app-id = "obsidian"; } - ]; - open-on-workspace = notes; - } - ]; - - # all workspace binds here, - binds = { - "Mod+P".action.focus-workspace-up = [ ]; - "Mod+N".action.focus-workspace-down = [ ]; - "Mod+Ctrl+P".action.move-workspace-up = [ ]; - "Mod+Ctrl+N".action.move-workspace-down = [ ]; - "Mod+Shift+P".action.move-column-to-workspace-up = [ ]; - "Mod+Shift+N".action.move-column-to-workspace-down = [ ]; - - "Mod+Q".action.focus-workspace = social; - "Mod+W".action.focus-workspace = browser; - "Mod+E".action.focus-workspace = notes; - "Mod+Ctrl+Q".action.move-column-to-workspace = social; - "Mod+Ctrl+W".action.move-column-to-workspace = browser; - "Mod+Ctrl+E".action.move-column-to-workspace = notes; - - "Mod+1".action.focus-workspace = 4; - "Mod+2".action.focus-workspace = 5; - "Mod+3".action.focus-workspace = 6; - "Mod+4".action.focus-workspace = 7; - "Mod+5".action.focus-workspace = 8; - "Mod+6".action.focus-workspace = 9; - "Mod+7".action.focus-workspace = 10; - "Mod+8".action.focus-workspace = 11; - "Mod+9".action.focus-workspace = 12; - "Mod+Ctrl+1".action.move-column-to-workspace = 4; - "Mod+Ctrl+2".action.move-column-to-workspace = 5; - "Mod+Ctrl+3".action.move-column-to-workspace = 6; - "Mod+Ctrl+4".action.move-column-to-workspace = 7; - "Mod+Ctrl+5".action.move-column-to-workspace = 8; - "Mod+Ctrl+6".action.move-column-to-workspace = 9; - "Mod+Ctrl+7".action.move-column-to-workspace = 10; - "Mod+Ctrl+8".action.move-column-to-workspace = 11; - "Mod+Ctrl+9".action.move-column-to-workspace = 12; - }; - }; -} diff --git a/modules/desktop/home/niri/xwayland-sat.nix b/modules/desktop/home/niri/xwayland-sat.nix deleted file mode 100644 index bae4d93..0000000 --- a/modules/desktop/home/niri/xwayland-sat.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, ... }: -{ - programs.niri.settings = { - spawn-at-startup = [ - { command = [ "${pkgs.xwayland-satellite}/bin/xwayland-satellite" ]; } - ]; - environment.DISPLAY = ":0"; - }; -} diff --git a/modules/editors/default.nix b/modules/editors/default.nix index e7b5b71..ef3baf7 100644 --- a/modules/editors/default.nix +++ b/modules/editors/default.nix @@ -3,7 +3,6 @@ let discord-presence-lsp = pkgs.callPackage ./discord-presence-lsp.nix { }; in { - programs.niri.enable = true; imports = [ ./zed ]; diff --git a/modules/editors/helix/settings.nix b/modules/editors/helix/settings.nix index c6cc82c..4f5b8a8 100644 --- a/modules/editors/helix/settings.nix +++ b/modules/editors/helix/settings.nix @@ -1,7 +1,11 @@ { ... }: { + programs.helix.themes.gruvmeow = { + inherits = "gruvbox_dark_hard"; + "ui.gutter".bg = "#282828"; + }; programs.helix.settings = { - theme = "gruvbox_dark_hard"; + theme = "gruvmeow"; editor = { line-number = "relative"; bufferline = "multiple"; diff --git a/modules/media/fonts.nix b/modules/media/fonts.nix index 77cd112..0c9fc02 100644 --- a/modules/media/fonts.nix +++ b/modules/media/fonts.nix @@ -5,10 +5,13 @@ src = pkgs.fetchFromGitHub { owner = "google"; repo = "fonts"; - rev = "8a0041ea7b92e339a7ce13e4e1dadcc85cb8f5df"; - sha256 = "sha256-9TzeihEKIEDRtDuv+NmLWjTpoGnBR+RP/jIBfB1O06U="; + rev = "0bd2d5599819aa0774f5ca64c8ac3f54ae3fd54f"; + sha256 = "sha256-E89GYJKG65Dh7TPI6TVre/4LCxXnxvTAPYS/OPj7nPg="; }; - installPhase = oldAttrs.installPhase + "mv $out/share/fonts/truetype $out/share/fonts/ttf"; + installPhase = + oldAttrs.installPhase + + "mv $out/share/fonts/truetype $out/share/fonts/ttf\n" + + "rm $out/share/fonts/ttf/Noto*Emoji*.ttf"; }); }; @@ -17,8 +20,8 @@ nerd-fonts.fira-code nerd-fonts.departure-mono google-fonts + noto-fonts-color-emoji montserrat - noto-fonts atkinson-hyperlegible arkpandora_ttf liberation_ttf @@ -42,7 +45,7 @@ fonts.fontconfig = { enable = true; defaultFonts = { - emoji = [ ]; + emoji = [ "Noto Color Emoji" ]; monospace = [ ]; sansSerif = [ "Atkinson Hyperlegible" ]; serif = [ ]; diff --git a/modules/nix.nix b/modules/nix.nix index 4878fa6..6d5cb09 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,12 +1,11 @@ { rs-programs, - niri, ... }: { nix = { extraOptions = '' - experimental-features = nix-command flakes + experimental-features = nix-command flakes pipe-operator keep-outputs = true keep-derivations = true ''; @@ -27,7 +26,6 @@ }; overlays = [ rs-programs - niri.overlays.niri ]; }; }