Skip to content

Commit d6b4976

Browse files
committed
disable unused walker plugins
1 parent 6294fea commit d6b4976

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

home/niri.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ in {
274274
"Mod+Return".action = spawn "ghostty";
275275
"Mod+D".action = spawn "fuzzel";
276276
"Mod+Space".action = spawn "walker";
277+
"Mod+Shift+S".action.spawn = ["walker" "-m" "nirisessions"];
277278
"Mod+E".action = spawn "nemo";
278279
"Mod+B".action = spawn "brave";
279280
"Mod+Ctrl+L".action = spawn "swaylock";

home/walker.nix

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,65 @@ in {
1515
# which leaves orphans if the compositor crashes and re-runs).
1616
home.packages = [pkgs.walker pkgs.elephant];
1717

18+
# Niri session definitions. Triggered from walker → "Current Layout".
19+
# Uses proportional column widths so it survives monitor swaps.
20+
# Workspace 1: Brave (≈70%) + Ghostty (≈30%) side by side.
21+
xdg.configFile."elephant/nirisessions.toml".text = ''
22+
[[sessions]]
23+
name = "Daily"
24+
25+
[[sessions.workspaces]]
26+
# Brave (70%) + Ghostty (30%) side by side. After all windows spawn,
27+
# focus the first column so Brave is active.
28+
# Commands wrapped in `systemd-run --user --no-block --collect --` so
29+
# each spawn becomes a child of systemd user manager, not elephant.
30+
# This makes them survive `systemctl --user restart elephant walker`.
31+
windows = [
32+
{ command = "systemd-run --user --no-block --collect -- brave-origin", app_id = "brave-origin", after = [
33+
"niri msg action set-column-width '70%'",
34+
] },
35+
{ command = "systemd-run --user --no-block --collect -- ghostty", app_id = "com.mitchellh.ghostty", after = [
36+
"niri msg action set-column-width '30%'",
37+
] },
38+
]
39+
after = [
40+
"niri msg action focus-column-first",
41+
]
42+
'';
43+
44+
# Elephant config — restrict which providers get loaded into memory.
45+
# Each provider indexed costs roughly 10-25 MB resident; trimming the
46+
# full auto-load set down to three cuts elephant's working set by
47+
# ~80-120 MB.
48+
# KEEP: desktopapplications (core grid), windows (alt-tab style focus),
49+
# nirisessions (saved layouts). Drop the rest.
50+
xdg.configFile."elephant/elephant.toml".text = ''
51+
# Wrap every spawn in a systemd transient service unit so launched apps
52+
# survive walker/elephant daemon restarts. Service mode (no --scope)
53+
# detaches the process from the launcher entirely; --no-block returns
54+
# immediately, --collect garbage-collects the unit after the app exits.
55+
launch_prefix = "systemd-run --user --no-block --collect --"
56+
57+
ignored_providers = [
58+
"providerlist",
59+
"niriactions",
60+
"wireplumber",
61+
"symbols",
62+
"playerctl",
63+
"unicode",
64+
"clipboard",
65+
"bluetooth",
66+
"snippets",
67+
"websearch",
68+
"bookmarks",
69+
"archlinuxpkgs",
70+
"runner",
71+
"calc",
72+
"todo",
73+
"files",
74+
]
75+
'';
76+
1877
systemd.user.services.elephant = {
1978
Unit = {
2079
Description = "Elephant data backend for the Walker launcher";

0 commit comments

Comments
 (0)