niri: switch from hyprland
This commit is contained in:
parent
5f86d0ec99
commit
05f480acf5
2 changed files with 228 additions and 8 deletions
|
|
@ -12,10 +12,57 @@
|
||||||
package = inputs.niri-flake.packages.${pkgs.system}.niri-unstable;
|
package = inputs.niri-flake.packages.${pkgs.system}.niri-unstable;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = with pkgs; [
|
||||||
pkgs.alacritty
|
kitty
|
||||||
pkgs.fuzzel
|
fuzzel
|
||||||
|
|
||||||
|
inputs.niri-flake.packages.${pkgs.system}.xwayland-satellite-unstable
|
||||||
|
|
||||||
|
wl-clipboard
|
||||||
|
xsel
|
||||||
|
|
||||||
|
mako
|
||||||
|
waybar
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
autostart.enable = true;
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-gnome
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
common = {
|
||||||
|
default = [ "*" ];
|
||||||
|
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
||||||
|
};
|
||||||
|
niri = {
|
||||||
|
default = [
|
||||||
|
"gnome"
|
||||||
|
"gtk"
|
||||||
|
];
|
||||||
|
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||||
|
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
|
||||||
|
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||||
|
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
|
||||||
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
|
QT_QPA_PLATFORM = "wayland;xcb";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeManager.cholli =
|
homeManager.cholli =
|
||||||
|
|
@ -28,13 +75,23 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
config = lib.mkIf (osConfig.networking.hostName == "yggdrasil" && osConfig.programs.niri.enable) {
|
||||||
|
|
||||||
config = lib.mkIf (osConfig.networking.hostName == "yggdrasil") {
|
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
|
prefer-no-csd = true;
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
keyboard = {
|
keyboard = {
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
rules = "escape:nocaps";
|
||||||
|
};
|
||||||
numlock = true;
|
numlock = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs."DP-1" = {
|
outputs."DP-1" = {
|
||||||
|
|
@ -49,6 +106,9 @@
|
||||||
height = 1080;
|
height = 1080;
|
||||||
};
|
};
|
||||||
transform.rotation = 90;
|
transform.rotation = 90;
|
||||||
|
# layout = {
|
||||||
|
# default-column-width.proportion = 1.0;
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
layout = {
|
layout = {
|
||||||
|
|
@ -63,7 +123,6 @@
|
||||||
{ proportion = 1. / 3.; }
|
{ proportion = 1. / 3.; }
|
||||||
{ proportion = 1. / 2.; }
|
{ proportion = 1. / 2.; }
|
||||||
{ proportion = 2. / 3.; }
|
{ proportion = 2. / 3.; }
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
focus-ring = {
|
focus-ring = {
|
||||||
|
|
@ -81,8 +140,56 @@
|
||||||
|
|
||||||
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
|
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
|
||||||
|
|
||||||
# block 1pass from screenshots and window capture
|
# TODO: block 1pass from screenshots and window capture
|
||||||
|
# TODO: move windows to workspaces where I expect them
|
||||||
window-rules = [
|
window-rules = [
|
||||||
|
{
|
||||||
|
excludes = [ ];
|
||||||
|
clip-to-geometry = true;
|
||||||
|
geometry-corner-radius = {
|
||||||
|
top-left = 15.0;
|
||||||
|
top-right = 15.0;
|
||||||
|
bottom-left = 15.0;
|
||||||
|
bottom-right = 15.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
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 = "discord";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
app-id = "1Password";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
app-id = "steam";
|
||||||
|
title = "Friends List.*";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
open-on-output = "HDMI-A-1";
|
||||||
|
default-column-width.proportion = 1.0;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
binds =
|
binds =
|
||||||
|
|
@ -98,11 +205,21 @@
|
||||||
};
|
};
|
||||||
}) workspaces
|
}) workspaces
|
||||||
);
|
);
|
||||||
|
move-to-workspaces = builtins.listToAttrs (
|
||||||
|
map (num: {
|
||||||
|
name = "Mod+Ctrl+${toString num}";
|
||||||
|
value = {
|
||||||
|
action.move-window-to-workspace = num;
|
||||||
|
};
|
||||||
|
}) workspaces
|
||||||
|
);
|
||||||
in
|
in
|
||||||
|
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
"Mod+Shift+Slash".action = actions.show-hotkey-overlay;
|
"Mod+Shift+Slash".action = actions.show-hotkey-overlay;
|
||||||
|
"Mod+Shift+E".action = actions.quit;
|
||||||
|
"Ctrl+Alt+Delete".action = actions.quit;
|
||||||
|
|
||||||
"Mod+Return".action.spawn = "${lib.getExe pkgs.kitty}";
|
"Mod+Return".action.spawn = "${lib.getExe pkgs.kitty}";
|
||||||
"Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}";
|
"Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}";
|
||||||
|
|
@ -118,6 +235,99 @@
|
||||||
repeat = false;
|
repeat = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"Mod+J" = {
|
||||||
|
action = actions.focus-window-or-workspace-down;
|
||||||
|
};
|
||||||
|
"Mod+K" = {
|
||||||
|
action = actions.focus-window-or-workspace-up;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+J" = {
|
||||||
|
action = actions.move-window-down-or-to-workspace-down;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+K" = {
|
||||||
|
action = actions.move-window-up-or-to-workspace-up;
|
||||||
|
};
|
||||||
|
"Mod+Down" = {
|
||||||
|
action = actions.focus-window-or-workspace-down;
|
||||||
|
};
|
||||||
|
"Mod+Up" = {
|
||||||
|
action = actions.focus-window-or-workspace-up;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+Down" = {
|
||||||
|
action = actions.move-window-down-or-to-workspace-down;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+Up" = {
|
||||||
|
action = actions.move-window-up-or-to-workspace-up;
|
||||||
|
};
|
||||||
|
|
||||||
|
"Mod+H" = {
|
||||||
|
action = actions.focus-column-or-monitor-left;
|
||||||
|
};
|
||||||
|
"Mod+L" = {
|
||||||
|
action = actions.focus-column-or-monitor-right;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+H" = {
|
||||||
|
action = actions.move-column-left-or-to-monitor-left;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+L" = {
|
||||||
|
action = actions.move-column-right-or-to-monitor-right;
|
||||||
|
};
|
||||||
|
"Mod+Left" = {
|
||||||
|
action = actions.focus-column-or-monitor-left;
|
||||||
|
};
|
||||||
|
"Mod+Right" = {
|
||||||
|
action = actions.focus-column-or-monitor-right;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+Left" = {
|
||||||
|
action = actions.move-column-left-or-to-monitor-left;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+Right" = {
|
||||||
|
action = actions.move-column-right-or-to-monitor-right;
|
||||||
|
};
|
||||||
|
|
||||||
|
"Mod+WheelScrollDown" = {
|
||||||
|
action = actions.focus-column-right;
|
||||||
|
};
|
||||||
|
"Mod+WheelScrollUp" = {
|
||||||
|
action = actions.focus-column-left;
|
||||||
|
};
|
||||||
|
"Mod+Shift+WheelScrollDown" = {
|
||||||
|
action = actions.focus-workspace-down;
|
||||||
|
cooldown-ms = 150;
|
||||||
|
};
|
||||||
|
"Mod+Shift+WheelScrollUp" = {
|
||||||
|
action = actions.focus-workspace-up;
|
||||||
|
cooldown-ms = 150;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Window Sizes
|
||||||
|
"Mod+BracketLeft".action = actions.consume-or-expel-window-left;
|
||||||
|
"Mod+BracketRight".action = actions.consume-or-expel-window-right;
|
||||||
|
"Mod+Comma".action = actions.consume-window-into-column;
|
||||||
|
"Mod+Period".action = actions.expel-window-from-column;
|
||||||
|
|
||||||
|
"Mod+R".action = actions.switch-preset-column-width;
|
||||||
|
"Mod+Shift+R".action = actions.switch-preset-window-height;
|
||||||
|
"Mod+Ctrl+R".action = actions.reset-window-height;
|
||||||
|
"Mod+F".action = actions.fullscreen-window;
|
||||||
|
"Mod+Shift+F".action = actions.maximize-column;
|
||||||
|
"Mod+Ctrl+F".action = actions.expand-column-to-available-width;
|
||||||
|
|
||||||
|
"Mod+C".action = actions.center-column;
|
||||||
|
"Mod+V".action = actions.toggle-window-floating;
|
||||||
|
|
||||||
|
# Xwayland keyboard stuff
|
||||||
|
"Mod+Shift+C".action = actions.spawn [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"env DISPLAY=:0 xsel -ob | wl-copy"
|
||||||
|
];
|
||||||
|
"Mod+Shift+V".action = actions.spawn [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"wl-paste -n | env DISPLAY=:0 xsel -ib"
|
||||||
|
];
|
||||||
|
|
||||||
"XF86AudioRaiseVolume" = {
|
"XF86AudioRaiseVolume" = {
|
||||||
action.spawn = [
|
action.spawn = [
|
||||||
"wpctl"
|
"wpctl"
|
||||||
|
|
@ -156,6 +366,16 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
focus-workspaces
|
focus-workspaces
|
||||||
|
move-to-workspaces
|
||||||
|
];
|
||||||
|
|
||||||
|
spawn-at-startup = [
|
||||||
|
{ argv = [ "waybar" ]; }
|
||||||
|
{ argv = [ "zen-beta" ]; }
|
||||||
|
{ argv = [ "steam" ]; }
|
||||||
|
{ argv = [ "obsidian" ]; }
|
||||||
|
{ argv = [ "discord" ]; }
|
||||||
|
{ argv = [ "1password" ]; }
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ in
|
||||||
diebahn
|
diebahn
|
||||||
|
|
||||||
path-of-building
|
path-of-building
|
||||||
|
termscp
|
||||||
];
|
];
|
||||||
|
|
||||||
services.teamviewer.enable = true;
|
services.teamviewer.enable = true;
|
||||||
|
|
@ -53,7 +54,7 @@ in
|
||||||
amdgpu
|
amdgpu
|
||||||
|
|
||||||
# dektops
|
# dektops
|
||||||
hyprland
|
# hyprland
|
||||||
niri
|
niri
|
||||||
|
|
||||||
# apps
|
# apps
|
||||||
|
|
@ -99,6 +100,5 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue