Next: (heks-linux rofi), Previous: (heks-linux palette), Up: API
Translate msg using the current text domain.
(G_ "Hello")
Recursively flatten a nested list structure xs into a single flat list.
(flatten-list '(1 (2 (3 4)) 5)) ⇒ (1 2 3 4 5)
Write contents to a file named name inside directory dir. If dir does not exist, it will be created automatically.
(install-config-file! #:name "config.toml"
#:dir "/etc/myapp"
#:contents "[settings]
port = 8080")
Dynamically load a machine-specific configuration file within a target module.
Look for an optional configuration file at the path
$XDG_CONFIG_HOME/heks-linux/profile-name.scm, defaulting to
~/.config/heks-linux/profile-name.scm if
XDG_CONFIG_HOME is not set or empty. If the file exists,
temporarily switch the active module context to module-name using
save-module-excursion before executing load.
This ensures that the localized configuration script evaluates within the namespace where the module’s parameters and internal definitions are bound, preventing unbound variable errors.
(load-local-overrides '(heks-linux waybar) 'waybar-settings)
Format an association list of pairs into a CSS ruleset string.
(mk-css-conf-lines '((body (color . "black") (margin . 0))))
⇒ "body {
color: black;
margin: 0;
}
"
Format an association list of pairs into configuration lines using template.
(mk-kv-conf-lines '((host . "localhost") (port . 80))) ⇒ "host=localhost port=80 "
Join a list of items into a single string, appending a newline to each item.
(mk-lines '("foo" "bar"))
⇒ "foo
bar
"
Recursively format nested configuration pairs into a string using template. This handles both top-level key-values and nested blocks as INI-style sections.
(mk-rec-kv-conf-lines '((settings (port . 8080))) #:template "~a=~a ") ⇒ " [settings] port=8080 "
Install the Nix package specified by the attribute path x via system call.
(nix-profile-install "nixpkgs.tmux")
Serialize a single configuration item using template to the current output port. If the item’s value is a list, it formats the key as an INI-style section header.
(with-output-to-string (lambda () (serialize-rec-conf-item "~a=~a " '(port . 80)))) ⇒ "port=80 "
Initialize internationalization (i18n) locales and text domains for the application. Safely catches and logs errors if initialization fails.
Execute the system command cmd via an input pipe and return its stdout. If silent? is true, the output is also printed to the current output port.
(syscall "echo 'hello'") ⇒ "hello "
Next: (heks-linux rofi), Previous: (heks-linux palette), Up: API