walker: modify config
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
982af3ed06
commit
7b3653162a
3 changed files with 90 additions and 52 deletions
|
@ -7,8 +7,12 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.custom.programs.walker;
|
cfg = config.custom.programs.walker;
|
||||||
|
hm = config.home-manager.users.${config.custom.username};
|
||||||
in {
|
in {
|
||||||
options.custom.programs.walker.enable = mkOption {default = false;};
|
options.custom.programs.walker = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
icons = mkOption {default = ["edit-find" "terminal"];};
|
||||||
|
};
|
||||||
|
|
||||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||||
imports = [inputs.walker.homeManagerModules.default];
|
imports = [inputs.walker.homeManagerModules.default];
|
||||||
|
@ -24,32 +28,49 @@ in {
|
||||||
runAsService = true;
|
runAsService = true;
|
||||||
|
|
||||||
# https://github.com/abenz1267/walker/wiki/Basic-Configuration
|
# https://github.com/abenz1267/walker/wiki/Basic-Configuration
|
||||||
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
|
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.toml
|
||||||
config = {
|
config = {
|
||||||
activation_mode.disabled = true; # Key chords
|
activation_mode.disabled = true; # Key chords
|
||||||
|
close_when_open = true;
|
||||||
|
disable_click_to_close = true;
|
||||||
force_keyboard_focus = true;
|
force_keyboard_focus = true;
|
||||||
list.placeholder = "";
|
hotreload_theme = true;
|
||||||
search.placeholder = "";
|
ignore_mouse = true;
|
||||||
|
|
||||||
# HACK: Window client required to send Esc key on Hyprland
|
list = {
|
||||||
#// as_window = true; # Disable layer
|
placeholder = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
search = {
|
||||||
|
placeholder = "";
|
||||||
|
resume_last_query = true;
|
||||||
|
};
|
||||||
|
|
||||||
# https://github.com/abenz1267/walker/wiki/Modules
|
# https://github.com/abenz1267/walker/wiki/Modules
|
||||||
# https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/tree/master/Papirus/64x64
|
# https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/tree/master/Papirus/64x64
|
||||||
disabled = [
|
disabled = [
|
||||||
|
"ai"
|
||||||
"commands"
|
"commands"
|
||||||
"custom_commands"
|
"custom_commands"
|
||||||
|
"finder"
|
||||||
"websearch" # Replaced by custom plugin
|
"websearch" # Replaced by custom plugin
|
||||||
"windows"
|
"windows"
|
||||||
];
|
];
|
||||||
|
|
||||||
builtins = {
|
builtins = let
|
||||||
|
in {
|
||||||
applications = {
|
applications = {
|
||||||
# BUG: Ghost entries are still visible with single module
|
|
||||||
actions.enabled = false;
|
actions.enabled = false;
|
||||||
hide_actions_with_empty_query = true;
|
hide_without_query = true;
|
||||||
|
|
||||||
placeholder = "";
|
placeholder = "";
|
||||||
|
show_generic = false;
|
||||||
|
switcher_only = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
bookmarks = {
|
||||||
|
icon = "user-bookmarks";
|
||||||
|
placeholder = "";
|
||||||
|
prefix = "b";
|
||||||
switcher_only = false;
|
switcher_only = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -70,7 +91,7 @@ in {
|
||||||
|
|
||||||
dmenu = {
|
dmenu = {
|
||||||
keep_sort = true;
|
keep_sort = true;
|
||||||
placeholder = "";
|
placeholder = "Input";
|
||||||
switcher_only = true;
|
switcher_only = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,7 +104,7 @@ in {
|
||||||
finder = {
|
finder = {
|
||||||
icon = "filetypes";
|
icon = "filetypes";
|
||||||
placeholder = "";
|
placeholder = "";
|
||||||
prefix = "/";
|
prefix = "//";
|
||||||
show_icon_when_single = true;
|
show_icon_when_single = true;
|
||||||
switcher_only = false;
|
switcher_only = false;
|
||||||
};
|
};
|
||||||
|
@ -106,29 +127,46 @@ in {
|
||||||
|
|
||||||
switcher = {
|
switcher = {
|
||||||
icon = "application-default-icon";
|
icon = "application-default-icon";
|
||||||
prefix = "?";
|
prefix = "/";
|
||||||
show_icon_when_single = true;
|
show_icon_when_single = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
placeholder = "";
|
||||||
|
prefix = "sym";
|
||||||
|
switcher_only = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
translation = {
|
||||||
|
icon = "translator";
|
||||||
|
placeholder = "";
|
||||||
|
prefix = "tr";
|
||||||
|
switcher_only = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
websearch = {
|
||||||
|
placeholder = "system-search";
|
||||||
|
switcher_only = false;
|
||||||
|
entries = [{}];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: Keybinds
|
||||||
|
# https://github.com/abenz1267/walker/wiki/Keybinds
|
||||||
|
|
||||||
# https://github.com/abenz1267/walker/wiki/Plugins
|
# https://github.com/abenz1267/walker/wiki/Plugins
|
||||||
plugins = [
|
plugins = [
|
||||||
# Search engines by keyword prefix
|
|
||||||
{
|
{
|
||||||
|
# Search engines by keyword prefix
|
||||||
name = "search";
|
name = "search";
|
||||||
placeholder = "";
|
placeholder = "";
|
||||||
show_icon_when_single = true;
|
show_icon_when_single = true;
|
||||||
switcher_only = true;
|
switcher_only = false;
|
||||||
|
|
||||||
src = "${pkgs.writeShellApplication {
|
src = "${pkgs.writeShellApplication {
|
||||||
name = "search";
|
name = "search";
|
||||||
text = readFile ./search.sh;
|
text = readFile ./search.sh;
|
||||||
|
runtimeInputs = with pkgs; [coreutils jq xdg-utils];
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
coreutils
|
|
||||||
jq
|
|
||||||
xdg-utils
|
|
||||||
];
|
|
||||||
}}/bin/search '%TERM%'";
|
}}/bin/search '%TERM%'";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -138,21 +176,17 @@ in {
|
||||||
theme = {
|
theme = {
|
||||||
style = ''
|
style = ''
|
||||||
#box {
|
#box {
|
||||||
|
border: ${toString config.custom.border}px #073642 solid;
|
||||||
font: larger ${config.custom.settings.fonts.sans-serif};
|
font: larger ${config.custom.settings.fonts.sans-serif};
|
||||||
}
|
}
|
||||||
|
|
||||||
placeholder {
|
|
||||||
font: larger ${config.custom.settings.fonts.monospace};
|
|
||||||
}
|
|
||||||
|
|
||||||
${readFile ./style.css}
|
${readFile ./style.css}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
#!! Inherit from default layout
|
# https://github.com/abenz1267/walker/blob/master/internal/config/layout.default.toml
|
||||||
# https://github.com/abenz1267/walker/blob/master/internal/config/layout.default.json
|
|
||||||
layout.ui.window = let
|
layout.ui.window = let
|
||||||
w = 750;
|
w = 750;
|
||||||
h = 250;
|
h = 300;
|
||||||
in {
|
in {
|
||||||
width = w;
|
width = w;
|
||||||
height = h;
|
height = h;
|
||||||
|
@ -162,12 +196,6 @@ in {
|
||||||
width = -1;
|
width = -1;
|
||||||
height = -1;
|
height = -1;
|
||||||
|
|
||||||
ai_scroll = {
|
|
||||||
# BUG: AiScroll H/VScrollbarPolicy applies to Scroll widget
|
|
||||||
h_scrollbar_policy = "external";
|
|
||||||
v_scrollbar_policy = "external";
|
|
||||||
};
|
|
||||||
|
|
||||||
scroll = {
|
scroll = {
|
||||||
h_align = "fill";
|
h_align = "fill";
|
||||||
h_scrollbar_policy = "external";
|
h_scrollbar_policy = "external";
|
||||||
|
@ -182,11 +210,6 @@ in {
|
||||||
max_height = h;
|
max_height = h;
|
||||||
|
|
||||||
item = {
|
item = {
|
||||||
icon = {
|
|
||||||
icon_size = "larger"; # 64px
|
|
||||||
pixel_size = 32; # Downscale
|
|
||||||
};
|
|
||||||
|
|
||||||
text = {
|
text = {
|
||||||
sub = {
|
sub = {
|
||||||
hide = true; # Subtext
|
hide = true; # Subtext
|
||||||
|
@ -195,17 +218,31 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
search = {
|
|
||||||
input = {
|
|
||||||
icons = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# # HACK: Create theme files for module prompt icons
|
||||||
|
# #?? MODULE.theme = "icon-ICON"
|
||||||
|
# # https://github.com/abenz1267/walker/blob/bb584eab3b0cc48ebfbac1a5da019864d74781c4/nix/hm-module.nix#L86
|
||||||
|
# xdg.configFile = listToAttrs (flatten (forEach cfg.icons (
|
||||||
|
# icon: [
|
||||||
|
# {
|
||||||
|
# name = "walker/themes/icon-${icon}.css";
|
||||||
|
# value = {text = hm.programs.walker.theme.style;};
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# name = "walker/themes/icon-${icon}.json";
|
||||||
|
# value = {
|
||||||
|
# text = builtins.toJSON (recursiveUpdate hm.programs.walker.theme.layout {
|
||||||
|
# ui.window.box.search.prompt.icon = icon;
|
||||||
|
# });
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# )));
|
||||||
|
|
||||||
# HACK: Allow child processes to live, otherwise applications launched through service are killed on stop
|
# HACK: Allow child processes to live, otherwise applications launched through service are killed on stop
|
||||||
# https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#KillMode=
|
# https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#KillMode=
|
||||||
systemd.user.services.walker.Service.KillMode = "process";
|
systemd.user.services.walker.Service.KillMode = "process";
|
||||||
|
|
|
@ -94,7 +94,7 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
'k '*)
|
'k '*)
|
||||||
label="Kagi"
|
label="Kagi"
|
||||||
icon="kagi"
|
icon="plasma-search"
|
||||||
url="https://kagi.com/search?q="
|
url="https://kagi.com/search?q="
|
||||||
query="${1:2}"
|
query="${1:2}"
|
||||||
;;
|
;;
|
||||||
|
@ -249,10 +249,11 @@ case "$1" in
|
||||||
query="${1:2}"
|
query="${1:2}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
label="Search"
|
exit
|
||||||
icon="globe-symbolic"
|
# label="Search"
|
||||||
url="https://search.brave.com/search?q="
|
# icon="globe-symbolic"
|
||||||
query="$1"
|
# url="https://search.brave.com/search?q="
|
||||||
|
# query="$1"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/***
|
/***
|
||||||
/* !! Inherits system GTK theme
|
/* !! Inherits system GTK theme
|
||||||
https://github.com/abenz1267/walker/blob/master/internal/config/themes/bare.css
|
https://github.com/abenz1267/walker/blob/master/internal/config/themes/colors.css
|
||||||
|
https://github.com/abenz1267/walker/blob/master/internal/config/themes/default.css
|
||||||
https://docs.gtk.org/gtk4/css-properties.html
|
https://docs.gtk.org/gtk4/css-properties.html
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
@ -12,7 +13,6 @@ https://docs.gtk.org/gtk4/css-properties.html
|
||||||
/* Visible window overlay */
|
/* Visible window overlay */
|
||||||
#box {
|
#box {
|
||||||
background: #002b36;
|
background: #002b36;
|
||||||
border: 2px #073642 solid;
|
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue