nexoniarz-config-nixos/dotfiles/rofi/config.rasi
2026-08-30 01:26:52 +02:00

115 lines
3.1 KiB
Text

/* Rofi launcher configuration
* Deployed to ~/.config/rofi/config.rasi via systemd.tmpfiles in
* modules/desktop.nix. Squared, sharp, no rounded corners.
*
* Colors live in theme.rasi (imported below), regenerated live by
* rofi-theme-set from the Quickshell Theme picker (dotfiles/quickshell/
* Theme.qml) — same accent/bg/fg/border values Hyprland, GTK, and Kitty
* all sync to. Rofi has no config watcher, but it's launched on demand
* rather than staying resident, so the next open just picks up whatever
* is on disk — no reload step needed.
*/
@import "theme.rasi"
configuration {
modi: "drun,run,window";
show-icons: true;
/* icon-theme comes from theme.rasi (imported above), set live by
rofi-theme-set to track dark/light mode. */
display-drun: "";
display-run: "";
display-window: "";
drun-display-format: "{name}";
font: "JetBrainsMono Nerd Font 11";
}
* {
background-color: @bg;
text-color: @fg;
margin: 0px;
padding: 0px;
spacing: 0px;
/* Rofi's built-in "default" theme (always loaded first, see
`rofi -dump-theme`) defines its own named vars — background,
foreground, lightbg, lightfg, blue, red — and alternate/active/
urgent row states read THOSE, not our bg/fg/accent. Explicit
`element.normal.alternate{...}` overrides below turned out not
to reliably win against them, so redefine the base theme's own
variables directly instead (same fix shape as GTK's
@define-color trick) — this is what actually stopped every
other row rendering in stock Solarized cream. */
background: @bg;
foreground: @fg;
lightbg: @bg-alt;
lightfg: @fg;
blue: @accent;
red: @accent;
}
window {
width: 600px;
border: 2px;
border-color: @border-color;
border-radius: 0px;
background-color: @bg;
}
mainbox {
children: [ "inputbar", "listview" ];
}
inputbar {
padding: 12px;
background-color: @bg-alt;
border: 0px 0px 2px 0px;
border-color: @border-color;
border-radius: 0px;
children: [ "prompt", "entry" ];
}
prompt {
text-color: @accent;
padding: 0px 8px 0px 0px;
}
entry {
placeholder: "Search...";
placeholder-color: @placeholder;
text-color: @fg;
}
listview {
lines: 8;
scrollbar: false;
padding: 8px;
}
element {
padding: 8px 12px;
border-radius: 0px;
spacing: 10px;
}
/* State selectors are dot-joined with no space (element.normal.normal,
not "element normal.normal") — the latter silently matches nothing,
which is why unselected rows never actually picked up @bg/@fg before
and fell back to rofi's built-in cream default on every other row. */
element.normal.normal, element.normal.alternate {
background-color: @bg;
text-color: @fg;
}
element.selected.normal, element.selected.alternate {
background-color: @accent;
text-color: @bg;
}
element-icon {
size: 20px;
}
element-text {
text-color: inherit;
vertical-align: 0.5;
}