more refactor. adding shikane
This commit is contained in:
parent
14ad4cd2c5
commit
7b26c73b59
18 changed files with 851 additions and 764 deletions
344
modules/home/niri.nix
Normal file
344
modules/home/niri.nix
Normal file
|
@ -0,0 +1,344 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
programs = {
|
||||
waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
};
|
||||
eww = {
|
||||
enable = true;
|
||||
configDir = ../../homes/emenel/dotfiles/dot_config/eww;
|
||||
};
|
||||
|
||||
niri = {
|
||||
package = pkgs.niri-unstable;
|
||||
enable = true;
|
||||
settings = {
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
|
||||
prefer-no-csd = true;
|
||||
|
||||
spawn-at-startup = [
|
||||
{ command = ["maestral_qt"]; }
|
||||
# { command = ["xwayland-satellite" ":0"]; }
|
||||
{ command = ["clipse" "-listen"]; }
|
||||
# { command = ["waybar"]; }
|
||||
{ command = ["swayosd-server"]; }
|
||||
{ command = ["plexamp"]; }
|
||||
{ command = [ "systemctl --user restart waybar.service mako.service hypridle.service xwayland-satellite.service" ]; }
|
||||
# { command = ["hypridle"]; }
|
||||
];
|
||||
|
||||
workspaces = {
|
||||
"main" = {};
|
||||
"scratchpad" = {};
|
||||
};
|
||||
|
||||
input = {
|
||||
keyboard.xkb.layout = "us";
|
||||
|
||||
touchpad = {
|
||||
natural-scroll = true;
|
||||
scroll-method = "two-finger";
|
||||
dwt = true;
|
||||
tap = false;
|
||||
tap-button-map = "left-right-middle";
|
||||
click-method = "clickfinger";
|
||||
};
|
||||
|
||||
mouse = {
|
||||
natural-scroll = true;
|
||||
accel-speed = 0.1;
|
||||
accel-profile = "adaptive";
|
||||
};
|
||||
|
||||
workspace-auto-back-and-forth = true;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
"eDP-1" = {
|
||||
mode = {
|
||||
height = 2560;
|
||||
width = 1600;
|
||||
};
|
||||
background-color = "#000000";
|
||||
scale = 1;
|
||||
};
|
||||
|
||||
"PNP(BNQ) BenQ PD2725U N2N00414019" = {
|
||||
mode = {
|
||||
height = 3840;
|
||||
width = 2160;
|
||||
refresh = 59.997;
|
||||
};
|
||||
background-color = "#000000";
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
};
|
||||
|
||||
cursor = {
|
||||
theme = "Bibata-Modern-Classic";
|
||||
size = 32;
|
||||
hide-after-inactive-ms = 30000;
|
||||
};
|
||||
|
||||
animations.slowdown = 1.0;
|
||||
|
||||
layout = {
|
||||
gaps = 10;
|
||||
center-focused-column = "never";
|
||||
always-center-single-column = true;
|
||||
|
||||
preset-column-widths = [
|
||||
{ proportion = 0.33333; }
|
||||
{ proportion = 0.5; }
|
||||
{ proportion = 0.66667; }
|
||||
];
|
||||
|
||||
preset-window-heights = [
|
||||
{ proportion = 1. / 3.; }
|
||||
{ proportion = 1. / 2.; }
|
||||
{ proportion = 2. / 3.; }
|
||||
];
|
||||
|
||||
default-column-width = { proportion = 0.5; };
|
||||
|
||||
focus-ring = {
|
||||
enable = true;
|
||||
active.gradient = {
|
||||
from = "#d8bfffdd";
|
||||
to = "#BD93FF99";
|
||||
angle = 0;
|
||||
in' = "srgb-linear";
|
||||
};
|
||||
width = 2;
|
||||
};
|
||||
|
||||
border = {
|
||||
enable = true;
|
||||
inactive = {
|
||||
gradient = {
|
||||
from = "#333333";
|
||||
to = "#000000";
|
||||
angle = 180;
|
||||
in' = "srgb-linear";
|
||||
};
|
||||
};
|
||||
active.color = "#000";
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
# global window rule for shared config
|
||||
{ geometry-corner-radius = {
|
||||
top-left = 8.0;
|
||||
top-right = 8.0;
|
||||
bottom-left = 8.0;
|
||||
bottom-right = 8.0;
|
||||
};
|
||||
clip-to-geometry = true; }
|
||||
|
||||
{ matches = [
|
||||
{app-id="Calculator";}
|
||||
{app-id="Color Picker";}
|
||||
{app-id="Volume Control";}
|
||||
];
|
||||
open-floating = true; }
|
||||
|
||||
{ matches = [
|
||||
{app-id="Plexamp";}
|
||||
{app-id="scratchpad";}
|
||||
];
|
||||
open-on-workspace = "scratchpad";
|
||||
open-floating = true; }
|
||||
|
||||
{ matches = [{app-id="launcher";}];
|
||||
open-floating = true; }
|
||||
|
||||
# Open the Firefox picture-in-picture player as floating by default.
|
||||
{ # This app-id regular expression will work for both:
|
||||
# host Firefox (app-id is "firefox")
|
||||
# Flatpak Firefox (app-id is "org.mozilla.firefox")
|
||||
matches = [ { app-id= "r#\"firefox$\"# title=\"^Picture-in-Picture$\""; } ];
|
||||
open-floating = true; }
|
||||
];
|
||||
|
||||
binds = with config.lib.niri.actions; let
|
||||
wez = spawn "wezterm" "--config-file" "/home/emenel/.config/wezterm/launcher.lua" "start" "--always-new-process";
|
||||
wezlaunch = wez "--class" "launcher";
|
||||
in {
|
||||
# shows a list of important hotkeys.
|
||||
"Mod+Shift+Slash".action = show-hotkey-overlay;
|
||||
|
||||
"Mod+Space".action = wezlaunch "sway-launcher-desktop";
|
||||
|
||||
"Mod+Ctrl+T".action = spawn "wezterm";
|
||||
"Mod+Ctrl+E".action = spawn "emacsclient" "-r" "-n";
|
||||
"Mod+Ctrl+B".action = spawn "firefox";
|
||||
"Mod+Ctrl+V".action = wezlaunch "clipse";
|
||||
"Mod+Ctrl+F".action = wez "yazi";
|
||||
|
||||
"Mod+Shift+A".action = spawn "hyprlock";
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "swayosd-client" "--output-volume" "raise";
|
||||
};
|
||||
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked=true;
|
||||
action = spawn "swayosd-client" "--output-volume" "lower";
|
||||
};
|
||||
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked=true;
|
||||
action = spawn "swayosd-client" "--output-volume" "mute-toggle";
|
||||
};
|
||||
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked=true;
|
||||
action = spawn "swayosd-client" "--input-volume" "mute-toggle";
|
||||
};
|
||||
|
||||
"XF86MonBrightnessUp" = {
|
||||
allow-when-locked=true;
|
||||
action = spawn "swayosd-client" "--brightness" "raise";
|
||||
};
|
||||
|
||||
"XF86MonBrightnessDown" = {
|
||||
allow-when-locked=true;
|
||||
action = spawn "swayosd-client" "--brightness" "lower";
|
||||
};
|
||||
|
||||
"Mod+Q".action = close-window;
|
||||
|
||||
"Mod+Left".action = focus-column-left;
|
||||
"Mod+Down".action = focus-window-down;
|
||||
"Mod+Up".action = focus-window-up;
|
||||
"Mod+Right".action = focus-column-right;
|
||||
"Mod+H".action = focus-column-left;
|
||||
"Mod+J".action = focus-window-down;
|
||||
"Mod+K".action = focus-window-up;
|
||||
"Mod+L".action = focus-column-right;
|
||||
|
||||
"Mod+Ctrl+Left".action = move-column-left;
|
||||
"Mod+Ctrl+Down".action = move-window-down;
|
||||
"Mod+Ctrl+Up".action = move-window-up;
|
||||
"Mod+Ctrl+Right".action = move-column-right;
|
||||
"Mod+Ctrl+H".action = move-column-left;
|
||||
"Mod+Ctrl+J".action = move-window-down;
|
||||
"Mod+Ctrl+K".action = move-window-up;
|
||||
"Mod+Ctrl+L".action = move-column-right;
|
||||
|
||||
"Mod+Home".action = focus-column-first;
|
||||
"Mod+End".action = focus-column-last;
|
||||
"Mod+Ctrl+Home".action = move-column-to-first;
|
||||
"Mod+Ctrl+End".action = move-column-to-last;
|
||||
|
||||
"Mod+Shift+Left".action = focus-monitor-left;
|
||||
"Mod+Shift+Down".action = focus-monitor-down;
|
||||
"Mod+Shift+Up".action = focus-monitor-up;
|
||||
"Mod+Shift+Right".action = focus-monitor-right;
|
||||
"Mod+Shift+H".action = focus-monitor-left;
|
||||
"Mod+Shift+J".action = focus-monitor-down;
|
||||
"Mod+Shift+K".action = focus-monitor-up;
|
||||
"Mod+Shift+L".action = focus-monitor-right;
|
||||
|
||||
"Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left;
|
||||
"Mod+Shift+Ctrl+Down".action = move-column-to-monitor-down;
|
||||
"Mod+Shift+Ctrl+Up".action = move-column-to-monitor-up;
|
||||
"Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right;
|
||||
"Mod+Shift+Ctrl+H".action = move-column-to-monitor-left;
|
||||
"Mod+Shift+Ctrl+J".action = move-column-to-monitor-down;
|
||||
"Mod+Shift+Ctrl+K".action = move-column-to-monitor-up;
|
||||
"Mod+Shift+Ctrl+L".action = move-column-to-monitor-right;
|
||||
|
||||
"Mod+Page_Down".action = focus-workspace-down;
|
||||
"Mod+Page_Up".action = focus-workspace-up;
|
||||
"Mod+U".action = focus-workspace-down;
|
||||
"Mod+I".action = focus-workspace-up;
|
||||
"Mod+Alt+Down".action = move-column-to-workspace-down;
|
||||
"Mod+Alt+Up".action = move-column-to-workspace-up;
|
||||
"Mod+Ctrl+U".action = move-column-to-workspace-down;
|
||||
"Mod+Ctrl+I".action = move-column-to-workspace-up;
|
||||
|
||||
"Mod+Shift+Page_Down".action = move-workspace-down;
|
||||
"Mod+Shift+Page_Up".action = move-workspace-up;
|
||||
"Mod+Shift+U".action = move-workspace-down;
|
||||
"Mod+Shift+I".action = move-workspace-up;
|
||||
|
||||
"Mod+WheelScrollDown" = {
|
||||
action = focus-workspace-down;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
action = focus-workspace-up;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
action = move-column-to-workspace-down;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
action = move-column-to-workspace-up;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
|
||||
"Mod+WheelScrollRight".action = focus-column-right;
|
||||
"Mod+WheelScrollLeft".action = focus-column-left;
|
||||
"Mod+Ctrl+WheelScrollRight".action = move-column-right;
|
||||
"Mod+Ctrl+WheelScrollLeft".action = move-column-left;
|
||||
|
||||
"Mod+Shift+WheelScrollDown".action = focus-column-right;
|
||||
"Mod+Shift+WheelScrollUp".action = focus-column-left;
|
||||
"Mod+Ctrl+Shift+WheelScrollDown".action = move-column-right;
|
||||
"Mod+Ctrl+Shift+WheelScrollUp".action = move-column-left;
|
||||
|
||||
"Mod+BracketLeft".action = consume-or-expel-window-left;
|
||||
"Mod+BracketRight".action = consume-or-expel-window-right;
|
||||
"Mod+Comma".action = consume-window-into-column;
|
||||
"Mod+Period".action = expel-window-from-column;
|
||||
|
||||
"Mod+R".action = switch-preset-column-width;
|
||||
"Mod+Shift+R".action = switch-preset-window-height;
|
||||
"Mod+Ctrl+R".action = reset-window-height;
|
||||
"Mod+F".action = maximize-column;
|
||||
"Mod+Shift+F".action = fullscreen-window;
|
||||
"Mod+C".action = center-column;
|
||||
|
||||
"Mod+Minus".action = set-column-width "-10%";
|
||||
"Mod+Equal".action = set-column-width "+10%";
|
||||
"Mod+Shift+Minus".action = set-window-height "-10%";
|
||||
"Mod+Shift+Equal".action = set-window-height "+10%";
|
||||
|
||||
"Mod+Ctrl+X".action = toggle-window-floating;
|
||||
"Mod+Alt+X".action = switch-focus-between-floating-and-tiling;
|
||||
"Mod+X".action = focus-workspace "scratchpad";
|
||||
|
||||
"Print".action = screenshot;
|
||||
"Ctrl+Print".action = screenshot-screen;
|
||||
"Alt+Print".action = screenshot-window;
|
||||
|
||||
# The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
"Mod+Shift+E".action = quit;
|
||||
|
||||
# Powers off the monitors. To turn them back on, do any input like
|
||||
# moving the mouse or pressing any other key.
|
||||
"Mod+Shift+P".action = power-off-monitors;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue