TimUntersberger / nog

A tiling window manager for Windows
MIT License
697 stars 20 forks source link

Documentation regarding nog.bar.components #239

Closed keepitsane closed 3 years ago

keepitsane commented 3 years ago

It would be using if the example config.ns included an example on how to use the included components. Even after importing the components I still need to use the full name for the components such as nog.bar.components.workspaces() if I do the following left: [workspaces()], nog seems to crash. Is the way I currently have it written the expected way or is this a bug?

import nog
import nog.bar.components

nog.bar.configure(#{
    font: "FiraCode NF",
    font_size: 17,
    color: 0x4B326E, 
    components: #{
        left: [nog.bar.components.workspaces()],
        center: [nog.bar.components.time("%l:%M:%S %p")],
        right: [nog.bar.components.active_mode(), nog.bar.components.padding(5), nog.bar.components.date("%a, %e %b %Y"), nog.bar.components.padding(1)]
    }
})
TimUntersberger commented 3 years ago

if you import nog.bar.components you should be able to do components.workspaces().

Maybe we should add something like import nog.bar.components.* ?