flocon/modules/hm/programs/walker.nix
Anthony Rodriguez 861c658590
treewide: move styling to their respective modules
As a first step towards getting rid of home-manager and going towards a
cleaner, more concise configuration, I decided to move back the styling
to their respective home-manager modules. Since I'm not planning to
share my styling module anymore, as it is very specific to my config, I
just decided to merge everything together.

commit 078334af48
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Sun Jan 19 20:41:14 2025 +0100

    treewide: finish moving rest of styling to their respective hm modules

commit 57432a9655
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:13:54 2025 +0100

    treewide: move regreet styling out of module

commit 6fef9e0a76
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:10:33 2025 +0100

    treewide: move swaync styling out of module

commit 2f4a8433c7
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:06:33 2025 +0100

    treewide: move nvf styling out of module

commit a315915298
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:02:58 2025 +0100

    treewide: move hyprlock styling out of module

commit 0fe6f67b20
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:02:49 2025 +0100

    modules/nix/core/home-manager: import lib' in extraSpecialArgs

commit e09569b921
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 11:55:05 2025 +0100

    treewide: move hyprland styling out of module

commit eb25ce0c43
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 11:43:35 2025 +0100

    modules/nix/style/modules: remove styling for unused programs

commit efb6b91ce1
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 11:00:54 2025 +0100

    treewide: move foot styling out of module

commit 4c06a66b5e
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 10:56:05 2025 +0100

    treewide: move fish styling out of module

commit b3a03e5e9b
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 10:47:43 2025 +0100

    treewide: move discord styling out of module
2025-01-19 20:42:47 +01:00

184 lines
4 KiB
Nix

{
lib,
inputs,
osConfig,
...
}: let
styleCfg = osConfig.local.style;
in {
imports = [
inputs.walker.homeManagerModules.default
];
config = lib.mkIf osConfig.local.modules.hyprland.enable {
programs.walker = {
enable = true;
runAsService = true;
# All options from the config.json can be used here.
config = {
list = {
height = 200;
};
app_launch_prefix = "uwsm app -- ";
websearch.prefix = "?";
switcher.prefix = "/";
};
theme = with styleCfg.scheme.palette;
lib.mkIf styleCfg.enable {
style = ''
@define-color foreground ${base05};
@define-color background ${base00};
@define-color accent ${base0E};
#window,
#box,
#aiScroll,
#aiList,
#search,
#password,
#input,
#prompt,
#clear,
#typeahead,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#bar,
#sub,
#activationlabel {
all: unset;
}
#cfgerr {
background: rgba(255, 0, 0, 0.4);
margin-top: 20px;
padding: 8px;
font-size: 1.2em;
}
#window {
color: @foreground;
}
#box {
border-radius: 2px;
background: @background;
padding: 32px;
border: 1px solid ${base01};
box-shadow:
0 19px 38px rgba(0, 0, 0, 0.3),
0 15px 12px rgba(0, 0, 0, 0.22);
}
#search {
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.1),
0 1px 2px rgba(0, 0, 0, 0.22);
background: ${base01};
padding: 8px;
}
#prompt {
margin-left: 4px;
margin-right: 12px;
color: @foreground;
opacity: 0.2;
}
#clear {
color: @foreground;
opacity: 0.8;
}
#password,
#input,
#typeahead {
border-radius: 2px;
}
#input {
background: none;
}
#spinner {
padding: 8px;
}
#typeahead {
color: @foreground;
opacity: 0.8;
}
#input placeholder {
opacity: 0.5;
}
child {
padding: 8px;
border-radius: 2px;
}
child:selected,
child:hover {
background: alpha(@accent, 0.4);
}
#icon {
margin-right: 8px;
}
#label {
font-weight: 500;
}
#sub {
opacity: 0.5;
font-size: 0.8em;
}
.aiItem {
padding: 10px;
border-radius: 2px;
color: @foreground;
background: @background;
}
.aiItem.assistant {
background: ${base02};
}
.aiItem:hover {
background: alpha(@accent, 0.2);
color: ${base00};
}
#activationlabel {
color: @accent;
font-weight: bold;
}
'';
layout = {
ui.window.box = {
v_align = "center";
orientation = "vertical";
};
};
};
};
systemd.user.services.walker = {
Unit = {
PartOf = lib.mkForce [];
After = lib.mkForce ["graphical-session.target"];
};
Service = {
Slice = lib.mkForce "background-graphical.slice";
};
};
};
}