feat: add walker and general launcher config

This commit is contained in:
2026-05-05 20:56:09 +02:00
parent fdf6ac5e08
commit c2082e942e
7 changed files with 105 additions and 73 deletions
+3 -40
View File
@@ -1,5 +1,6 @@
{
browserCommand,
launcherCommands,
shortcutCommands,
terminalCommand,
}:
@@ -15,10 +16,7 @@
};
"Mod+Space" = {
repeat = false;
action.spawn = [
"vicinae"
"toggle"
];
action.spawn = launcherCommands.open;
hotkey-overlay.title = "App Launcher";
};
"Mod+E" = {
@@ -43,10 +41,7 @@
};
"Mod+Ctrl+F" = {
repeat = false;
action.spawn = [
shortcutCommands.vicinaeCommand
"files"
];
action.spawn = launcherCommands.files;
hotkey-overlay.title = "Find Files";
};
"Mod+V" = {
@@ -54,38 +49,6 @@
action.spawn = shortcutCommands.clipboardHistory;
hotkey-overlay.title = "Clipboard History";
};
"Mod+Ctrl+N" = {
repeat = false;
action.spawn = [
shortcutCommands.vicinaeCommand
"nix-options"
];
hotkey-overlay.title = "NixOS Options";
};
"Mod+Ctrl+H" = {
repeat = false;
action.spawn = [
shortcutCommands.vicinaeCommand
"home-manager-options"
];
hotkey-overlay.title = "Home Manager Options";
};
"Mod+Ctrl+P" = {
repeat = false;
action.spawn = [
shortcutCommands.vicinaeCommand
"nix-packages"
];
hotkey-overlay.title = "Nix Packages";
};
"Mod+Ctrl+W" = {
repeat = false;
action.spawn = [
shortcutCommands.vicinaeCommand
"niri-windows"
];
hotkey-overlay.title = "Windows";
};
"Mod+Ctrl+C" = {
repeat = false;
action.spawn = shortcutCommands.pickColor;
+5 -32
View File
@@ -6,6 +6,9 @@
}:
let
nixosConfigDir = repo.account.nixosConfigurationPath;
launcherDmenuCommand =
lib.concatMapStringsSep " " lib.escapeShellArg
config.meta.desktop.launcher.commands.dmenu;
mkTerminalScript =
{
name,
@@ -122,45 +125,15 @@ rec {
'';
};
vicinaeCommand = pkgs.writeShellApplication {
name = "niri-shortcut-vicinae-command";
runtimeInputs = [ config.programs.vicinae.package ];
text = ''
case "''${1:-}" in
files)
link="vicinae://extensions/sameoldlab/fuzzy-files/find"
;;
nix-options)
link="vicinae://extensions/knoopx/nix/options"
;;
home-manager-options)
link="vicinae://extensions/knoopx/nix/home-manager-options"
;;
nix-packages)
link="vicinae://extensions/knoopx/nix/packages"
;;
niri-windows)
link="vicinae://extensions/knoopx/niri/windows"
;;
*)
printf 'unknown Vicinae command target: %s\n' "''${1:-}" >&2
exit 64
;;
esac
exec vicinae deeplink "$link"
'';
};
clipboardHistory = pkgs.writeShellApplication {
name = "niri-shortcut-clipboard-history";
runtimeInputs = [
pkgs.cliphist
config.programs.vicinae.package
config.meta.desktop.launcher.package
pkgs.wl-clipboard
];
text = ''
selection="$(cliphist list | vicinae dmenu --navigation-title Clipboard --placeholder 'Search clipboard' --no-metadata)"
selection="$(cliphist list | ${launcherDmenuCommand})"
if [ -z "$selection" ]; then
exit 0
fi
+1
View File
@@ -164,6 +164,7 @@ in
binds = import ./_bindings.nix {
browserCommand = config.meta.desktop.browser.command;
launcherCommands = config.meta.desktop.launcher.commands;
terminalCommand = config.meta.desktop.terminal.command;
shortcutCommands = shortcuts.commands;
};
+27
View File
@@ -5,13 +5,16 @@ in
{
flake.modules.homeManager.vicinae =
{
config,
pkgs,
inputs,
lib,
...
}:
let
repoTheme = repo.theme.kanagawa;
palette = repoTheme.palette;
launcherCommand = lib.getExe config.programs.vicinae.package;
in
{
programs.vicinae = {
@@ -70,5 +73,29 @@ in
ssh
];
};
meta.desktop.launcher = {
package = config.programs.vicinae.package;
commands = {
open = [
launcherCommand
"toggle"
];
files = [
launcherCommand
"deeplink"
"vicinae://extensions/sameoldlab/fuzzy-files/find"
];
dmenu = [
launcherCommand
"dmenu"
"--navigation-title"
"Clipboard"
"--placeholder"
"Search clipboard"
"--no-metadata"
];
};
};
};
}
+33
View File
@@ -0,0 +1,33 @@
{
flake.modules.homeManager.walker =
{ config, lib, ... }:
let
launcherCommand = lib.getExe config.services.walker.package;
in
{
services.walker = {
enable = true;
systemd.enable = true;
};
meta.desktop.launcher = {
package = config.services.walker.package;
commands = {
open = [ launcherCommand ];
files = [
launcherCommand
"--query"
"/"
"--placeholder"
"Find files"
];
dmenu = [
launcherCommand
"--dmenu"
"--placeholder"
"Search clipboard"
];
};
};
};
}