49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.xyno.desktop.niri;
|
|
floatingAppids = [
|
|
"floating-alacritty"
|
|
"org.pulseaudio.pavucontrol"
|
|
"KeePassXC"
|
|
"org.gnome.NautilusPreviewer"
|
|
];
|
|
matchFloat = lib.concatStringSep "\n" (
|
|
map (x: ''
|
|
window-rule {
|
|
match app-id="${x}"
|
|
open-floating true
|
|
open-focused true
|
|
}
|
|
'') floatingAppids
|
|
);
|
|
in
|
|
{
|
|
options.xyno.desktop.niri.enable = lib.mkEnableOption "enable the niri desktop with xynos config";
|
|
config = lib.mkIf cfg.enable {
|
|
xyno.desktop = {
|
|
waybar.enable = lib.mkDefault true;
|
|
mako.enable = lib.mkDefault true;
|
|
};
|
|
programs.niri.enable = true;
|
|
environment.etc."niri/config.kdl".text = ''
|
|
// xwayland
|
|
spawn-at-startup "${pkgs.xwayland-sattelite}/bin/xwayland-sattelite"
|
|
|
|
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
|
|
input {
|
|
workspace-auto-back-and-forth
|
|
focus-follows-mouse max-scroll-amount="10%"
|
|
touchpad {
|
|
tap
|
|
}
|
|
}
|
|
// autogenerated from here on
|
|
${matchFloat}
|
|
'';
|
|
};
|
|
}
|