Skip to content

Instantly share code, notes, and snippets.

@zzamboni
Last active January 14, 2020 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zzamboni/56b2c42f09e40af51848f6b2fb8b2318 to your computer and use it in GitHub Desktop.
Save zzamboni/56b2c42f09e40af51848f6b2fb8b2318 to your computer and use it in GitHub Desktop.
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