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")
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