211 lines
5.6 KiB
Nix
211 lines
5.6 KiB
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
system,
|
|
...
|
|
}: {
|
|
imports = [inputs.niri-flake.homeModules.niri];
|
|
|
|
home.packages = with pkgs; [
|
|
inputs.awww.packages.${system}.awww
|
|
wl-clipboard
|
|
];
|
|
|
|
programs = {
|
|
alacritty.enable = true;
|
|
fuzzel.enable = true;
|
|
swaylock.enable = true;
|
|
waybar.enable = true;
|
|
};
|
|
|
|
services = {
|
|
mako.enable = true;
|
|
swayidle.enable = true;
|
|
polkit-gnome.enable = true;
|
|
};
|
|
|
|
programs.niri = {
|
|
enable = true;
|
|
package = pkgs.niri;
|
|
|
|
settings = {
|
|
spawn-at-startup = [
|
|
{command = ["waybar"];}
|
|
{command = ["awww-daemon"];}
|
|
{command = ["awww" "img" "${../../assets/gruvbox_wallpaper.png}"];}
|
|
];
|
|
|
|
input = {
|
|
keyboard.numlock = true;
|
|
warp-mouse-to-focus.enable = true;
|
|
|
|
touchpad.natural-scroll = false;
|
|
|
|
focus-follows-mouse = {
|
|
enable = true;
|
|
max-scroll-amount = "0%";
|
|
};
|
|
|
|
keyboard = {
|
|
xkb = {
|
|
layout = "cz";
|
|
options = "caps:escape";
|
|
};
|
|
};
|
|
|
|
tablet = {
|
|
map-to-output = "eDP-1";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
"DP-1" = {
|
|
focus-at-startup = true;
|
|
|
|
mode = {
|
|
width = 2560;
|
|
height = 1440;
|
|
refresh = 120.0;
|
|
};
|
|
};
|
|
|
|
"DP-2" = {
|
|
position.x = -2560;
|
|
position.y = 210;
|
|
|
|
mode = {
|
|
width = 1920;
|
|
height = 1080;
|
|
refresh = 60.0;
|
|
};
|
|
};
|
|
};
|
|
|
|
environment = {
|
|
NIXOS_OZONE_WL = "1";
|
|
TERMINAL = "alacritty";
|
|
SDL_VIDEODRIVER = "wayland";
|
|
CLUTTER_BACKEND = "wayland";
|
|
};
|
|
|
|
gestures = {
|
|
hot-corners.enable = false;
|
|
};
|
|
|
|
switch-events = {
|
|
"tablet-mode-on".action.spawn = ["niri" "msg" "output" "eDP-1" "transform" "90"];
|
|
"tablet-mode-off".action.spawn = ["niri" "msg" "output" "eDP-1" "transform" "normal"];
|
|
};
|
|
|
|
layout = {
|
|
gaps = 8;
|
|
focus-ring.enable = false;
|
|
|
|
border = {
|
|
enable = true;
|
|
width = 2;
|
|
active = {
|
|
gradient = {
|
|
from = "#fabd2f"; # gruvbox bright yellow
|
|
to = "#fe8019"; # gruvbox bright orange
|
|
angle = 45;
|
|
relative-to = "workspace-view";
|
|
};
|
|
};
|
|
inactive = {
|
|
gradient = {
|
|
from = "#504945"; # gruvbox bg2
|
|
to = "#3c3836"; # gruvbox bg1
|
|
angle = 45;
|
|
relative-to = "workspace-view";
|
|
};
|
|
};
|
|
};
|
|
|
|
default-column-width = {proportion = 0.5;};
|
|
|
|
preset-column-widths = [
|
|
{proportion = 0.33333;}
|
|
{proportion = 0.5;}
|
|
{proportion = 0.66667;}
|
|
{proportion = 1.0;}
|
|
];
|
|
|
|
preset-window-heights = [
|
|
{proportion = 0.33333;}
|
|
{proportion = 0.5;}
|
|
{proportion = 0.66667;}
|
|
{proportion = 1.0;}
|
|
];
|
|
};
|
|
|
|
prefer-no-csd = true;
|
|
cursor.size = 14;
|
|
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
|
|
hotkey-overlay.skip-at-startup = true;
|
|
|
|
window-rules = [
|
|
{
|
|
clip-to-geometry = true;
|
|
}
|
|
];
|
|
|
|
binds = {
|
|
"Mod+Q".action.close-window = [];
|
|
"Mod+Return".action.spawn = ["alacritty"];
|
|
"Mod+A".action.spawn = ["fuzzel"];
|
|
"Mod+B".action.spawn = ["zen"];
|
|
"Mod+C".action.spawn = ["floating-calculator"];
|
|
|
|
"Mod+O".action.toggle-overview = [];
|
|
|
|
# Change monitor focus
|
|
"Mod+Alt+H".action.focus-monitor-left = [];
|
|
"Mod+Alt+L".action.focus-monitor-right = [];
|
|
"Mod+Alt+Left".action.focus-monitor-left = [];
|
|
"Mod+Alt+Right".action.focus-monitor-right = [];
|
|
|
|
# Vim motions
|
|
"Mod+H".action.focus-column-left = [];
|
|
"Mod+L".action.focus-column-right = [];
|
|
"Mod+J".action.focus-window-down = [];
|
|
"Mod+K".action.focus-window-up = [];
|
|
"Mod+Left".action.focus-column-left = [];
|
|
"Mod+Right".action.focus-column-right = [];
|
|
"Mod+Down".action.focus-window-down = [];
|
|
"Mod+Up".action.focus-window-up = [];
|
|
|
|
"Mod+WheelScrollDown".action.focus-column-right = [];
|
|
"Mod+WheelScrollUp".action.focus-column-left = [];
|
|
|
|
"Mod+Y".action.consume-or-expel-window-left = [];
|
|
"Mod+X".action.consume-or-expel-window-right = [];
|
|
|
|
"Mod+R".action.switch-preset-column-width = [];
|
|
"Mod+Shift+R".action.switch-preset-window-height = [];
|
|
"Mod+F".action.maximize-column = [];
|
|
"Mod+Shift+F".action.fullscreen-window = [];
|
|
"Mod+W".action.toggle-window-floating = [];
|
|
|
|
"Mod+Minus".action.set-column-width = ["-10%"];
|
|
"Mod+Plus".action.set-column-width = ["+10%"];
|
|
|
|
"Mod+Tab".action.focus-workspace-down = [];
|
|
"Mod+Shift+Tab".action.focus-workspace-up = [];
|
|
|
|
"Print".action.screenshot = [];
|
|
"Ctrl+Print".action.screenshot-screen = [];
|
|
"Alt+Print".action.screenshot-window = [];
|
|
|
|
"XF86AudioPlay".action.spawn = ["playerctl" "play-pause"];
|
|
"XF86AudioNext".action.spawn = ["playerctl" "next"];
|
|
"XF86AudioPrev".action.spawn = ["playerctl" "previous"];
|
|
"XF86AudioStop".action.spawn = ["playerctl" "stop"];
|
|
|
|
"XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
|
|
"XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
|
|
"xF86AudioMute".action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
|
|
};
|
|
};
|
|
};
|
|
}
|