Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
available-modules = [
&dwm_date= { date "+DATE: %d/%m/%y TIME: %H:%M:%S" }
&dwm_battery= { acpi -b | cut -d ',' -f 2 | cut -d ' ' -f 2 }
]
modules = [ ]
fn populate {
modules = (keys $available-modules | each [m]{
put "[ "($available-modules[$m])" ]"
})
}
while $true {
populate
xsetroot -name (joins ' ' $modules)
sleep 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.