flake: update + walker rework

This commit is contained in:
ItsDrike 2024-08-07 20:19:47 +02:00
parent e52008cf2c
commit 3fea2d081e
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
5 changed files with 260 additions and 205 deletions

View file

@ -304,11 +304,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722462338, "lastModified": 1723015306,
"narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=", "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "6e090576c4824b16e8759ebca3958c5b09659ee8", "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -430,11 +430,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1722185531, "lastModified": 1722813957,
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=", "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d", "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -559,11 +559,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1719058240, "lastModified": 1722689807,
"narHash": "sha256-pprpeDB/mvINS5m5FIOq/1I0xpBvO8l7FyWNmmO0Ir0=", "narHash": "sha256-8YZ2T0o2bcSaXmEbuxIhbb7u4MpVSU7BGdgPpLy6RNk=",
"owner": "schizofox", "owner": "schizofox",
"repo": "schizofox", "repo": "schizofox",
"rev": "becff9b92a28c3cd6e6a215da7f5f56883d3a304", "rev": "cd6fbdda984644176ad45bfb4ecfb61fd190b95d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -603,11 +603,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722485526, "lastModified": 1723004010,
"narHash": "sha256-bIO63IKm8Frw9lLCqthj/fYphS0i3oGCfw1Lkh5HkPI=", "narHash": "sha256-9NaGh1bUlIWrRJXY3qTmX5IFa+5xEP2wf8J0DCi/Wxs=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "e42c13fcca982699b5b56da962a474401c109228", "rev": "5a4a301de746e16851165b0da8ab6d38ed37b8dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -654,11 +654,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722436631, "lastModified": 1723046394,
"narHash": "sha256-CdmXKOgRnPIg7H8Cc8PKmw9+l3yJF3xP83tZ7a9i7kQ=", "narHash": "sha256-WvUtvAfuhTL128OIDGgRcKjXkqbLkyypG711nlGmMNw=",
"owner": "abenz1267", "owner": "abenz1267",
"repo": "walker", "repo": "walker",
"rev": "b21d226d9ec6e379b13b633515af301d223cedcd", "rev": "bb2f7fa6a01ec92388e992cc9a8348e72fa00622",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -0,0 +1,100 @@
{
"list": {
"max_entries": 50,
"show_initial_entries": true,
"single_click": true
},
"search": {
"force_keyboard_focus": true,
"history": true,
"placeholder": "Search...",
"delay": 0
},
"activation_mode": {},
"builtins": {
"applications": {
"name": "applications",
"placeholder": "Applications",
"actions": true,
"prioritize_new": true,
"context_aware": true,
"refresh": true,
"show_sub_when_single": true,
"show_icon_when_single": true
},
"windows": {
"icon": "view-restore",
"name": "windows",
"placeholder": "Windows"
},
"clipboard": {
"name": "clipboard",
"placeholder": "Clipboard",
"image_height": 300,
"max_entries": 10,
"switcher_only": true
},
"commands": {
"icon": "utilities-terminal",
"switcher_only": true,
"name": "commands",
"placeholder": "Commands"
},
"custom_commands": {
"icon": "utilities-terminal",
"name": "custom_commands",
"placeholder": "Custom Commands"
},
"emojis": {
"name": "emojis",
"placeholder": "Emojis",
"switcher_only": true,
"history": true,
"typeahead": true
},
"finder": {
"icon": "folder",
"name": "finder",
"placeholder": "Finder",
"switcher_only": true,
"ignore_gitignore": true,
"refresh": true,
"concurrency": 8
},
"runner": {
"icon": "utilities-terminal",
"name": "runner",
"placeholder": "Runner",
"typeahead": true,
"history": true,
"generic_entry": false,
"refresh": true
},
"ssh": {
"icon": "preferences-system-network",
"name": "ssh",
"placeholder": "SSH",
"switcher_only": true,
"history": true,
"refresh": true
},
"switcher": {
"name": "switcher",
"placeholder": "Switcher",
"prefix": "/"
},
"websearch": {
"icon": "applications-internet",
"name": "websearch",
"placeholder": "Websearch",
"engines": [
"google"
]
},
"dmenu": {
"name": "dmenu",
"placeholder": "Dmenu",
"switcher_only": true
}
}
}

View file

@ -8,147 +8,17 @@
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.launchers.walker; cfg = osConfig.myOptions.home-manager.programs.launchers.walker;
in { in {
imports = [inputs.walker.homeManagerModules.walker]; imports = [inputs.walker.homeManagerModules.default];
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.walker = { programs.walker = {
enable = true; enable = true;
runAsService = true; # makes walker a lot faster when starting runAsService = true; # makes walker a lot faster when starting
config = { config = lib.importJSON ./config.json;
placeholder = "Search..."; theme = {
ignore_mouse = false; layout = lib.importJSON ./layout.json;
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 = {
engines = ["google" "duckduckgo"];
};
hyprland = {
context_aware_history = false;
};
applications = {
enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically
};
# 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 = {
excludes = ["rm"]; # commands to be excluded from the runner
};
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 = {
theme = ""; # GTK Icon theme (default)
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;
}
{
name = "websearch"; # uses google
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; style = builtins.readFile ./style.css;
}; };
}; };
};
} }

View file

@ -0,0 +1,40 @@
{
"ui": {
"anchors": {
"top": true
},
"window": {
"v_align": "start",
"box": {
"width": 400,
"margins": {
"top": 200
},
"v_align": "start",
"h_align": "center",
"search": {
"width": 400,
"spacing": 10
},
"scroll": {
"list": {
"width": 400,
"max_height": 300,
"min_width": 400,
"max_width": 400,
"item": {
"spacing": 5,
"activation_label": {
"x_align": 1.0,
"width": 20
},
"icon": {
"theme": "Papirus"
}
}
}
}
}
}
}
}

View file

@ -1,90 +1,135 @@
* { #window,
color: #dcd7ba; #box,
#search,
#password,
#input,
#typeahead,
#spinner,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#sub,
#activationlabel {
all: unset;
} }
#window { #window {
background: #1c1c23; background: none;
opacity: 0.9;
border: 4px solid #26262d;
} }
#box { #box {
background: #16161d; background: #303446;
padding: 10px; padding: 16px;
border-radius: 2px; border-radius: 8px;
box-shadow:
0 19px 38px rgba(0, 0, 0, 0.3),
0 15px 12px rgba(0, 0, 0, 0.22);
} }
#searchwrapper {} scrollbar {
#search,
#typeahead {
border-radius: 0;
outline: none;
outline-width: 0px;
box-shadow: none;
border-bottom: none;
border: none;
background: #1f1f28;
padding-left: 10px;
padding-right: 10px;
padding-top: 0px;
padding-bottom: 0px;
border-radius: 2px;
}
#spinner {
opacity: 0;
}
#spinner.visible {
opacity: 1;
}
#typeahead {
background: none; background: none;
padding-left: 8px;
}
slider {
min-width: 2px;
background: #7f849c;
opacity: 0.5; opacity: 0.5;
} }
#search placeholder { #search {
}
#password,
#input,
#typeahead {
background: #363a4f;
background: none;
box-shadow: none;
border-radius: 0px;
border-radius: 32px;
color: #c6d0f5;
padding-left: 12px;
padding-right: 12px;
}
#input {
background: none;
}
#input > *:first-child,
#typeahead > *:first-child {
color: #7f849c;
margin-right: 7px;
}
#input > *:last-child,
#typeahead > *:last-child {
color: #7f849c;
}
#spinner {
}
#typeahead {
color: #89b4fa;
}
#input placeholder {
opacity: 0.5; opacity: 0.5;
} }
#list { #list {
background: #1c1c23;
} }
row:selected { child {
background: rgba(100, 100, 100, 0.3); border-radius: 8px;
color: #cad3f5;
padding: 4px;
} }
.item { child:selected,
padding: 5px; child:hover {
border-radius: 2px; background: #414559;
box-shadow: none;
color: #cad3f5;
} }
.icon { #item {
padding-right: 5px;
} }
.textwrapper {} #icon {
}
.label {} #text {
}
.sub { #label {
font-weight: bold;
color: #cad3f5;
}
#sub {
opacity: 0.5; opacity: 0.5;
color: #cad3f5;
} }
.activationlabel { #activationlabel {
opacity: 0.25; opacity: 0.5;
padding-right: 4px;
} }
.activation .activationlabel { .activation #activationlabel {
font-weight: bold;
color: #89b4fa;
opacity: 1; opacity: 1;
color: #76946a;
} }
.activation .textwrapper, .activation #text,
.activation .icon, .activation #icon,
.activation .search { .activation #search {
opacity: 0.5;
} }