diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index 3ad9389..64ee6eb 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -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//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; diff --git a/themes/boreal/launcher.rasi b/themes/boreal/launcher.rasi index f1d412a..bdd4d0e 100644 --- a/themes/boreal/launcher.rasi +++ b/themes/boreal/launcher.rasi @@ -2,12 +2,13 @@ * Boreal — app-launcher override (themes//launcher.rasi). * Installed to ~/.local/share/rofi/themes/launcher.rasi and used only by * `rofi -show drun` (the SUPER+Space / SUPER+D launcher). It inherits the - * frosted aurora panel from the sibling custom.rasi (the active theme), + * frosted aurora panel from the sibling rofi.rasi (this whole-swap theme, + * which HM deploys under its source basename — rofi.rasi — not custom.rasi), * then reshapes the list into a 4×3 grid of large application icons. * Text menus keep the list — they don't use this theme. */ -@import "custom.rasi" +@import "rofi.rasi" window { width: 780px; } @@ -17,6 +18,10 @@ listview { fixed-columns: true; spacing: 10px; padding: 6px 0px 0px 0px; + /* Fill row-by-row so Down at a column's foot pages to the next screen + instead of jumping to the top of the next column (rofi's default + Vertical flow). Mirrors the theme-picker grid in rofi.nix. */ + flow: horizontal; } element {