Modules/Niri: Init niri module
This commit is contained in:
BIN
config/face.jpeg
Normal file
BIN
config/face.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
171
flake.lock
generated
171
flake.lock
generated
@ -766,6 +766,64 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763030490,
|
||||
"narHash": "sha256-U1xBvM3vbh7GZyc2ahziMVhi4qQyQ8pRwb9l8jD4ShI=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "7920a7b0553e0bebce825b0d9deb575e26f6f6ac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1756556321,
|
||||
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.08",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1763014447,
|
||||
"narHash": "sha256-nmu7S8J9IJKLQyIkSU8QWYHygrfw76NHGTkcr+bXMX0=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "a52df533c4694b5ed0a04140af60fd26146df911",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-alien": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
@ -840,6 +898,22 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1762756533,
|
||||
"narHash": "sha256-HiRDeUOD1VLklHeOmaKDzf+8Hb7vSWPVFcWwaTrpm+U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2448301fb856e351aab33e64c33a3fc8bcf637d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1762233356,
|
||||
"narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=",
|
||||
@ -923,6 +997,30 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"noctalia": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"quickshell": [
|
||||
"quickshell"
|
||||
],
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763040508,
|
||||
"narHash": "sha256-C0rkHOH6AxEZUYp5NXWepQYjGmsIcO2xEyme6wR0Zyc=",
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-shell",
|
||||
"rev": "04439699ae13342510265557c7ba554f0da6ecfa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-shell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nps": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
@ -1039,6 +1137,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"quickshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761897390,
|
||||
"narHash": "sha256-er4gYrIoThYLjlsOMTysoRfn67d1Gci+ZpqDrtQxrA0=",
|
||||
"owner": "quickshell-mirror",
|
||||
"repo": "quickshell",
|
||||
"rev": "fc704e6b5d445899a1565955268c91942a4f263f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "quickshell-mirror",
|
||||
"repo": "quickshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
@ -1051,13 +1169,16 @@
|
||||
"hyprspace": "hyprspace",
|
||||
"impermanence": "impermanence",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"niri": "niri",
|
||||
"nix-alien": "nix-alien",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"nixvim": "nixvim",
|
||||
"noctalia": "noctalia",
|
||||
"nps": "nps",
|
||||
"nur": "nur",
|
||||
"quickshell": "quickshell",
|
||||
"sops-nix": "sops-nix",
|
||||
"textfox": "textfox"
|
||||
}
|
||||
@ -1163,6 +1284,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"textfox": {
|
||||
"inputs": {
|
||||
"firefox-addons": "firefox-addons",
|
||||
@ -1224,6 +1360,39 @@
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1755491097,
|
||||
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.7",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1762747449,
|
||||
"narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "6338574bc5c036487486acde264f38f39ea15fad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
35
flake.nix
35
flake.nix
@ -49,6 +49,35 @@
|
||||
# https://github.com/thiagokokada/nix-alien#user-content-nixos-installation-with-flakes
|
||||
# nix-alien.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Niri
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Quickshell
|
||||
quickshell.url = "github:quickshell-mirror/quickshell";
|
||||
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Noctalia shell
|
||||
noctalia.url = "github:noctalia-dev/noctalia-shell";
|
||||
noctalia.inputs.nixpkgs.follows = "nixpkgs";
|
||||
noctalia.inputs.quickshell.follows = "quickshell";
|
||||
|
||||
# Caelestia shell
|
||||
# caelestia.url = "github:caelestia-dots/shell";
|
||||
# caelestia.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# caelestia.inputs.quickshell.follows = "quickshell";
|
||||
# caelestia-cli.url = "github:caelestia-dots/cli";
|
||||
# caelestia-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# DankMaterialShell
|
||||
# dgop.url = "github:AvengeMedia/dgop";
|
||||
# dgop.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# dms-cli.url = "github:AvengeMedia/danklinux";
|
||||
# dms-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# dankMaterialShell.url = "github:AvengeMedia/DankMaterialShell";
|
||||
# dankMaterialShell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# dankMaterialShell.inputs.dgop.follows = "dgop";
|
||||
|
||||
# Hyprland (use flake so plugins are not built from source)
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
@ -130,6 +159,7 @@
|
||||
in [
|
||||
inputs.devshell.overlays.default
|
||||
inputs.nur.overlays.default
|
||||
inputs.niri.overlays.niri
|
||||
# inputs.emacs-overlay.overlay
|
||||
|
||||
# All my own overlays (derivations + modifications)
|
||||
@ -194,6 +224,7 @@
|
||||
extraModules =
|
||||
[
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.niri.nixosModules.niri # This also imports the HM module
|
||||
]
|
||||
++ commonModules;
|
||||
};
|
||||
@ -203,7 +234,9 @@
|
||||
username = "christoph";
|
||||
headless = false;
|
||||
extraModules =
|
||||
[]
|
||||
[
|
||||
inputs.niri.nixosModules.niri
|
||||
]
|
||||
++ commonModules;
|
||||
};
|
||||
servenix = mylib.nixos.mkNixosConfigWithHomeManagerModule {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,7 @@
|
||||
./lazygit
|
||||
./mpd
|
||||
./neovim
|
||||
./niri
|
||||
./nnn
|
||||
./paths
|
||||
./qutebrowser
|
||||
@ -31,6 +32,10 @@
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.textfox.homeManagerModules.default
|
||||
# inputs.niri.homeModules.niri # Imported by system module
|
||||
inputs.noctalia.homeModules.default
|
||||
# inputs.dankMaterialShell.homeModules.dankMaterialShell.default
|
||||
# inputs.dankMaterialShell.homeModules.dankMaterialShell.niri
|
||||
|
||||
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
|
||||
# inputs.impermanence.homeManagerModules.impermanence
|
||||
|
||||
509
home/modules/niri/default.nix
Normal file
509
home/modules/niri/default.nix
Normal file
@ -0,0 +1,509 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) niri color;
|
||||
in {
|
||||
options.modules.niri = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf niri.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = nixosConfig.programs.niri.enable;
|
||||
message = "Can't enable Niri module with Niri disabled!";
|
||||
}
|
||||
];
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
xwayland-satellite
|
||||
ncpamixer # Audio control
|
||||
|
||||
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
|
||||
|
||||
# In case we fallback to the default config
|
||||
alacritty
|
||||
fuzzel
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
noctalia-shell = import ./noctalia.nix {inherit color;};
|
||||
|
||||
niri = {
|
||||
# enable = true; # Enabled in system module
|
||||
|
||||
settings = {
|
||||
input = {
|
||||
focus-follows-mouse = {
|
||||
enable = true;
|
||||
max-scroll-amount = "0%"; # Skip partial windows that would scroll the viewport on focus
|
||||
};
|
||||
|
||||
keyboard = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
options = "nodeadkeys";
|
||||
};
|
||||
};
|
||||
|
||||
touchpad = {
|
||||
click-method = "clickfinger";
|
||||
tap = true;
|
||||
drag = true;
|
||||
dwt = true;
|
||||
natural-scroll = true;
|
||||
scroll-method = "two-finger";
|
||||
};
|
||||
};
|
||||
|
||||
hotkey-overlay = {
|
||||
hide-not-bound = true;
|
||||
skip-at-startup = true;
|
||||
};
|
||||
|
||||
prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars)
|
||||
|
||||
spawn-at-startup = [
|
||||
{argv = ["noctalia-shell"];}
|
||||
{argv = ["kitty" "--hold" "fastfetch"];}
|
||||
{argv = ["zeal"];}
|
||||
{argv = ["nextcloud --background"];}
|
||||
{argv = ["protonvpn-app"];}
|
||||
{argv = ["keepassxc"];}
|
||||
{argv = ["fcitx5"];}
|
||||
|
||||
# TODO: On certain workspaces
|
||||
# {argv = ["ferdium"];}
|
||||
# {argv = ["kitty --title=Btop btop"];}
|
||||
# {argv = ["kitty --title=Rmpc rmpc"];}
|
||||
];
|
||||
|
||||
workspaces = {
|
||||
"1" = {open-on-output = "DP-1";};
|
||||
"2" = {open-on-output = "DP-1";};
|
||||
"3" = {open-on-output = "DP-1";};
|
||||
"4" = {open-on-output = "DP-1";};
|
||||
"5" = {open-on-output = "DP-1";};
|
||||
"6" = {open-on-output = "DP-1";};
|
||||
"7" = {open-on-output = "DP-1";};
|
||||
"8" = {open-on-output = "DP-1";};
|
||||
"9" = {open-on-output = "DP-1";};
|
||||
"10" = {open-on-output = "DP-2";};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
"DP-1" = {
|
||||
focus-at-startup = true;
|
||||
mode = {
|
||||
width = 3440;
|
||||
height = 1440;
|
||||
refresh = 165.0;
|
||||
};
|
||||
position = {
|
||||
x = 1920;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
"DP-2" = {
|
||||
focus-at-startup = false;
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
refresh = 60.0;
|
||||
};
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
hide-when-typing = true;
|
||||
theme = "Bibata-Modern-Classic";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
layout = {
|
||||
# This border is drawn INSIDE the window
|
||||
border = {
|
||||
enable = true;
|
||||
width = 2;
|
||||
active = {color = color.hex.accent;};
|
||||
inactive = {color = color.hex.base;};
|
||||
};
|
||||
|
||||
# This border is drawn OUTSIDE of the focused window
|
||||
focus-ring = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
# Hint where a dragged window will be inserted
|
||||
insert-hint = {
|
||||
enable = true;
|
||||
display = {color = color.hex.accentDim;};
|
||||
};
|
||||
|
||||
always-center-single-column = false;
|
||||
|
||||
# Gaps between windows
|
||||
gaps = 8;
|
||||
|
||||
# Gaps at screen borders
|
||||
struts = {
|
||||
# left = 8;
|
||||
# right = 8;
|
||||
top = 4; # Somehow the bar eclusivity doesn't work as expected
|
||||
bottom = 2;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
hot-corners = {enable = false;};
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
# Rules for all windows
|
||||
{
|
||||
clip-to-geometry = true;
|
||||
geometry-corner-radius = {
|
||||
bottom-left = 8.0;
|
||||
bottom-right = 8.0;
|
||||
top-left = 8.0;
|
||||
top-right = 8.0;
|
||||
};
|
||||
}
|
||||
|
||||
# Assign to workspaces
|
||||
{
|
||||
matches = [{app-id = "Zotero";}];
|
||||
open-on-workspace = "2";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "neovide";}];
|
||||
open-on-workspace = "2";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "code-url-handler";}];
|
||||
open-on-workspace = "2";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "obsidian";}];
|
||||
open-on-workspace = "3";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "firefox";}];
|
||||
open-on-workspace = "4";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "Google-chrome";}];
|
||||
open-on-workspace = "4";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "chromium-browser";}];
|
||||
open-on-workspace = "4";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "org.qutebrowser.qutebrowser";}];
|
||||
open-on-workspace = "4";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "steam";}];
|
||||
open-on-workspace = "5";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "steam_app_(.+)";}];
|
||||
open-on-workspace = "6";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "signal";}];
|
||||
open-on-workspace = "7";
|
||||
}
|
||||
{
|
||||
matches = [{app-id = "discord";}];
|
||||
open-on-workspace = "9";
|
||||
}
|
||||
];
|
||||
|
||||
layer-rules = [
|
||||
{
|
||||
# Set the overview wallpaper on the backdrop.
|
||||
matches = [{namespace = "^noctalia-overview*";}];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
|
||||
debug = {
|
||||
# Allows notification actions and window activation from Noctalia.
|
||||
honor-xdg-activation-with-invalid-serial = [];
|
||||
};
|
||||
|
||||
# TODO: Only start hypr... stuff with hyprland, not systemd (hypridle, hyprpaper currently)
|
||||
|
||||
# TODO: Move values to config option and set in home/christoph/niri.nix
|
||||
binds = with config.lib.niri.actions; {
|
||||
# Applications
|
||||
"Mod+T" = {
|
||||
action = spawn "kitty";
|
||||
hotkey-overlay = {title = "Spawn Kitty.";};
|
||||
};
|
||||
"Mod+E" = {
|
||||
action = spawn "kitty" "--title=Yazi" "yazi";
|
||||
hotkey-overlay = {title = "Spawn Yazi.";};
|
||||
};
|
||||
"Mod+B" = {
|
||||
action = spawn "kitty" "--title=Btop" "btop";
|
||||
hotkey-overlay = {title = "Spawn Btop.";};
|
||||
};
|
||||
"Mod+R" = {
|
||||
action = spawn "kitty" "--title=Rmpc" "rmpc";
|
||||
hotkey-overlay = {title = "Spawn Rmpc.";};
|
||||
};
|
||||
"Mod+N" = {
|
||||
action = spawn "neovide";
|
||||
hotkey-overlay = {title = "Spawn Neovide.";};
|
||||
};
|
||||
"Mod+Ctrl+N" = {
|
||||
action = spawn "kitty" "--title=Navi" "navi";
|
||||
hotkey-overlay = {title = "Call Navi for help.";};
|
||||
};
|
||||
"Mod+Shift+N" = {
|
||||
action = spawn "neovide" "${config.paths.dotfiles}/navi/christoph.cheat";
|
||||
hotkey-overlay = {title = "Edit the Navi cheats.";};
|
||||
};
|
||||
"Mod+Shift+F" = {
|
||||
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
|
||||
hotkey-overlay = {title = "Edit the NixFlake.";};
|
||||
};
|
||||
|
||||
# Noctalia
|
||||
"Mod+A" = {
|
||||
action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
|
||||
hotkey-overlay = {title = "Toggle the application launcher.";};
|
||||
};
|
||||
"Mod+Ctrl+L" = {
|
||||
action = spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock";
|
||||
hotkey-overlay = {title = "Lock the screen.";};
|
||||
};
|
||||
"Mod+W" = {
|
||||
action = spawn "noctalia-shell" "ipc" "call" "wallpaper" "toggle";
|
||||
hotkey-overlay = {title = "Toggle the wallpaper chooser.";};
|
||||
};
|
||||
"Mod+Escape" = {
|
||||
action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle";
|
||||
hotkey-overlay = {title = "Toggle the session menu.";};
|
||||
};
|
||||
|
||||
# Screenshots
|
||||
"Mod+S" = {
|
||||
action.screenshot-window = {write-to-disk = true;};
|
||||
hotkey-overlay = {title = "Take a screenshot of the current window.";};
|
||||
};
|
||||
"Mod+Shift+S" = {
|
||||
action.screenshot = {show-pointer = true;};
|
||||
hotkey-overlay = {title = "Take a screenshot of a region.";};
|
||||
};
|
||||
|
||||
# Audio
|
||||
"XF86AudioRaiseVolume" = {
|
||||
action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%+";
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%-";
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"XF86AudioPlay" = {
|
||||
action = spawn "playerctl" "play-pause";
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"XF86AudioPrev" = {
|
||||
action = spawn "playerctl" "previous";
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"XF86AudioNext" = {
|
||||
action = spawn "playerctl" "next";
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
|
||||
# Niri
|
||||
"Mod+Shift+Slash" = {
|
||||
action = show-hotkey-overlay;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
|
||||
# Niri windows
|
||||
"Mod+Q" = {
|
||||
action = close-window;
|
||||
hotkey-overlay = {title = "Close the current window.";};
|
||||
};
|
||||
"Mod+F" = {
|
||||
action = fullscreen-window;
|
||||
hotkey-overlay = {title = "Toggle between fullscreen and tiled window.";};
|
||||
};
|
||||
"Mod+Equal" = {
|
||||
action = set-column-width "+10%";
|
||||
hotkey-overlay = {title = "Increase column width";};
|
||||
};
|
||||
"Mod+Minus" = {
|
||||
action = set-column-width "-10%";
|
||||
hotkey-overlay = {title = "Decrease column width";};
|
||||
};
|
||||
"Mod+Shift+M" = {
|
||||
action = set-column-width "50%";
|
||||
hotkey-overlay = {title = "Set column width to 50%";};
|
||||
};
|
||||
"Mod+M" = {
|
||||
action = maximize-column;
|
||||
hotkey-overlay = {title = "Maximize column.";};
|
||||
};
|
||||
"Mod+V" = {
|
||||
action = toggle-window-floating;
|
||||
hotkey-overlay = {title = "Toggle between floating and tiled window.";};
|
||||
};
|
||||
"Mod+O" = {
|
||||
action = toggle-overview;
|
||||
hotkey-overlay = {title = "Toggle overlay.";};
|
||||
};
|
||||
"Mod+H" = {
|
||||
action = focus-column-or-monitor-left;
|
||||
hotkey-overlay = {title = "Focus column on the left. Equivalent bindings for other directions.";};
|
||||
};
|
||||
"Mod+J" = {
|
||||
action = focus-window-or-workspace-down;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+K" = {
|
||||
action = focus-window-or-workspace-up;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+L" = {
|
||||
action = focus-column-or-monitor-right;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
action = focus-column-left;
|
||||
hotkey-overlay = {title = "Focus column on the left. Equivalent binding for other direction.";};
|
||||
};
|
||||
"Mod+WheelScrollDown" = {
|
||||
action = focus-column-right;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+WheelScrollUp" = {
|
||||
action = focus-workspace-up;
|
||||
hotkey-overlay = {title = "Focus previous workspace. Equivalent binding for other direction.";};
|
||||
};
|
||||
"Mod+Shift+WheelScrollDown" = {
|
||||
action = focus-workspace-down;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+H" = {
|
||||
action = move-column-left;
|
||||
hotkey-overlay = {title = "Move column to the left. Equivalent bindings for other directions.";};
|
||||
};
|
||||
"Mod+Shift+J" = {
|
||||
action = move-window-down;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+K" = {
|
||||
action = move-window-up;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+L" = {
|
||||
action = move-column-right;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
|
||||
# Niri workspaces
|
||||
"Mod+1" = {
|
||||
action = focus-workspace 1;
|
||||
hotkey-overlay = {title = "Focus workspace 1. Equivalent bindings for other workspaces.";};
|
||||
};
|
||||
"Mod+2" = {
|
||||
action = focus-workspace 2;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+3" = {
|
||||
action = focus-workspace 3;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+4" = {
|
||||
action = focus-workspace 4;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+5" = {
|
||||
action = focus-workspace 5;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+6" = {
|
||||
action = focus-workspace 6;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+7" = {
|
||||
action = focus-workspace 7;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+8" = {
|
||||
action = focus-workspace 8;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+9" = {
|
||||
action = focus-workspace 9;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+0" = {
|
||||
action = focus-workspace 10;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+1" = {
|
||||
action.move-window-to-workspace = 1;
|
||||
hotkey-overlay = {title = "Move current window to workspace 1. Equivalent bindings for other workspaces.";};
|
||||
};
|
||||
"Mod+Shift+2" = {
|
||||
action.move-window-to-workspace = 2;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+3" = {
|
||||
action.move-window-to-workspace = 3;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+4" = {
|
||||
action.move-window-to-workspace = 4;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+5" = {
|
||||
action.move-window-to-workspace = 5;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+6" = {
|
||||
action.move-window-to-workspace = 6;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+7" = {
|
||||
action.move-window-to-workspace = 7;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+8" = {
|
||||
action.move-window-to-workspace = 8;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+9" = {
|
||||
action.move-window-to-workspace = 9;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
"Mod+Shift+0" = {
|
||||
action.move-window-to-workspace = 10;
|
||||
hotkey-overlay = {hidden = true;};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
242
home/modules/niri/noctalia.nix
Normal file
242
home/modules/niri/noctalia.nix
Normal file
@ -0,0 +1,242 @@
|
||||
{color}: {
|
||||
enable = true;
|
||||
settings = {
|
||||
# configure noctalia here; defaults will
|
||||
# be deep merged with these attributes.
|
||||
|
||||
colorSchemes.predefinedScheme = "Catppuccin";
|
||||
|
||||
general = {
|
||||
avatarImage = ../../../config/face.jpeg;
|
||||
radiusRatio = 0.2;
|
||||
showScreenCorners = false;
|
||||
forceBlackScreenCorners = false;
|
||||
dimDesktop = true;
|
||||
scaleRatio = 1;
|
||||
screenRadiusRatio = 1;
|
||||
animationSpeed = 1;
|
||||
animationDisabled = false;
|
||||
compactLockScreen = false;
|
||||
lockOnSuspend = true;
|
||||
enableShadows = true;
|
||||
shadowDirection = "bottom_right";
|
||||
shadowOffsetX = 2;
|
||||
shadowOffsetY = 3;
|
||||
language = "";
|
||||
};
|
||||
|
||||
ui = {
|
||||
fontDefault = color.font;
|
||||
fontFixed = color.font;
|
||||
tooltipsEnabled = true;
|
||||
panelsAttachedToBar = true;
|
||||
settingsPanelAttachTobar = true;
|
||||
fontDefaultScale = 1;
|
||||
fontFixedScale = 1;
|
||||
settingsPanelAttachToBar = false;
|
||||
};
|
||||
|
||||
location = {
|
||||
name = "Dortmund, Germany";
|
||||
monthBeforeDay = true;
|
||||
weatherEnabled = true;
|
||||
useFahrenheit = false;
|
||||
use12hourFormat = false;
|
||||
showWeekNumberInCalendar = false;
|
||||
showCalendarEvents = true;
|
||||
showCalendarWeather = true;
|
||||
analogClockInCalendar = false;
|
||||
firstDayOfWeek = -1;
|
||||
};
|
||||
|
||||
screenRecorder = {
|
||||
directory = "~/Videos/Recordings";
|
||||
frameRate = 60;
|
||||
audioCodec = "aac";
|
||||
videoCodec = "h265";
|
||||
quality = "very_high";
|
||||
colorRange = "limited";
|
||||
showCursor = true;
|
||||
audioSource = "default_output";
|
||||
videoSource = "portal";
|
||||
};
|
||||
|
||||
wallpaper = {
|
||||
enabled = true;
|
||||
overviewEnabled = true;
|
||||
directory = "~/NixFlake/wallpapers";
|
||||
enableMultiMonitorDirectories = false;
|
||||
recursiveSearch = false;
|
||||
setWallpaperOnAllMonitors = true;
|
||||
defaultWallpaper = ../../../wallpapers/Windows.jpg;
|
||||
fillMode = "crop";
|
||||
fillColor = "#000000";
|
||||
randomEnabled = false;
|
||||
randomIntervalSec = 300;
|
||||
transitionDuration = 1500;
|
||||
transitionType = "random";
|
||||
transitionEdgeSmoothness = 0.05;
|
||||
monitors = [];
|
||||
panelPosition = "follow_bar";
|
||||
};
|
||||
|
||||
appLauncher = {
|
||||
enableClipboardHistory = true;
|
||||
position = "center";
|
||||
backgroundOpacity = 1;
|
||||
pinnedExecs = [];
|
||||
useApp2Unit = false;
|
||||
sortByMostUsed = true;
|
||||
terminalCommand = "kitty -e";
|
||||
customLaunchPrefixEnabled = false;
|
||||
customLaunchPrefix = "";
|
||||
};
|
||||
|
||||
dock = {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
network = {
|
||||
wifiEnabled = true;
|
||||
bluetoothEnabled = true;
|
||||
};
|
||||
|
||||
notifications = {
|
||||
enabled = true;
|
||||
monitors = [];
|
||||
location = "top_right";
|
||||
overlayLayer = true;
|
||||
backgroundOpacity = 1;
|
||||
respectExpireTimeout = false;
|
||||
lowUrgencyDuration = 3;
|
||||
normalUrgencyDuration = 8;
|
||||
criticalUrgencyDuration = 15;
|
||||
};
|
||||
|
||||
osd = {
|
||||
enabled = true;
|
||||
location = "top_right";
|
||||
monitors = [];
|
||||
autoHideMs = 2000;
|
||||
overlayLayer = true;
|
||||
};
|
||||
|
||||
audio = {
|
||||
volumeStep = 5;
|
||||
volumeOverdrive = true;
|
||||
cavaFrameRate = 30;
|
||||
visualizerType = "linear";
|
||||
visualizerQuality = "high";
|
||||
mprisBlacklist = [];
|
||||
preferredPlayer = "";
|
||||
};
|
||||
|
||||
nightLight = {
|
||||
enabled = false;
|
||||
forced = false;
|
||||
autoSchedule = true;
|
||||
nightTemp = "5000";
|
||||
dayTemp = "6500";
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "21:30";
|
||||
};
|
||||
|
||||
sessionMenu = {
|
||||
countdownDuration = 10000;
|
||||
enableCountdown = true;
|
||||
position = "center";
|
||||
powerOptions = [
|
||||
{
|
||||
action = "lock";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "suspend";
|
||||
enabled = false;
|
||||
}
|
||||
{
|
||||
action = "reboot";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "logout";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "shutdown";
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
showHeader = true;
|
||||
};
|
||||
|
||||
bar = {
|
||||
density = "default";
|
||||
position = "top";
|
||||
showCapsule = false;
|
||||
outerCorners = false;
|
||||
exclusive = true;
|
||||
backgroundOpacity = 1;
|
||||
monitors = [];
|
||||
floating = false;
|
||||
marginVertical = 0.25;
|
||||
marginHorizontal = 0.25;
|
||||
|
||||
widgets = {
|
||||
left = [
|
||||
{
|
||||
id = "SidePanelToggle";
|
||||
useDistroLogo = true;
|
||||
}
|
||||
{
|
||||
hideUnoccupied = false;
|
||||
id = "Workspace";
|
||||
labelMode = "none";
|
||||
}
|
||||
{
|
||||
id = "ActiveWindow";
|
||||
width = 250; # TODO: Doesn't work
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
id = "MediaMini";
|
||||
width = 250; # TODO: Doesn't work
|
||||
}
|
||||
{
|
||||
id = "AudioVisualizer";
|
||||
width = 100; # TODO: Doesn't work
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
id = "Volume";
|
||||
}
|
||||
{
|
||||
id = "Microphone";
|
||||
}
|
||||
{
|
||||
id = "WiFi";
|
||||
}
|
||||
{
|
||||
id = "Bluetooth";
|
||||
}
|
||||
{
|
||||
id = "Tray";
|
||||
drawer = false; # TODO: Doesn't work
|
||||
}
|
||||
{
|
||||
formatHorizontal = "yyyy:MM:dd HH:mm";
|
||||
formatVertical = "HH mm";
|
||||
id = "Clock";
|
||||
useMonospacedFont = true;
|
||||
usePrimaryColor = true;
|
||||
}
|
||||
{
|
||||
id = "NotificationHistory";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
7
home/modules/niri/options.nix
Normal file
7
home/modules/niri/options.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Niri";
|
||||
}
|
||||
@ -357,6 +357,10 @@ with mylib.networking; {
|
||||
flake = "/home/${username}/NixFlake";
|
||||
};
|
||||
|
||||
niri = {
|
||||
enable = !headless;
|
||||
};
|
||||
|
||||
ssh.startAgent = true; # Use gnupg
|
||||
starship.enable = true;
|
||||
xwayland.enable = !headless;
|
||||
|
||||
Reference in New Issue
Block a user