fix(rofi): resolve whole-swap launcher @import and page the app grid
The Apps launcher (`rofi -show drun -theme launcher`) imported `custom.rasi` — the name HM gives *generated* themes — but a whole-swap theme's base is deployed under its source basename (`rofi.rasi`), so the import resolved against $HOME and rofi errored with "custom.rasi not found" on every whole-swap theme. Make the default import track the active base (rofi.rasi for whole-swaps, custom.rasi otherwise) and point Boreal's own launcher.rasi at rofi.rasi. Also give Boreal's app grid `flow: horizontal` so Down at a column's foot pages to the next screen instead of jumping to the next column's top, mirroring the theme-picker grid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -23,8 +23,9 @@ let
|
||||
# Kept separate from the base theme so a theme can give the launcher its
|
||||
# own layout (e.g. Boreal's icon grid) WITHOUT that layout leaking into
|
||||
# the text menus, which share the base theme and need a list. The default
|
||||
# just re-imports the active theme (custom.rasi, written by HM to the same
|
||||
# themes dir), so every other theme's launcher is byte-for-byte its list.
|
||||
# just re-imports the active base theme (custom.rasi for generated themes,
|
||||
# rofi.rasi for whole-swaps — see the dataFile below), so every other
|
||||
# theme's launcher is byte-for-byte its list.
|
||||
launcherOverride = cfg.themesDir + "/${t.slug}/launcher.rasi";
|
||||
hasLauncherOverride = builtins.pathExists launcherOverride;
|
||||
|
||||
@@ -855,13 +856,17 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
# The launcher theme lives beside HM's generated theme
|
||||
# (~/.local/share/rofi/themes/custom.rasi), so `@import "custom.rasi"`
|
||||
# in the default resolves to the active theme.
|
||||
# The launcher theme lives beside HM's active base theme, which it
|
||||
# @imports so the default launcher is byte-for-byte that theme's list.
|
||||
# HM names that base by its SOURCE: a generated (attrset) theme lands as
|
||||
# custom.rasi, but a whole-swap theme (a path — themes/<slug>/rofi.rasi)
|
||||
# keeps its basename, rofi.rasi. Import must match, or `-theme launcher`
|
||||
# dies with "custom.rasi not found" (rofi resolves the missing import
|
||||
# against $HOME) on every whole-swap theme.
|
||||
xdg.dataFile."rofi/themes/launcher.rasi".text =
|
||||
if hasLauncherOverride
|
||||
then builtins.readFile launcherOverride
|
||||
else ''@import "custom.rasi"'';
|
||||
else ''@import "${if hasRasiOverride then "rofi.rasi" else "custom.rasi"}"'';
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user