Getting Started
installation
runtime requirements:
gtk4gtk4-layer-shelllibpulselibudev
install from crates:
cargo install lushell
create config
~/.config/lush/init.lua
local lush = require("lush")
local ui = lush.ui
ui.css("style.css")
lush.data.use("cpu", { interval = 2 })
lush.data.use("memory", { interval = 2 })
ui.windows({
ui.window({
name = "bar",
position = "top",
exclusive = true,
height = 30,
root = ui.hbox({
spacing = 8,
children = {
ui.label({
bind = "data.cpu.percent",
format = "cpu {value}%",
}),
ui.label({
bind = "data.memory.percent",
format = "mem {value}%",
}),
ui.clock({
format = "%H:%M:%S",
}),
},
}),
}),
})
will use your gtk theme by default if it supports gtk4
~/.config/lush/style.css
* {
font-family: monospace;
font-size: 14px;
}
run
with default config location:
lush
control from shell
lush ping
lush list
lush toggle bar
lush reload
lush reload-css
config lookup order
LUSH_CONFIG$XDG_CONFIG_HOME/lush/init.lua$HOME/.config/lush/init.lua./init.lua
if LUSH_CONFIG is a directory, lush uses <dir>/init.lua.
next
- learn runtime modules in runutime api
- see all widget fields in widgets reference
- see all emitted keys in signals reference
- copy ready patterns from recipes