Adding theming for walker
This commit is contained in:
+320
-386
File diff suppressed because it is too large
Load Diff
+11
-77
@@ -2251,96 +2251,30 @@ in
|
||||
** Walker
|
||||
[[https://github.com/abenz1267/walker][This]] is how I launch applications. It is bound to Win+Space in the ./asstes/conf/desktop/hypr/bindings.conf.
|
||||
#+begin_src nix :tangle home/desktop/walker.nix :noweb tangle :mkdirp yes.
|
||||
{ config, pkgs, lib, inputs ? null, ... }:
|
||||
|
||||
{ config, pkgs, lib, flakeRoot, inputs ? null, ... }:
|
||||
let
|
||||
walkerPkg =
|
||||
if inputs != null && inputs ? walker
|
||||
then inputs.walker.packages.${pkgs.system}.default
|
||||
else pkgs.walker;
|
||||
|
||||
elephantPkg =
|
||||
if inputs != null && inputs ? elephant
|
||||
then inputs.elephant.packages.${pkgs.system}.default
|
||||
else pkgs.elephant;
|
||||
|
||||
sessionTarget = "graphical-session.target";
|
||||
# NEW: both theme files now live here
|
||||
repoThemesDir = flakeRoot + "/assets/conf/desktop/walker/themes";
|
||||
in
|
||||
{
|
||||
xdg.enable = true;
|
||||
|
||||
home.packages = [
|
||||
walkerPkg
|
||||
elephantPkg
|
||||
];
|
||||
|
||||
systemd.user.services.elephant = {
|
||||
Unit = {
|
||||
Description = "Elephant backend for Walker";
|
||||
PartOf = [ sessionTarget ];
|
||||
After = [ sessionTarget ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${elephantPkg}/bin/elephant";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
|
||||
# Ensure Elephant can create its socket under:
|
||||
# /run/user/$UID/elephant/...
|
||||
RuntimeDirectory = "elephant";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
|
||||
# Light hardening (DO NOT use ProtectSystem=strict here)
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ sessionTarget ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.walker = {
|
||||
Unit = {
|
||||
Description = "Walker GApplication service";
|
||||
PartOf = [ sessionTarget ];
|
||||
After = [ sessionTarget "elephant.service" ];
|
||||
Wants = [ "elephant.service" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${walkerPkg}/bin/walker --gapplication-service";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
|
||||
# Light hardening
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ sessionTarget ];
|
||||
};
|
||||
};
|
||||
home.packages = [ walkerPkg elephantPkg ];
|
||||
# ~/.config/walker/themes/*
|
||||
xdg.configFile."walker/themes/default.css".source = repoThemesDir + "/default.css";
|
||||
xdg.configFile."walker/themes/walker.css".source = repoThemesDir + "/walker.css";
|
||||
# xdg.configFile."walker/themes/default.html".source = repoThemesDir + "/default.html";
|
||||
# (services unchanged)
|
||||
systemd.user.services.elephant = { /* ... your existing service ... */ };
|
||||
systemd.user.services.walker = { /* ... your existing service ... */ };
|
||||
}
|
||||
#+end_src
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/* AUTO GENERATED. DO NOT EDIT. CHANGES WILL BE OVERWRITTEN. */
|
||||
|
||||
@define-color foreground rgba(255, 255, 255, 0.8);
|
||||
@define-color background hsla(240, 12.7%, 13.9%, 0.98);
|
||||
@define-color color1 hsl(172, 100%, 25.3%);
|
||||
/* AUTO GENERATED. DO NOT EDIT. CHANGES WILL BE OVERWRITTEN. */
|
||||
|
||||
#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 lighter(@background);
|
||||
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: lighter(@background);
|
||||
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;
|
||||
}
|
||||
|
||||
#password {
|
||||
}
|
||||
|
||||
#spinner {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#typeahead {
|
||||
color: @foreground;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#input placeholder {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#list {
|
||||
}
|
||||
|
||||
child {
|
||||
padding: 8px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
child:selected,
|
||||
child:hover {
|
||||
background: alpha(@color1, 0.4);
|
||||
}
|
||||
|
||||
#item {
|
||||
}
|
||||
|
||||
#icon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#text {
|
||||
}
|
||||
|
||||
#label {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#sub {
|
||||
opacity: 0.5;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
#activationlabel {
|
||||
}
|
||||
|
||||
#bar {
|
||||
}
|
||||
|
||||
.barentry {
|
||||
}
|
||||
|
||||
.activation #activationlabel {
|
||||
}
|
||||
|
||||
.activation #text,
|
||||
.activation #icon,
|
||||
.activation #search {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.aiItem {
|
||||
padding: 10px;
|
||||
border-radius: 2px;
|
||||
color: @foreground;
|
||||
background: @background;
|
||||
}
|
||||
|
||||
.aiItem.user {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.aiItem.assistant {
|
||||
background: lighter(@background);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
# Walker UI layout/theme config (Catppuccin Mocha tuned)
|
||||
# - Centered box, stable width
|
||||
# - Catppuccin accent markers
|
||||
# - More balanced padding/margins
|
||||
|
||||
[ui.anchors]
|
||||
top = true
|
||||
left = true
|
||||
right = true
|
||||
bottom = false # don't stretch to full height; keeps it as a panel
|
||||
|
||||
[ui.window]
|
||||
h_align = "fill"
|
||||
v_align = "fill"
|
||||
|
||||
[ui.window.box]
|
||||
h_align = "center"
|
||||
# Single source of truth for the main content width
|
||||
width = 520
|
||||
|
||||
[ui.window.box.margins]
|
||||
top = 140
|
||||
|
||||
[ui.window.box.bar]
|
||||
orientation = "horizontal"
|
||||
position = "end"
|
||||
|
||||
[ui.window.box.bar.entry]
|
||||
h_align = "fill"
|
||||
h_expand = true
|
||||
|
||||
[ui.window.box.bar.entry.icon]
|
||||
h_align = "center"
|
||||
h_expand = false
|
||||
pixel_size = 22
|
||||
theme = "" # leave empty to inherit your system icon theme (Papirus etc.)
|
||||
|
||||
# --- AI scroll area (match main width, reduce hardcoding) ---
|
||||
[ui.window.box.ai_scroll]
|
||||
name = "aiScroll"
|
||||
h_align = "fill"
|
||||
v_align = "fill"
|
||||
min_width = 520
|
||||
width = 520
|
||||
max_height = 260
|
||||
height = 260
|
||||
|
||||
[ui.window.box.ai_scroll.margins]
|
||||
top = 10
|
||||
|
||||
[ui.window.box.ai_scroll.list]
|
||||
name = "aiList"
|
||||
orientation = "vertical"
|
||||
width = 520
|
||||
spacing = 10
|
||||
|
||||
[ui.window.box.ai_scroll.list.item]
|
||||
name = "aiItem"
|
||||
h_align = "fill"
|
||||
v_align = "fill"
|
||||
x_align = 0
|
||||
y_align = 0
|
||||
wrap = true
|
||||
|
||||
# --- Main results list ---
|
||||
[ui.window.box.scroll.list]
|
||||
# Catppuccin Mocha accent (pick one):
|
||||
# - teal: #94e2d5
|
||||
# - blue: #89b4fa
|
||||
marker_color = "#89b4fa"
|
||||
max_height = 360
|
||||
min_width = 520
|
||||
max_width = 520
|
||||
width = 520
|
||||
|
||||
[ui.window.box.scroll.list.margins]
|
||||
top = 10
|
||||
|
||||
[ui.window.box.scroll.list.item.activation_label]
|
||||
h_align = "fill"
|
||||
v_align = "fill"
|
||||
width = 22
|
||||
x_align = 0.5
|
||||
y_align = 0.5
|
||||
|
||||
[ui.window.box.scroll.list.item.icon]
|
||||
pixel_size = 24
|
||||
theme = "" # inherit system icon theme
|
||||
|
||||
# --- Search row (icons + input) ---
|
||||
[ui.window.box.search.prompt]
|
||||
name = "prompt"
|
||||
icon = "edit-find"
|
||||
theme = ""
|
||||
pixel_size = 18
|
||||
h_align = "center"
|
||||
v_align = "center"
|
||||
|
||||
[ui.window.box.search.clear]
|
||||
name = "clear"
|
||||
icon = "edit-clear"
|
||||
theme = ""
|
||||
pixel_size = 18
|
||||
h_align = "center"
|
||||
v_align = "center"
|
||||
|
||||
[ui.window.box.search.input]
|
||||
h_align = "fill"
|
||||
h_expand = true
|
||||
icons = true
|
||||
|
||||
[ui.window.box.search.spinner]
|
||||
hide = true
|
||||
@@ -0,0 +1,157 @@
|
||||
/* Catppuccin Mocha Walker Theme */
|
||||
|
||||
/* --- Palette --- */
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color red #f38ba8;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
|
||||
/* --- Walker expected tokens --- */
|
||||
@define-color foreground @text;
|
||||
@define-color background alpha(@mantle, 0.98);
|
||||
@define-color color1 @blue;
|
||||
|
||||
/* --- Reset --- */
|
||||
#window,
|
||||
#box,
|
||||
#aiScroll,
|
||||
#aiList,
|
||||
#search,
|
||||
#password,
|
||||
#input,
|
||||
#prompt,
|
||||
#clear,
|
||||
#typeahead,
|
||||
#list,
|
||||
child,
|
||||
scrollbar,
|
||||
slider,
|
||||
#item,
|
||||
#text,
|
||||
#label,
|
||||
#bar,
|
||||
#sub,
|
||||
#activationlabel {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
/* --- Error --- */
|
||||
#cfgerr {
|
||||
background: alpha(@red, 0.4);
|
||||
margin-top: 20px;
|
||||
padding: 8px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* --- Window --- */
|
||||
#window {
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
/* --- Main container --- */
|
||||
#box {
|
||||
border-radius: 6px;
|
||||
background: @background;
|
||||
padding: 32px;
|
||||
border: 1px solid @surface1;
|
||||
box-shadow:
|
||||
0 19px 38px alpha(@crust, 0.5),
|
||||
0 15px 12px alpha(@crust, 0.35);
|
||||
}
|
||||
|
||||
/* --- Search --- */
|
||||
#search {
|
||||
background: @surface0;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid @surface1;
|
||||
}
|
||||
|
||||
#prompt {
|
||||
margin-left: 4px;
|
||||
margin-right: 12px;
|
||||
color: @overlay1;
|
||||
}
|
||||
|
||||
#clear {
|
||||
color: @overlay2;
|
||||
}
|
||||
|
||||
/* --- Inputs --- */
|
||||
#password,
|
||||
#input,
|
||||
#typeahead {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#input {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#typeahead {
|
||||
color: @subtext1;
|
||||
}
|
||||
|
||||
#input placeholder {
|
||||
color: @overlay0;
|
||||
}
|
||||
|
||||
/* --- List --- */
|
||||
child {
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Hover / Selection */
|
||||
child:selected,
|
||||
child:hover {
|
||||
background: alpha(@color1, 0.25);
|
||||
}
|
||||
|
||||
/* --- Text --- */
|
||||
#label {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#sub {
|
||||
color: @subtext0;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* --- Activation --- */
|
||||
.activation #text,
|
||||
.activation #icon,
|
||||
.activation #search {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* --- AI Panel --- */
|
||||
.aiItem {
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
color: @foreground;
|
||||
background: @mantle;
|
||||
}
|
||||
|
||||
.aiItem.assistant {
|
||||
background: @surface0;
|
||||
}
|
||||
@@ -1,91 +1,25 @@
|
||||
{ config, pkgs, lib, inputs ? null, ... }:
|
||||
|
||||
{ config, pkgs, lib, flakeRoot, inputs ? null, ... }:
|
||||
let
|
||||
walkerPkg =
|
||||
if inputs != null && inputs ? walker
|
||||
then inputs.walker.packages.${pkgs.system}.default
|
||||
else pkgs.walker;
|
||||
|
||||
elephantPkg =
|
||||
if inputs != null && inputs ? elephant
|
||||
then inputs.elephant.packages.${pkgs.system}.default
|
||||
else pkgs.elephant;
|
||||
|
||||
sessionTarget = "graphical-session.target";
|
||||
# NEW: both theme files now live here
|
||||
repoThemesDir = flakeRoot + "/assets/conf/desktop/walker/themes";
|
||||
in
|
||||
{
|
||||
xdg.enable = true;
|
||||
|
||||
home.packages = [
|
||||
walkerPkg
|
||||
elephantPkg
|
||||
];
|
||||
|
||||
systemd.user.services.elephant = {
|
||||
Unit = {
|
||||
Description = "Elephant backend for Walker";
|
||||
PartOf = [ sessionTarget ];
|
||||
After = [ sessionTarget ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${elephantPkg}/bin/elephant";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
|
||||
# Ensure Elephant can create its socket under:
|
||||
# /run/user/$UID/elephant/...
|
||||
RuntimeDirectory = "elephant";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
|
||||
# Light hardening (DO NOT use ProtectSystem=strict here)
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ sessionTarget ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.walker = {
|
||||
Unit = {
|
||||
Description = "Walker GApplication service";
|
||||
PartOf = [ sessionTarget ];
|
||||
After = [ sessionTarget "elephant.service" ];
|
||||
Wants = [ "elephant.service" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${walkerPkg}/bin/walker --gapplication-service";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
|
||||
# Light hardening
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ sessionTarget ];
|
||||
};
|
||||
};
|
||||
home.packages = [ walkerPkg elephantPkg ];
|
||||
# ~/.config/walker/themes/*
|
||||
xdg.configFile."walker/themes/default.css".source = repoThemesDir + "/default.css";
|
||||
xdg.configFile."walker/themes/walker.css".source = repoThemesDir + "/walker.css";
|
||||
# xdg.configFile."walker/themes/default.html".source = repoThemesDir + "/default.html";
|
||||
# (services unchanged)
|
||||
systemd.user.services.elephant = { /* ... your existing service ... */ };
|
||||
systemd.user.services.walker = { /* ... your existing service ... */ };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user