preliminary niri HM configuration
This commit is contained in:
parent
28f4d3367c
commit
5dbd7ff717
6 changed files with 674 additions and 20 deletions
|
|
@ -21,7 +21,7 @@ in {
|
|||
./dunst.nix # notifier
|
||||
./wofi.nix # app menu
|
||||
#./sway.nix # desktop
|
||||
./niri.nix # desktop 2?
|
||||
./niri # desktop 2?
|
||||
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
{ inputs, config, pkgs, lib, flakePath, homeDir, ... }:
|
||||
let
|
||||
|
||||
in {
|
||||
imports = [ inputs.niri.homeModules.niri ];
|
||||
xdg.configFile."niri/config.kdl".source = ./niri.kdl;
|
||||
|
||||
programs = {
|
||||
|
||||
niri = {
|
||||
enable = true;
|
||||
package = with pkgs; niri-unstable;
|
||||
settings = {
|
||||
outputs."DP-4".scale = 1.0;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
241
home/desktop/niri/binds.nix
Normal file
241
home/desktop/niri/binds.nix
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.niri.settings.binds = with config.lib.niri.actions; {
|
||||
"XF86AudioPlay" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"media"
|
||||
"playPause"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86AudioStop" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"media"
|
||||
"stop"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86AudioNext" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"media"
|
||||
"next"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86AudioPrev" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"media"
|
||||
"previous"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"muteOutput"
|
||||
];
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"muteInput"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"increase"
|
||||
];
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"volume"
|
||||
"decrease"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86MonBrightnessUp" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"brightness"
|
||||
"increase"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86MonBrightnessDown" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"brightness"
|
||||
"decrease"
|
||||
];
|
||||
};
|
||||
|
||||
"Ctrl+Alt+L".action = spawn [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"lockScreen"
|
||||
"lock"
|
||||
];
|
||||
|
||||
"Mod+V".action = spawn [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"launcher"
|
||||
"clipboard"
|
||||
];
|
||||
|
||||
"Mod+E".action = spawn [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"launcher"
|
||||
"emoji"
|
||||
];
|
||||
|
||||
"Mod+U".action = spawn [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"settings"
|
||||
"toggle"
|
||||
];
|
||||
|
||||
"Alt+Space".action = spawn [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"launcher"
|
||||
"toggle"
|
||||
];
|
||||
|
||||
"Mod+D".action = spawn [
|
||||
"qs"
|
||||
"-c"
|
||||
"noctalia"
|
||||
"ipc"
|
||||
"call"
|
||||
"launcher"
|
||||
"toggle"
|
||||
];
|
||||
|
||||
"Print".action.screenshot-screen = {write-to-disk = true;};
|
||||
"Mod+Shift+Alt+S".action.screenshot-window = [];
|
||||
"Mod+Shift+S".action.screenshot = {show-pointer = false;};
|
||||
"Mod+Return".action = spawn "${pkgs.foot}/bin/kitty";
|
||||
"Mod+Tab".action = spawn "${pkgs.wofi}/bin/wofi";
|
||||
|
||||
"Mod+Q".action = close-window;
|
||||
"Mod+S".action = switch-preset-column-width;
|
||||
"Mod+F".action = maximize-column;
|
||||
|
||||
"Mod+1".action = set-column-width "25%";
|
||||
"Mod+2".action = set-column-width "50%";
|
||||
"Mod+3".action = set-column-width "75%";
|
||||
"Mod+4".action = set-column-width "100%";
|
||||
# "Mod+Shift+F".action = fullscreen-window;
|
||||
"Mod+Shift+F".action = expand-column-to-available-width;
|
||||
"Mod+Space".action = toggle-window-floating;
|
||||
"Mod+W".action = toggle-column-tabbed-display;
|
||||
|
||||
"Mod+Comma".action = consume-window-into-column;
|
||||
"Mod+Period".action = expel-window-from-column;
|
||||
"Mod+C".action = center-visible-columns;
|
||||
#"Mod+Tab".action = switch-focus-between-floating-and-tiling;
|
||||
|
||||
"Mod+Minus".action = set-column-width "-10%";
|
||||
"Mod+Plus".action = set-column-width "+10%";
|
||||
"Mod+Shift+Minus".action = set-window-height "-10%";
|
||||
"Mod+Shift+Plus".action = set-window-height "+10%";
|
||||
|
||||
"Mod+H".action = focus-column-left;
|
||||
"Mod+L".action = focus-column-right;
|
||||
"Mod+J".action = focus-window-or-workspace-down;
|
||||
"Mod+K".action = focus-window-or-workspace-up;
|
||||
"Mod+Left".action = focus-column-left;
|
||||
"Mod+Right".action = focus-column-right;
|
||||
"Mod+Down".action = focus-workspace-down;
|
||||
"Mod+Up".action = focus-workspace-up;
|
||||
|
||||
"Mod+Shift+H".action = move-column-left;
|
||||
"Mod+Shift+L".action = move-column-right;
|
||||
"Mod+Shift+K".action = move-column-to-workspace-up;
|
||||
"Mod+Shift+J".action = move-column-to-workspace-down;
|
||||
|
||||
"Mod+Shift+Ctrl+J".action = move-column-to-monitor-down;
|
||||
"Mod+Shift+Ctrl+K".action = move-column-to-monitor-up;
|
||||
};
|
||||
}
|
||||
123
home/desktop/niri/default.nix
Normal file
123
home/desktop/niri/default.nix
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
let
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
inputs.niri.homeModules.niri
|
||||
./window-rules.nix
|
||||
#./visual.nix
|
||||
./binds.nix
|
||||
];
|
||||
|
||||
#xdg.configFile."niri/config.kdl".source = ./niri.kdl;
|
||||
|
||||
programs = {
|
||||
|
||||
niri = {
|
||||
enable = true;
|
||||
package = with pkgs; niri-unstable;
|
||||
|
||||
settings = {
|
||||
|
||||
outputs."DP-4" = {
|
||||
mode = {
|
||||
width = 3440;
|
||||
height = 1440;
|
||||
refresh = 74.924;
|
||||
};
|
||||
position = {
|
||||
x = 1920;
|
||||
y = 0;
|
||||
};
|
||||
scale = 1.0;
|
||||
variable-refresh-rate = "on-demand";
|
||||
focus-at-startup = true;
|
||||
};
|
||||
outputs."HDMI-A-2" = {
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
refresh = 60.0;
|
||||
};
|
||||
position = {
|
||||
x = 0;
|
||||
y = 360;
|
||||
};
|
||||
scale = 1.0;
|
||||
};
|
||||
|
||||
input = {
|
||||
focus-follows-mouse = {
|
||||
enable = true;
|
||||
max-scroll-amount = "0%";
|
||||
};
|
||||
keyboard = { numlock = true; };
|
||||
mouse = {
|
||||
enable = true;
|
||||
natural-scroll = false;
|
||||
};
|
||||
touchpad = {
|
||||
enable = true;
|
||||
natural-scroll = true;
|
||||
};
|
||||
trackpoint = { enable = true; };
|
||||
};
|
||||
|
||||
prefer-no-csd = true;
|
||||
layout = {
|
||||
gaps = 8;
|
||||
struts = {
|
||||
left = 2;
|
||||
right = 2;
|
||||
top = 2;
|
||||
bottom = 4;
|
||||
};
|
||||
center-focused-column = "never";
|
||||
preset-column-widths = [
|
||||
#{proportion = 0.25;}
|
||||
{ proportion = 0.33333; }
|
||||
{ proportion = 0.5; }
|
||||
{
|
||||
proportion = 0.66667;
|
||||
}
|
||||
#{proportion = 0.75;}
|
||||
{ proportion = 1.0; }
|
||||
];
|
||||
border = { enable = false; };
|
||||
focus-ring = {
|
||||
enable = true;
|
||||
width = 2;
|
||||
active.gradient = {
|
||||
from = "#00cdff";
|
||||
to = "#80c8ff";
|
||||
angle = 45;
|
||||
};
|
||||
inactive.gradient = {
|
||||
from = "#705050";
|
||||
to = "#505070";
|
||||
angle = 45;
|
||||
};
|
||||
};
|
||||
};
|
||||
animations = {
|
||||
enable = true;
|
||||
slowdown = 1.25;
|
||||
};
|
||||
|
||||
spawn-at-startup = [
|
||||
{argv = ["waybar"]; }
|
||||
{argv = ["kitty" "btop"]; }
|
||||
{argv = ["swaybg" "-m" "fill" "-i" "~/Pictures/SerenityOS Branding/SerenityOS Wallpapers/duskGradient.png"]; }
|
||||
];
|
||||
|
||||
hotkey-overlay = {
|
||||
skip-at-startup = true;
|
||||
hide-not-bound = false;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
309
home/desktop/niri/window-rules.nix
Normal file
309
home/desktop/niri/window-rules.nix
Normal file
|
|
@ -0,0 +1,309 @@
|
|||
_: let
|
||||
windowRules = [
|
||||
{
|
||||
geometry-corner-radius = let
|
||||
radius = 12.0;
|
||||
in {
|
||||
bottom-left = radius;
|
||||
bottom-right = radius;
|
||||
top-left = radius;
|
||||
top-right = radius;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
draw-border-with-background = false;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{is-floating = true;}
|
||||
];
|
||||
shadow.enable = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
is-window-cast-target = true;
|
||||
}
|
||||
];
|
||||
focus-ring = {
|
||||
active.color = "#f38ba8";
|
||||
inactive.color = "#7d0d2d";
|
||||
};
|
||||
border = {
|
||||
inactive.color = "#7d0d2d";
|
||||
};
|
||||
shadow = {
|
||||
color = "#7d0d2d70";
|
||||
};
|
||||
tab-indicator = {
|
||||
active.color = "#f38ba8";
|
||||
inactive.color = "#7d0d2d";
|
||||
};
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "org.telegram.desktop";}];
|
||||
block-out-from = "screencast";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "app.drey.PaperPlane";}];
|
||||
block-out-from = "screencast";
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "zen";}
|
||||
{app-id = "helium";}
|
||||
{app-id = "firefox";}
|
||||
{app-id = "chromium-browser";}
|
||||
{app-id = "xdg-desktop-portal-gtk";}
|
||||
];
|
||||
scroll-factor = 0.6;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "zen";}
|
||||
{app-id = "helium";}
|
||||
{app-id = "firefox";}
|
||||
{app-id = "chromium-browser";}
|
||||
{app-id = "edge";}
|
||||
];
|
||||
open-maximized = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
title = "^Picture-in-Picture$";
|
||||
}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 32;
|
||||
y = 32;
|
||||
relative-to = "bottom-right";
|
||||
};
|
||||
default-column-width = {fixed = 480;};
|
||||
default-window-height = {fixed = 270;};
|
||||
}
|
||||
|
||||
{
|
||||
matches = [{title = "Discord Popout";}];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 32;
|
||||
y = 32;
|
||||
relative-to = "bottom-right";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
matches = [
|
||||
{app-id = "Multiviewer";}
|
||||
{title = "^Track Map$";}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 1426;
|
||||
y = 747;
|
||||
relative-to = "top-right";
|
||||
};
|
||||
default-column-width = {fixed = 490;};
|
||||
default-window-height = {fixed = 330;};
|
||||
open-on-output = "HDMI-A-1";
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "Multiviewer";}
|
||||
{title = "^Replay Radio$";}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 1423;
|
||||
y = 301;
|
||||
relative-to = "top-right";
|
||||
};
|
||||
default-column-width = {fixed = 500;};
|
||||
default-window-height = {fixed = 450;};
|
||||
open-on-output = "HDMI-A-1";
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "Multiviewer";}
|
||||
{title = "^Franco Colapinto$";}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 637;
|
||||
y = -2;
|
||||
relative-to = "top-right";
|
||||
};
|
||||
default-column-width = {fixed = 640;};
|
||||
default-window-height = {fixed = 360;};
|
||||
open-on-output = "HDMI-A-1";
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "Multiviewer";}
|
||||
{title = "^Pierre Gasly$";}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = -2;
|
||||
y = -2;
|
||||
relative-to = "top-right";
|
||||
};
|
||||
default-column-width = {fixed = 640;};
|
||||
default-window-height = {fixed = 360;};
|
||||
open-on-output = "HDMI-A-1";
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "Multiviewer";}
|
||||
{title = "^Kimi Antonelli$";}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 1278;
|
||||
y = -2;
|
||||
relative-to = "top-right";
|
||||
};
|
||||
default-column-width = {fixed = 640;};
|
||||
default-window-height = {fixed = 360;};
|
||||
open-on-output = "HDMI-A-1";
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{app-id = "Multiviewer";}
|
||||
{title = "^Live Timing$";}
|
||||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 1430;
|
||||
y = 710;
|
||||
relative-to = "bottom-left";
|
||||
};
|
||||
default-column-width = {fixed = 1430;};
|
||||
default-window-height = {fixed = 710;};
|
||||
open-on-output = "HDMI-A-1";
|
||||
}
|
||||
|
||||
{
|
||||
matches = [{app-id = "pavucontrol";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "pavucontrol-qt";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "com.saivert.pwvucontrol";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "io.github.fsobolev.Cavalier";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "dialog";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "popup";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "task_dialog";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "gcr-prompter";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "file-roller";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "org.gnome.FileRoller";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "nm-connection-editor";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "blueman-manager";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "xdg-desktop-portal-gtk";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "org.kde.polkit-kde-authentication-agent-1";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "pinentry";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Progress";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "File Operations";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Copying";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Moving";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Properties";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Downloads";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "file progress";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Confirm";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Authentication Required";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Notice";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Warning";}];
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
matches = [{title = "Error";}];
|
||||
open-floating = true;
|
||||
}
|
||||
];
|
||||
in {
|
||||
programs.niri.settings = {
|
||||
window-rules = windowRules;
|
||||
layout = {
|
||||
background-color = "transparent";
|
||||
};
|
||||
layer-rules = [
|
||||
{
|
||||
matches = [{namespace = "^noctalia-wallpaper*";}];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue