Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7299f5bb79 | |||
| c2082e942e |
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -77,9 +77,7 @@ in
|
||||
name = repoTheme.kanagawa.gtkThemeName;
|
||||
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
|
||||
};
|
||||
gtk4.theme = {
|
||||
inherit (config.gtk.theme) name package;
|
||||
};
|
||||
gtk4.theme = null;
|
||||
iconTheme = {
|
||||
name = repoTheme.kanagawa.iconThemeName;
|
||||
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
flake.modules.homeManager.walker =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
elephantCommand = lib.getExe pkgs.elephant;
|
||||
launcherCommand = lib.getExe config.services.walker.package;
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.elephant ];
|
||||
|
||||
services.walker = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
elephant = {
|
||||
Unit = {
|
||||
Description = "Elephant application launcher backend";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = elephantCommand;
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
};
|
||||
|
||||
walker.Unit = {
|
||||
Wants = [ "elephant.service" ];
|
||||
After = [ "elephant.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
meta.desktop.launcher = {
|
||||
package = config.services.walker.package;
|
||||
commands = {
|
||||
open = [ launcherCommand ];
|
||||
files = [
|
||||
launcherCommand
|
||||
"--query"
|
||||
"/"
|
||||
"--placeholder"
|
||||
"Find files"
|
||||
];
|
||||
dmenu = [
|
||||
launcherCommand
|
||||
"--dmenu"
|
||||
"--placeholder"
|
||||
"Search clipboard"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -108,6 +108,37 @@ let
|
||||
}
|
||||
);
|
||||
|
||||
launcherType = lib.types.submodule (
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
};
|
||||
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = lib.getExe config.package;
|
||||
defaultText = lib.literalExpression "lib.getExe config.package";
|
||||
};
|
||||
|
||||
commands = {
|
||||
open = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
files = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
dmenu = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
displayType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
@@ -236,6 +267,10 @@ in
|
||||
type = desktopApplicationType;
|
||||
};
|
||||
|
||||
options.meta.desktop.launcher = lib.mkOption {
|
||||
type = launcherType;
|
||||
};
|
||||
|
||||
options.meta.pinentry.package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ in
|
||||
homeModules.primary-terminal-kitty
|
||||
homeModules.terminal-foot
|
||||
homeModules.theme
|
||||
homeModules.vicinae
|
||||
homeModules.walker
|
||||
homeModules.noctalia
|
||||
{
|
||||
programs.discord = {
|
||||
|
||||
Reference in New Issue
Block a user