aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2025-07-29 15:36:17 +0200
committerAdrian Kummerlaender2025-07-29 15:36:17 +0200
commit7e178bebb03b5874f115b911c99e5bf7d50d1a21 (patch)
tree976fae0374921841e8701343391b5c7815c46569
parentdd8558457c5c614c4091f877d9b83cf7222f5c3c (diff)
downloadnixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.tar
nixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.tar.gz
nixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.tar.bz2
nixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.tar.lz
nixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.tar.xz
nixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.tar.zst
nixos_home-7e178bebb03b5874f115b911c99e5bf7d50d1a21.zip
atlas: Tweak niri config, setup screen sharing, test sunshine
-rw-r--r--gui/conf/niri.kdl124
-rw-r--r--host/atlas.nix12
2 files changed, 34 insertions, 102 deletions
diff --git a/gui/conf/niri.kdl b/gui/conf/niri.kdl
index d20cb61..5939e48 100644
--- a/gui/conf/niri.kdl
+++ b/gui/conf/niri.kdl
@@ -40,57 +40,15 @@ input {
// scroll-button 273
// middle-emulation
}
-}
-// You can configure outputs by their name, which you can find
-// by running `niri msg outputs` while inside a niri instance.
-// The built-in laptop monitor is usually called "eDP-1".
-// Find more information on the wiki:
-// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
-// Remember to uncomment the node by removing "/-"!
-/-output "eDP-1" {
- // Uncomment this line to disable this output.
- // off
-
- // Resolution and, optionally, refresh rate of the output.
- // The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
- // If the refresh rate is omitted, niri will pick the highest refresh rate
- // for the resolution.
- // If the mode is omitted altogether or is invalid, niri will pick one automatically.
- // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
- mode "1920x1080@120.030"
-
- // You can use integer or fractional scale, for example use 1.5 for 150% scale.
- scale 1
-
- // Transform allows to rotate the output counter-clockwise, valid values are:
- // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
- transform "normal"
-
- // Position of the output in the global coordinate space.
- // This affects directional monitor actions like "focus-monitor-left", and cursor movement.
- // The cursor can only move between directly adjacent outputs.
- // Output scale and rotation has to be taken into account for positioning:
- // outputs are sized in logical, or scaled, pixels.
- // For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
- // so to put another output directly adjacent to it on the right, set its x to 1920.
- // If the position is unset or results in an overlap, the output is instead placed
- // automatically.
- position x=1280 y=0
+ focus-follows-mouse max-scroll-amount="0%"
}
-// Settings that influence how windows are positioned and sized.
-// Find more information on the wiki:
-// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
gaps 8
- // When to center a column when changing focus, options are:
- // - "never", default behavior, focusing an off-screen column will keep at the left
- // or right edge of the screen.
- // - "always", the focused column will always be centered.
- // - "on-overflow", focusing a column will center it if it doesn't fit
- // together with the previously focused column.
+ always-center-single-column
+
center-focused-column "never"
preset-column-widths {
@@ -99,8 +57,10 @@ layout {
proportion 0.66667
}
- // You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
- // preset-window-heights { }
+ preset-window-heights {
+ proportion 0.5
+ proportion 1.0
+ }
default-column-width { proportion 0.5; }
@@ -109,36 +69,16 @@ layout {
active-color "#909636"
inactive-color "#161616"
}
-}
-
-screenshot-path "~/screenshot_%Y_%m_%d_%H_%M_%S.png"
-
-// Animation settings.
-// The wiki explains how to configure individual animations:
-// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
-animations {
- // Uncomment to turn off all animations.
- // off
- // Slow down all animations by this factor. Values below 1 speed them up instead.
- // slowdown 3.0
+ background-color "#161616"
}
-// Window rules let you adjust behavior for individual windows.
-// Find more information on the wiki:
-// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
+screenshot-path "~/university/screenshots/%Y-%m-%d_%H-%M.png"
-// Work around WezTerm's initial configure bug
-// by setting an empty default-column-width.
-window-rule {
- // This regular expression is intentionally made as specific as possible,
- // since this is the default config, and we want no false positives.
- // You can get away with just app-id="wezterm" if you want.
- match app-id=r#"^org\.wezfurlong\.wezterm$"#
- default-column-width {}
+animations {
+ slowdown 0.5
}
-// Open the Firefox picture-in-picture player as floating by default.
window-rule {
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
@@ -180,26 +120,11 @@ binds {
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
- Mod+Ctrl+Home { move-column-to-first; }
- Mod+Ctrl+End { move-column-to-last; }
-
- //Mod+Shift+Left { focus-monitor-left; }
- //Mod+Shift+Down { focus-monitor-down; }
- //Mod+Shift+Up { focus-monitor-up; }
- //Mod+Shift+Right { focus-monitor-right; }
- //Mod+Shift+H { focus-monitor-left; }
- //Mod+Shift+J { focus-monitor-down; }
- //Mod+Shift+K { focus-monitor-up; }
- //Mod+Shift+L { focus-monitor-right; }
-
- //Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
- //Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
- //Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
- //Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
- //Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
- //Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
- //Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
- //Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
+ Mod+Shift+Home { move-column-to-first; }
+ Mod+Shift+End { move-column-to-last; }
+
+ Mod+Tab { focus-monitor-previous; }
+ Mod+Shift+Tab { move-column-to-monitor-previous; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
@@ -209,17 +134,20 @@ binds {
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
+ Mod+Left { focus-monitor-left; }
+ Mod+Right { focus-monitor-right; }
Mod+Down { focus-workspace-down; }
Mod+Up { focus-workspace-up; }
+
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
- Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
- Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
- Mod+Ctrl+U { move-column-to-workspace-down; }
- Mod+Ctrl+I { move-column-to-workspace-up; }
+ //Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
+ //Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
+ //Mod+Ctrl+U { move-column-to-workspace-down; }
+ //Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
@@ -287,9 +215,6 @@ binds {
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
- // Switches focus between the current and the previous workspace.
- // Mod+Tab { focus-workspace-previous; }
-
// The following binds move the focused window in and out of a column.
// If the window is alone, they will consume it into the nearby column to the side.
// If the window is already in a column, they will expel it out.
@@ -313,9 +238,6 @@ binds {
Mod+C { center-column; }
- // Center all fully visible columns on screen.
- Mod+Ctrl+C { center-visible-columns; }
-
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
diff --git a/host/atlas.nix b/host/atlas.nix
index f73a1c7..af57198 100644
--- a/host/atlas.nix
+++ b/host/atlas.nix
@@ -3,6 +3,16 @@
{
imports = [
../gui/default.nix
- ../gui/xmonad.nix
+ ../gui/niri.nix
];
+
+ home.packages = with pkgs; [
+ xwayland-satellite
+ ];
+
+ home.sessionVariables = {
+ QT_QPA_PLATFORM = "wayland";
+ GBM_BACKEND = "nvidia-drm";
+ __GLX_VENDOR_LIBRARY_NAME = "nvidia";
+ };
}