Next: (heks-linux ssh), Previous: (heks-linux rmpc), Up: API
Default value:
"/root/.config/rofi"
Default value:
"config.rasi"
Default value:
"skeu-icons-violet-dark"
Default value:
"/root/.local/bin"
Default value:
"heks-rofi-power-menu"
Default value:
"sss-theme.rasi"
Default value:
"/root/.local/bin"
Default value:
"heks-rofi-theme-menu"
Default value:
18
Write the launcher config and theme, plus the power and theme-picker
scripts. Local overrides are read from
$XDG_CONFIG_HOME/heks-linux/rofi-settings.scm first. The two
generated scripts are what make rofi -show power and rofi
-show theme work.
Generate the Bash script implementing the Rofi power script mode.
Rofi calls it with ROFI_RETV=0 to list the entries and with
ROFI_RETV=1 (the chosen entry as $1) to execute its
action.
Generate the Bash script implementing the Rofi theme script mode.
Choosing an entry rewrites
~/.config/heks-linux/local-settings.scm (keeping a .bak of
the previous file), runs maak install-theme to re-render every
palette-dependent dotfile, and then loads the matching Emacs theme into
the running daemon.
Three details make this feel like a switch rather than a rebuild. Each
palette is previewed with a swatch built from its own colours, so
choosing a theme is a visual decision instead of a guess at a name. The
Emacs theme comes from a generated table rather than from the palette
name, because several palettes wear a theme called something else -
heavy-metal wears ef-tritanopia-dark, for instance. And
the swatches are cached under $XDG_CACHE_HOME, fingerprinted by
the palette table, so the first open builds them once and every later
open is instant.
Render the Rofi config.rasi file.
The launcher is registered with four modes: drun (applications),
window (the Cmd-Tab style switcher), power (session
actions) and theme (the palette picker). The two script modes
live in ~/.local/bin next to this configuration.
The mouse is a first-class way to pick an entry, not a second one. Rofi’s default is that a click only moves the selection and a second click (or Return) accepts it, which on a launcher reads as a double click that sometimes works. The three options below are Rofi’s own recipe for the other behaviour - the selection follows the pointer, and one click accepts - so a launcher can be used with one hand on the mouse and no Return at all.
Ordered list of Rofi power-menu entries, each as (label icon
command).
Return the Rofi theme as a list of CSS rulesets. Every colour is looked
up in the current palette, so the launcher follows the theme. The
result is rendered with mk-css-conf-lines.
Next: (heks-linux ssh), Previous: (heks-linux rmpc), Up: API