This commit is contained in:
kiri committed 2026-08-22 16:55:00 +02:00
1 parent 81e576a877
commit cde67e4d75
46 files changed
+619 -518

No files matched your search

+6 -11
View File
@@ -1,29 +1,24 @@
{
browserCommand,
launcherCommand,
browser,
launcher,
shortcutCommands,
terminalCommand,
terminal,
}:
{
# Application and utility launchers
"Mod+Return" = {
action.spawn = terminalCommand;
action.spawn = terminal;
hotkey-overlay.title = "Terminal";
};
"Mod+B" = {
action.spawn = browserCommand;
action.spawn = browser;
hotkey-overlay.title = "Browser";
};
"Mod+Space" = {
repeat = false;
action.spawn = launcherCommand;
action.spawn = launcher;
hotkey-overlay.title = "App Launcher";
};
"Mod+E" = {
repeat = false;
action.spawn = shortcutCommands.neovimProjects;
hotkey-overlay.title = "Neovim Projects";
};
"Mod+Ctrl+Return" = {
repeat = false;
action.spawn = shortcutCommands.nixosTerminal;
+2 -10
View File
@@ -1,11 +1,10 @@
{
config,
facts,
lib,
pkgs,
}:
let
nixosConfigDir = facts.account.nixosConfigurationPath;
nixosConfigDir = config.facts.account.nixosConfigurationPath;
mkTerminalScript =
{
name,
@@ -28,7 +27,7 @@ let
text = lib.concatStringsSep "\n" [
"# shellcheck disable=SC2016"
"cd ${lib.escapeShellArg workdir}"
"exec ${lib.escapeShellArg config.facts.desktop.terminalCommand} ${argString}"
"exec ${lib.escapeShellArgs config.desktop.commands.terminal} ${argString}"
];
};
in
@@ -83,13 +82,6 @@ rec {
'';
};
neovimProjects = mkTerminalScript {
name = "niri-shortcut-neovim-projects";
command = ''
nvim -c 'Telescope projects'
'';
};
pickColor = pkgs.writeShellApplication {
name = "niri-shortcut-pick-color";
runtimeInputs = [
+19 -18
View File
@@ -4,7 +4,7 @@
...
}:
let
facts = config.facts;
kanagawa = import ../_kanagawa.nix;
hmModules = config.flake.modules.homeManager;
in
{
@@ -41,11 +41,10 @@ in
...
}:
let
borderPalette = facts.theme.kanagawa.palette.niri.border;
palette = kanagawa.palette;
shortcuts = import ./_shortcuts.nix {
inherit
config
facts
lib
pkgs
;
@@ -60,6 +59,7 @@ in
[
playerctl
brightnessctl
wireplumber
xwayland-satellite
]
++ lib.attrValues shortcuts.scripts;
@@ -72,17 +72,16 @@ in
_: display:
{
position = {
x = display.x or 0;
y = display.y or 0;
inherit (display) x y;
};
}
// lib.optionalAttrs (display.primary or false) {
// lib.optionalAttrs display.primary {
"focus-at-startup" = true;
}
// lib.optionalAttrs (display ? scale) {
// lib.optionalAttrs (display.scale != null) {
inherit (display) scale;
}
// lib.optionalAttrs (display ? width && display ? height && display ? refresh) {
// lib.optionalAttrs (display.width != null) {
mode = {
inherit (display)
height
@@ -95,16 +94,16 @@ in
environment.DISPLAY = ":0";
spawn-at-startup = [
{ command = [ "xwayland-satellite" ]; }
{ command = [ "noctalia" ]; }
];
{ command = [ (lib.getExe pkgs.xwayland-satellite) ]; }
]
++ map (command: { inherit command; }) config.desktop.autostart;
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
screenshot-path = "${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%dT%H:%M:%S.png";
animations.slowdown = 0.6;
cursor = {
cursor = lib.mkIf config.home.pointerCursor.enable {
inherit (config.home.pointerCursor) size;
theme = config.home.pointerCursor.name;
hide-after-inactive-ms = 3000;
@@ -120,9 +119,9 @@ in
border = {
enable = true;
width = 3;
active.color = borderPalette.active;
inactive.color = borderPalette.inactive;
urgent.color = borderPalette.urgent;
active.color = palette.accents.blue;
inactive.color = palette.subtleBorder;
urgent.color = palette.accents.red;
};
};
@@ -157,9 +156,11 @@ in
};
binds = import ./_bindings.nix {
browserCommand = config.facts.desktop.browserCommand;
launcherCommand = config.facts.desktop.launcherCommand;
terminalCommand = config.facts.desktop.terminalCommand;
inherit (config.desktop.commands)
browser
launcher
terminal
;
shortcutCommands = shortcuts.commands;
};
};