added river

This commit is contained in:
willifan 2025-01-08 12:52:24 +01:00
parent a643248e06
commit faa055caf2
8 changed files with 45 additions and 12 deletions

View file

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./niri.nix
./river.nix
];
}

View file

@ -0,0 +1,81 @@
{ inputs, lib, config, pkgs, ... }:
let
SCRIPTS = "$XDG_CONFIG_HOME/desktop-utils/scripts";
in
lib.mkIf config.desktop.wm.niri.enable {
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
programs.niri.enable = true;
home-manager.users.willifan = {
home.packages = [
pkgs.xwayland-satellite
];
programs.niri.settings = {
outputs."eDP-1".scale = 1.6;
spawn-at-startup = [
{
command = [ "xwayland-satellite" ":0" ];
}
];
hotkey-overlay.skip-at-startup = true;
prefer-no-csd = true;
environment = {
DISPLAY = ":0";
};
input = {
keyboard.xkb = {
layout = "eu";
};
};
window-rules = [
{
geometry-corner-radius = {
top-right = 12.0;
top-left = 12.0;
bottom-right = 12.0;
bottom-left = 12.0;
};
clip-to-geometry = true;
open-maximized = true;
}
];
binds = {
"Mod+H".action.focus-column-or-monitor-left = { };
"Mod+J".action.focus-window-or-monitor-down = { };
"Mod+K".action.focus-window-or-monitor-up = { };
"Mod+L".action.focus-column-or-monitor-right = { };
"Mod+Q".action.spawn = [ "kitty" ];
"Mod+C".action.close-window = { };
"Mod+M".action.quit = { };
"Mod+E".action.spawn = [ "thunar" ];
"Mod+R".action.spawn = [ "fuzzel" ];
"Mod+P".action.spawn = [ "Enpass" ];
"Mod+F".action.fullscreen-window = { };
"XF86AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ];
"XF86AudioLowerVolume".action.spawn = [ "sh" "-c" "${SCRIPTS}/volume.sh -5" ];
"XF86AudioRaiseVolume".action.spawn = [ "sh" "-c" "${SCRIPTS}/volume.sh 5" ];
"XF86AudioPrev".action.spawn = [ "playerctl" "previous" ];
"XF86AudioPlay".action.spawn = [ "playerctl" "play-pause" ];
"XF86AudioNext".action.spawn = [ "playerctl" "next" ];
"XF86MonBrightnessDown".action.spawn = [ "sh" "-c" "${SCRIPTS}/brightness.sh -4800" ];
"XF86MonBrightnessUp".action.spawn = [ "sh" "-c" "${SCRIPTS}/brightness.sh 4800" ];
"Print".action.screenshot = { };
};
};
};
}

View file

@ -0,0 +1,19 @@
{ lib, config, ... }:
lib.mkIf config.desktop.wm.river.enable {
home-manager.users.willifan = {
wayland.windowManager.river = {
enable = true;
settings = {
map = {
normal = {
"Super Q" = "spawn 'kitty'";
"Super R" = "spawn 'fuzzel'";
"Super E" = "spawn 'thunar'";
"Super C" = "close";
};
};
};
};
};
}