204 lines
5.7 KiB
Nix
204 lines
5.7 KiB
Nix
{ config, lib, ... }:
|
|
let
|
|
c = config.theme.colors;
|
|
proportion = toString config.myConfig.niri.defaultColumnProportion;
|
|
presetWidths = builtins.concatStringsSep "\n "
|
|
(map (p: "proportion ${toString p}") config.myConfig.niri.presetColumnWidths);
|
|
in
|
|
{
|
|
options.myConfig.niri = {
|
|
defaultColumnProportion = lib.mkOption {
|
|
type = lib.types.float;
|
|
default = 0.5;
|
|
description = "Default column width proportion";
|
|
};
|
|
presetColumnWidths = lib.mkOption {
|
|
type = lib.types.listOf lib.types.float;
|
|
default = [ 0.33333 0.5 0.66667 ];
|
|
description = "Preset column width proportions";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
home.file.".config/xdg-desktop-portal/portals.conf".text = ''
|
|
[preferred]
|
|
default=gtk
|
|
org.freedesktop.impl.portal.Screenshot=gnome
|
|
org.freedesktop.impl.portal.ScreenCast=gnome
|
|
'';
|
|
home.file.".config/niri/config.kdl" = {
|
|
force = true;
|
|
text = ''
|
|
config-notification {
|
|
disable-failed
|
|
}
|
|
|
|
gestures {
|
|
hot-corners {
|
|
off
|
|
}
|
|
}
|
|
|
|
input {
|
|
keyboard {
|
|
xkb { }
|
|
numlock
|
|
}
|
|
touchpad {
|
|
tap
|
|
natural-scroll
|
|
}
|
|
mouse { }
|
|
trackpoint { }
|
|
}
|
|
|
|
layout {
|
|
background-color "transparent"
|
|
center-focused-column "never"
|
|
preset-column-widths {
|
|
${presetWidths}
|
|
}
|
|
default-column-width { proportion ${proportion}; }
|
|
border {
|
|
off
|
|
width 4
|
|
active-color "#707070"
|
|
inactive-color "#d0d0d0"
|
|
urgent-color "${c.red_b}"
|
|
}
|
|
shadow {
|
|
softness 30
|
|
spread 5
|
|
offset x=0 y=5
|
|
color "#0007"
|
|
}
|
|
struts { }
|
|
}
|
|
|
|
layer-rule {
|
|
match namespace="^quickshell$"
|
|
place-within-backdrop true
|
|
}
|
|
|
|
overview {
|
|
workspace-shadow {
|
|
off
|
|
}
|
|
}
|
|
|
|
environment {
|
|
XDG_CURRENT_DESKTOP "niri"
|
|
}
|
|
|
|
hotkey-overlay {
|
|
skip-at-startup
|
|
}
|
|
|
|
prefer-no-csd
|
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
|
|
|
animations {
|
|
workspace-switch {
|
|
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
|
|
}
|
|
window-open {
|
|
duration-ms 150
|
|
curve "ease-out-expo"
|
|
}
|
|
window-close {
|
|
duration-ms 150
|
|
curve "ease-out-quad"
|
|
}
|
|
horizontal-view-movement {
|
|
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
|
|
}
|
|
window-movement {
|
|
spring damping-ratio=0.75 stiffness=323 epsilon=0.0001
|
|
}
|
|
window-resize {
|
|
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
|
|
}
|
|
config-notification-open-close {
|
|
spring damping-ratio=0.65 stiffness=923 epsilon=0.001
|
|
}
|
|
screenshot-ui-open {
|
|
duration-ms 200
|
|
curve "ease-out-quad"
|
|
}
|
|
overview-open-close {
|
|
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001
|
|
}
|
|
}
|
|
|
|
window-rule {
|
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
|
default-column-width {}
|
|
}
|
|
window-rule {
|
|
match app-id=r#"^org\.gnome\."#
|
|
draw-border-with-background false
|
|
geometry-corner-radius 12
|
|
clip-to-geometry true
|
|
}
|
|
window-rule {
|
|
match app-id=r#"^gnome-control-center$"#
|
|
match app-id=r#"^pavucontrol$"#
|
|
match app-id=r#"^nm-connection-editor$"#
|
|
default-column-width { proportion 0.5; }
|
|
open-floating false
|
|
}
|
|
window-rule {
|
|
match app-id=r#"^gnome-calculator$"#
|
|
match app-id=r#"^galculator$"#
|
|
match app-id=r#"^blueman-manager$"#
|
|
match app-id=r#"^org\.gnome\.Nautilus$"#
|
|
match app-id=r#"^xdg-desktop-portal$"#
|
|
open-floating true
|
|
}
|
|
window-rule {
|
|
match app-id=r#"^steam$"# title=r#"^notificationtoasts_\d+_desktop$"#
|
|
default-floating-position x=10 y=10 relative-to="bottom-right"
|
|
open-focused false
|
|
}
|
|
window-rule {
|
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
|
match app-id="Alacritty"
|
|
match app-id="zen"
|
|
match app-id="com.mitchellh.ghostty"
|
|
match app-id="kitty"
|
|
draw-border-with-background false
|
|
}
|
|
window-rule {
|
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
|
match app-id="zoom"
|
|
open-floating true
|
|
}
|
|
window-rule {
|
|
match app-id=r#"org.quickshell$"#
|
|
open-floating true
|
|
}
|
|
|
|
recent-windows {
|
|
binds {
|
|
Alt+Tab { next-window scope="output"; }
|
|
Alt+Shift+Tab { previous-window scope="output"; }
|
|
Alt+grave { next-window filter="app-id"; }
|
|
Alt+Shift+grave { previous-window filter="app-id"; }
|
|
}
|
|
}
|
|
|
|
debug {
|
|
honor-xdg-activation-with-invalid-serial
|
|
}
|
|
|
|
include "dms/colors.kdl"
|
|
include "dms/layout.kdl"
|
|
include "dms/alttab.kdl"
|
|
include "dms/binds.kdl"
|
|
include "dms/outputs.kdl"
|
|
include "dms/cursor.kdl"
|
|
'';
|
|
};
|
|
};
|
|
}
|