convert niri module to nix
This commit is contained in:
parent
409b6948c3
commit
bb361f2868
3 changed files with 189 additions and 160 deletions
|
|
@ -7,9 +7,6 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
;; -*- lexical-binding: t; -*-
|
;; -*- lexical-binding: t; -*-
|
||||||
(setq make-backup-files nil)
|
(setq make-backup-files nil)
|
||||||
|
|
||||||
(add-to-list 'default-frame-alist '(font . "JetBrainsMono Nerd Font Mono-14"))
|
|
||||||
|
|
||||||
(require 'package)
|
(require 'package)
|
||||||
(add-to-list 'package-archives
|
(add-to-list 'package-archives
|
||||||
'("melpa-snapshots"
|
'("melpa-snapshots"
|
||||||
|
|
|
||||||
|
|
@ -1,163 +1,194 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
flake.homeModules.niri = {
|
flake.homeModules.niri = { config, lib, ... }: {
|
||||||
wayland.windowManager.niri = {
|
wayland.windowManager.niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
settings = {
|
||||||
prefer-no-csd
|
prefer-no-csd = { };
|
||||||
hotkey-overlay {
|
hotkey-overlay.skip-at-startup = { };
|
||||||
skip-at-startup
|
environment = {
|
||||||
}
|
XDG_CURRENT_DESKTOP = "niri";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
environment {
|
XDG_SESSION_DESKTOP = "niri";
|
||||||
GTK_THEME "adw-gtk3-dark"
|
};
|
||||||
XDG_CURRENT_DESKTOP "niri"
|
cursor = {
|
||||||
XDG_SESSION_TYPE "wayland"
|
xcursor-size = 24;
|
||||||
XDG_SESSION_DESKTOP "niri"
|
xcursor-theme = "macOS";
|
||||||
QT_QPA_PLATFORM "wayland;xcb"
|
};
|
||||||
OZONE_PLATFORM "wayland"
|
input = {
|
||||||
ELECTRON_OZONE_PLATFORM_HINT "auto"
|
keyboard.xkb.layout = "eu";
|
||||||
}
|
touchpad = {
|
||||||
cursor {
|
tap = { };
|
||||||
xcursor-size 24
|
natural-scroll = { };
|
||||||
xcursor-theme "macOS"
|
};
|
||||||
}
|
mouse = {
|
||||||
input {
|
accel-speed = -0.4;
|
||||||
keyboard {
|
accel-profile = "flat";
|
||||||
xkb {
|
};
|
||||||
layout "eu"
|
focus-follows-mouse._props.max-scroll-amount = "20%";
|
||||||
}
|
};
|
||||||
}
|
spawn-at-startup = [ "qs" ];
|
||||||
|
screenshot-path = null;
|
||||||
touchpad {
|
animations = { };
|
||||||
tap
|
layout = {
|
||||||
natural-scroll
|
gaps = 16;
|
||||||
|
center-focused-column = "never";
|
||||||
}
|
default-column-width._children = [ { proportion = 0.6; } ];
|
||||||
|
focus-ring.off = { };
|
||||||
mouse {
|
border = {
|
||||||
accel-speed -0.4
|
width = 2;
|
||||||
accel-profile "flat"
|
active-color = config.lib.stylix.colors.base0D;
|
||||||
}
|
inactive-color = config.lib.stylix.colors.base03;
|
||||||
focus-follows-mouse max-scroll-amount="20%"
|
};
|
||||||
|
};
|
||||||
}
|
binds = {
|
||||||
|
"Mod+Return".spawn-sh = "ghostty +new-window";
|
||||||
output "PNP(BNQ) BenQ EX2710Q K6R04023019" {
|
"Mod+space".spawn = [ "fuzzel" ];
|
||||||
mode "2560x1440@165.002"
|
"Mod+e".spawn = [ "nautilus" ];
|
||||||
scale 1
|
"XF86AudioRaiseVolume" = {
|
||||||
transform "normal"
|
_props.allow-when-locked = true;
|
||||||
position x=1920 y=0
|
spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0";
|
||||||
}
|
};
|
||||||
output "Dell Inc. DELL P2317H 9KFDW6C533DB" {
|
"XF86AudioLowerVolume" = {
|
||||||
position x=0 y=0
|
_props.allow-when-locked = true;
|
||||||
}
|
spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||||
|
};
|
||||||
output "eDP-1" {
|
"XF86AudioMute" = {
|
||||||
scale 1
|
_props.allow-when-locked = true;
|
||||||
}
|
spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
};
|
||||||
|
"XF86AudioMicMute" = {
|
||||||
layout {
|
_props.allow-when-locked = true;
|
||||||
gaps 16
|
spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||||
center-focused-column "never"
|
};
|
||||||
default-column-width { proportion 0.6; }
|
"XF86AudioPlay" = {
|
||||||
focus-ring {
|
_props.allow-when-locked = true;
|
||||||
off
|
spawn-sh = "playerctl play-pause";
|
||||||
}
|
};
|
||||||
border {
|
"XF86AudioStop" = {
|
||||||
width 2
|
_props.allow-when-locked = true;
|
||||||
active-color "#ffc87f"
|
spawn-sh = "playerctl stop";
|
||||||
inactive-color "#505050"
|
};
|
||||||
}
|
"XF86AudioPrev" = {
|
||||||
}
|
_props.allow-when-locked = true;
|
||||||
spawn-at-startup "qs"
|
spawn-sh = "playerctl previous";
|
||||||
screenshot-path null
|
};
|
||||||
animations {}
|
"XF86AudioNext" = {
|
||||||
window-rule {
|
_props.allow-when-locked = true;
|
||||||
geometry-corner-radius 16
|
spawn-sh = "playerctl next";
|
||||||
clip-to-geometry true
|
};
|
||||||
}
|
"XF86MonBrightnessUp" = {
|
||||||
|
_props.allow-when-locked = true;
|
||||||
binds {
|
spawn = [
|
||||||
Mod+return { spawn-sh "ghostty +new-window"; }
|
"brightnessctl"
|
||||||
Mod+space { spawn "fuzzel"; }
|
"--class=backlight"
|
||||||
Mod+e { spawn "nautilus"; }
|
"set"
|
||||||
|
"+10%"
|
||||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
|
];
|
||||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
};
|
||||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
"XF86MonBrightnessDown" = {
|
||||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
_props.allow-when-locked = true;
|
||||||
|
spawn = [
|
||||||
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
"brightnessctl"
|
||||||
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
|
"--class=backlight"
|
||||||
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
|
"set"
|
||||||
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
|
"10%-"
|
||||||
|
];
|
||||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
};
|
||||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
"Mod+O" = {
|
||||||
|
_props.repeat = false;
|
||||||
Mod+O repeat=false { toggle-overview; }
|
toggle-overview = { };
|
||||||
Mod+Q repeat=false { close-window; }
|
};
|
||||||
|
"Mod+Q" = {
|
||||||
Mod+Left { focus-column-left; }
|
_props.repeat = false;
|
||||||
Mod+Down { focus-window-down; }
|
close-window = { };
|
||||||
Mod+Up { focus-window-up; }
|
};
|
||||||
Mod+Right { focus-column-right; }
|
"Mod+Left".focus-column-left = { };
|
||||||
Mod+H { focus-column-left; }
|
"Mod+Down".focus-window-down = { };
|
||||||
Mod+J { focus-window-down; }
|
"Mod+Up".focus-window-up = { };
|
||||||
Mod+K { focus-window-up; }
|
"Mod+Right".focus-column-right = { };
|
||||||
Mod+L { focus-column-right; }
|
"Mod+H".focus-column-left = { };
|
||||||
Mod+Ctrl+Left { move-column-left; }
|
"Mod+J".focus-window-down = { };
|
||||||
Mod+Ctrl+Down { move-window-down; }
|
"Mod+K".focus-window-up = { };
|
||||||
Mod+Ctrl+Up { move-window-up; }
|
"Mod+L".focus-column-right = { };
|
||||||
Mod+Ctrl+Right { move-column-right; }
|
"Mod+Ctrl+Left".move-column-left = { };
|
||||||
Mod+Ctrl+H { move-column-left; }
|
"Mod+Ctrl+Down".move-window-down = { };
|
||||||
Mod+Ctrl+J { move-window-down; }
|
"Mod+Ctrl+Up".move-window-up = { };
|
||||||
Mod+Ctrl+K { move-window-up; }
|
"Mod+Ctrl+Right".move-column-right = { };
|
||||||
mod+ctrl+l { move-column-right; }
|
"Mod+Ctrl+H".move-column-left = { };
|
||||||
|
"Mod+Ctrl+J".move-window-down = { };
|
||||||
Mod+comma { focus-monitor-left; }
|
"Mod+Ctrl+K".move-window-up = { };
|
||||||
Mod+period { focus-monitor-right; }
|
"Mod+Ctrl+L".move-column-right = { };
|
||||||
|
"Mod+comma".focus-monitor-left = { };
|
||||||
Mod+Shift+comma { move-column-to-monitor-left; }
|
"Mod+period".focus-monitor-right = { };
|
||||||
Mod+Shift+period { move-column-to-monitor-right; }
|
"Mod+Shift+comma".move-column-to-monitor-left = { };
|
||||||
|
"Mod+Shift+period".move-column-to-monitor-right = { };
|
||||||
|
"Mod+Shift+WheelScrollDown".focus-column-right = { };
|
||||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
"Mod+Shift+WheelScrollUp".focus-column-left = { };
|
||||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
"Mod+1".focus-workspace = 1;
|
||||||
Mod+1 { focus-workspace 1; }
|
"Mod+2".focus-workspace = 2;
|
||||||
Mod+2 { focus-workspace 2; }
|
"Mod+3".focus-workspace = 3;
|
||||||
Mod+3 { focus-workspace 3; }
|
"Mod+4".focus-workspace = 4;
|
||||||
Mod+4 { focus-workspace 4; }
|
"Mod+5".focus-workspace = 5;
|
||||||
Mod+5 { focus-workspace 5; }
|
"Mod+6".focus-workspace = 6;
|
||||||
Mod+6 { focus-workspace 6; }
|
"Mod+7".focus-workspace = 7;
|
||||||
Mod+7 { focus-workspace 7; }
|
"Mod+8".focus-workspace = 8;
|
||||||
Mod+8 { focus-workspace 8; }
|
"Mod+9".focus-workspace = 9;
|
||||||
Mod+9 { focus-workspace 9; }
|
"Mod+Shift+1".move-column-to-workspace = 1;
|
||||||
Mod+Shift+1 { move-column-to-workspace 1; }
|
"Mod+Shift+2".move-column-to-workspace = 2;
|
||||||
Mod+Shift+2 { move-column-to-workspace 2; }
|
"Mod+Shift+3".move-column-to-workspace = 3;
|
||||||
Mod+Shift+3 { move-column-to-workspace 3; }
|
"Mod+Shift+4".move-column-to-workspace = 4;
|
||||||
Mod+Shift+4 { move-column-to-workspace 4; }
|
"Mod+Shift+5".move-column-to-workspace = 5;
|
||||||
Mod+Shift+5 { move-column-to-workspace 5; }
|
"Mod+Shift+6".move-column-to-workspace = 6;
|
||||||
Mod+Shift+6 { move-column-to-workspace 6; }
|
"Mod+Shift+7".move-column-to-workspace = 7;
|
||||||
Mod+Shift+7 { move-column-to-workspace 7; }
|
"Mod+Shift+8".move-column-to-workspace = 8;
|
||||||
Mod+Shift+8 { move-column-to-workspace 8; }
|
"Mod+Shift+9".move-column-to-workspace = 9;
|
||||||
Mod+Shift+9 { move-column-to-workspace 9; }
|
"Mod+BracketLeft".consume-or-expel-window-left = { };
|
||||||
|
"Mod+BracketRight".consume-or-expel-window-right = { };
|
||||||
Mod+BracketLeft { consume-or-expel-window-left; }
|
"Mod+F".maximize-column = { };
|
||||||
Mod+BracketRight { consume-or-expel-window-right; }
|
"Mod+Minus".set-column-width = "-10%";
|
||||||
Mod+F { maximize-column; }
|
"Mod+Equal".set-column-width = "+10%";
|
||||||
|
"Mod+V".toggle-window-floating = { };
|
||||||
Mod+Minus { set-column-width "-10%"; }
|
"Mod+Shift+S".screenshot = { };
|
||||||
Mod+Equal { set-column-width "+10%"; }
|
"Alt+Shift+S".screenshot-screen = { };
|
||||||
|
"Alt+Ctrl+S".screenshot-window = { };
|
||||||
Mod+V { toggle-window-floating; }
|
"Mod+Shift+q".quit = { };
|
||||||
Mod+Shift+S { screenshot; }
|
};
|
||||||
Alt+Shift+S { screenshot-screen; }
|
_children = [
|
||||||
Alt+Ctrl+S { screenshot-window; }
|
{
|
||||||
Mod+Shift+q { quit; }
|
output = {
|
||||||
}
|
_args = [ "PNP(BNQ) BenQ EX2710Q K6R04023019" ];
|
||||||
'';
|
mode = "2560x1440@165.002";
|
||||||
|
scale = 1;
|
||||||
|
transform = "normal";
|
||||||
|
position._props = {
|
||||||
|
x = 1920;
|
||||||
|
y = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = {
|
||||||
|
_args = [ "Dell Inc. DELL P2317H 9KFDW6C533DB" ];
|
||||||
|
position._props = {
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = {
|
||||||
|
_args = [ "eDP-1" ];
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
window-rule._children = [
|
||||||
|
{ geometry-corner-radius = 16; }
|
||||||
|
{ clip-to-geometry = true; }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
flake.nixosModules.stylix_fonts = { pkgs, config, ... }: {
|
flake.nixosModules.stylix_fonts = { pkgs, config, ... }: {
|
||||||
stylix.fonts = {
|
stylix.fonts = {
|
||||||
|
sizes.terminal = 14;
|
||||||
serif = {
|
serif = {
|
||||||
package = config.stylix.fonts.monospace.package;
|
package = config.stylix.fonts.monospace.package;
|
||||||
name = config.stylix.fonts.monospace.name;
|
name = config.stylix.fonts.monospace.name;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue