nixdots/home/programs/graphical/launchers/walker/default.nix

155 lines
4 KiB
Nix
Raw Normal View History

2024-06-10 17:55:38 +00:00
{
inputs,
2024-07-07 17:26:27 +00:00
config,
osConfig,
lib,
2024-06-10 17:55:38 +00:00
...
}: let
inherit (lib) mkIf;
2024-06-10 18:09:04 +00:00
cfg = osConfig.myOptions.home-manager.programs.launchers.walker;
in {
2024-07-26 23:07:07 +00:00
imports = [inputs.walker.homeManagerModules.walker];
config = mkIf cfg.enable {
programs.walker = {
enable = true;
runAsService = true; # makes walker a lot faster when starting
2024-06-10 17:55:38 +00:00
2024-07-07 17:26:27 +00:00
config = {
placeholder = "Search...";
ignore_mouse = false;
terminal = "kitty";
shell_config = "${config.xdg.configHome}/zsh/.zshrc";
ssh_host_file = "${config.home.homeDirectory}/.ssh/known_hosts";
enable_typeahead = false;
show_initial_entries = true;
fullscreen = false;
scrollbar_policy = "automatic";
websearch = {
2024-07-26 23:07:07 +00:00
engines = ["google" "duckduckgo"];
2024-07-07 17:26:27 +00:00
};
hyprland = {
context_aware_history = false;
};
applications = {
2024-07-26 23:07:07 +00:00
enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically
2024-07-07 17:26:27 +00:00
};
# Mode for picking the entry with keyboard using labels
# defaults to ctrl+<entry label>
activation_mode = {
disabled = false;
use_f_keys = false; # F-keys instead of letters for labels
use_alt = false; # use alt instead of ctrl to enter activation mode
};
search = {
delay = 0; # debounce delay (until src/cmd is ran) in ms
hide_icons = false;
margin_spinner = 10; # margin of the spinner in px
hide_spinner = false;
};
runner = {
2024-07-26 23:07:07 +00:00
excludes = ["rm"]; # commands to be excluded from the runner
2024-07-07 17:26:27 +00:00
};
clipboard = {
max_entries = 10;
image_height = 300;
};
align = {
ignore_exclusive = true;
width = 400;
horizontal = "center";
vertical = "start";
anchors = {
top = false;
left = false;
bottom = false;
right = false;
};
margins = {
top = 20;
bottom = 0;
end = 0;
start = 0;
};
};
list = {
height = 300;
width = 100;
margin_top = 10;
always_show = true;
hide_sub = false;
fixed_height = false;
};
orientation = "vertical";
icons = {
2024-07-26 23:07:07 +00:00
theme = ""; # GTK Icon theme (default)
2024-07-07 17:26:27 +00:00
hide = false;
size = 28;
image_height = 200;
};
# Built-in modules
modules = [
# Module switcher
{
name = "switcher";
prefix = "/";
}
# Default modules (always listed)
{
name = "runner";
prefix = "";
}
{
name = "applications";
prefix = "";
}
# Prefix modules
{
name = "hyprland";
prefix = "#";
}
{
name = "clipboard";
prefix = ">";
}
# Switcher exclusive modules (must be chosen)
{
name = "commands"; # walker commands
prefix = "";
switcher_exclusive = true;
}
{
name = "ssh";
prefix = "";
switcher_exclusive = true;
}
{
2024-07-26 23:07:07 +00:00
name = "websearch"; # uses google
2024-07-07 17:26:27 +00:00
prefix = "";
switcher_exclusive = true;
}
];
# Custom modules
external = [
{
name = "Home directory explorer";
prefix = "~";
src = "fd --base-directory ~ %TERM%";
cmd = "xdg-open file://%RESULT%";
}
{
name = "DDG search";
prefix = "?";
src = "jq -sRr '@uri'";
cmd = "xdg-open https://duckduckgo.com/?t=h_&q=%RESULT%&ia=web";
}
];
};
style = builtins.readFile ./style.css;
};
2024-06-10 17:55:38 +00:00
};
}