Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7299f5bb79 | |||
| c2082e942e |
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
browserCommand,
|
browserCommand,
|
||||||
|
launcherCommands,
|
||||||
shortcutCommands,
|
shortcutCommands,
|
||||||
terminalCommand,
|
terminalCommand,
|
||||||
}:
|
}:
|
||||||
@@ -15,10 +16,7 @@
|
|||||||
};
|
};
|
||||||
"Mod+Space" = {
|
"Mod+Space" = {
|
||||||
repeat = false;
|
repeat = false;
|
||||||
action.spawn = [
|
action.spawn = launcherCommands.open;
|
||||||
"vicinae"
|
|
||||||
"toggle"
|
|
||||||
];
|
|
||||||
hotkey-overlay.title = "App Launcher";
|
hotkey-overlay.title = "App Launcher";
|
||||||
};
|
};
|
||||||
"Mod+E" = {
|
"Mod+E" = {
|
||||||
@@ -43,10 +41,7 @@
|
|||||||
};
|
};
|
||||||
"Mod+Ctrl+F" = {
|
"Mod+Ctrl+F" = {
|
||||||
repeat = false;
|
repeat = false;
|
||||||
action.spawn = [
|
action.spawn = launcherCommands.files;
|
||||||
shortcutCommands.vicinaeCommand
|
|
||||||
"files"
|
|
||||||
];
|
|
||||||
hotkey-overlay.title = "Find Files";
|
hotkey-overlay.title = "Find Files";
|
||||||
};
|
};
|
||||||
"Mod+V" = {
|
"Mod+V" = {
|
||||||
@@ -54,38 +49,6 @@
|
|||||||
action.spawn = shortcutCommands.clipboardHistory;
|
action.spawn = shortcutCommands.clipboardHistory;
|
||||||
hotkey-overlay.title = "Clipboard History";
|
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" = {
|
"Mod+Ctrl+C" = {
|
||||||
repeat = false;
|
repeat = false;
|
||||||
action.spawn = shortcutCommands.pickColor;
|
action.spawn = shortcutCommands.pickColor;
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
nixosConfigDir = repo.account.nixosConfigurationPath;
|
nixosConfigDir = repo.account.nixosConfigurationPath;
|
||||||
|
launcherDmenuCommand =
|
||||||
|
lib.concatMapStringsSep " " lib.escapeShellArg
|
||||||
|
config.meta.desktop.launcher.commands.dmenu;
|
||||||
mkTerminalScript =
|
mkTerminalScript =
|
||||||
{
|
{
|
||||||
name,
|
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 {
|
clipboardHistory = pkgs.writeShellApplication {
|
||||||
name = "niri-shortcut-clipboard-history";
|
name = "niri-shortcut-clipboard-history";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
pkgs.cliphist
|
pkgs.cliphist
|
||||||
config.programs.vicinae.package
|
config.meta.desktop.launcher.package
|
||||||
pkgs.wl-clipboard
|
pkgs.wl-clipboard
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
selection="$(cliphist list | vicinae dmenu --navigation-title Clipboard --placeholder 'Search clipboard' --no-metadata)"
|
selection="$(cliphist list | ${launcherDmenuCommand})"
|
||||||
if [ -z "$selection" ]; then
|
if [ -z "$selection" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ in
|
|||||||
|
|
||||||
binds = import ./_bindings.nix {
|
binds = import ./_bindings.nix {
|
||||||
browserCommand = config.meta.desktop.browser.command;
|
browserCommand = config.meta.desktop.browser.command;
|
||||||
|
launcherCommands = config.meta.desktop.launcher.commands;
|
||||||
terminalCommand = config.meta.desktop.terminal.command;
|
terminalCommand = config.meta.desktop.terminal.command;
|
||||||
shortcutCommands = shortcuts.commands;
|
shortcutCommands = shortcuts.commands;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -77,9 +77,7 @@ in
|
|||||||
name = repoTheme.kanagawa.gtkThemeName;
|
name = repoTheme.kanagawa.gtkThemeName;
|
||||||
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
|
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
|
||||||
};
|
};
|
||||||
gtk4.theme = {
|
gtk4.theme = null;
|
||||||
inherit (config.gtk.theme) name package;
|
|
||||||
};
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = repoTheme.kanagawa.iconThemeName;
|
name = repoTheme.kanagawa.iconThemeName;
|
||||||
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
|
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
|
||||||
|
|||||||
@@ -5,13 +5,16 @@ in
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.vicinae =
|
flake.modules.homeManager.vicinae =
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
repoTheme = repo.theme.kanagawa;
|
repoTheme = repo.theme.kanagawa;
|
||||||
palette = repoTheme.palette;
|
palette = repoTheme.palette;
|
||||||
|
launcherCommand = lib.getExe config.programs.vicinae.package;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.vicinae = {
|
programs.vicinae = {
|
||||||
@@ -70,5 +73,29 @@ in
|
|||||||
ssh
|
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 (
|
displayType = lib.types.submodule (
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
@@ -236,6 +267,10 @@ in
|
|||||||
type = desktopApplicationType;
|
type = desktopApplicationType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.meta.desktop.launcher = lib.mkOption {
|
||||||
|
type = launcherType;
|
||||||
|
};
|
||||||
|
|
||||||
options.meta.pinentry.package = lib.mkOption {
|
options.meta.pinentry.package = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ in
|
|||||||
homeModules.primary-terminal-kitty
|
homeModules.primary-terminal-kitty
|
||||||
homeModules.terminal-foot
|
homeModules.terminal-foot
|
||||||
homeModules.theme
|
homeModules.theme
|
||||||
homeModules.vicinae
|
homeModules.walker
|
||||||
homeModules.noctalia
|
homeModules.noctalia
|
||||||
{
|
{
|
||||||
programs.discord = {
|
programs.discord = {
|
||||||
|
|||||||
Reference in New Issue
Block a user