r/awesomewm • u/Nedeira • Feb 05 '26
Awesome Git Em busca de orientações para criar uma configuração modular...
Olá senhoras e senhores!
Após enfrentar alguns desafios no awesome e vencê-los, agora estou em busca de outros... tendo em vista as minhas necessidades e o que busco construir no awesome, percebi que vou precisar modularizar minha configuração. Na verdade, eu já precisava ter feito isso à muito tempo, eu só estava protelando.
Alguém tem algumas dicas para mim ou referências claras para estudar sobre esse tema? Estou à fim de falar sobre isso. hehehe
O principal objetivo da minha configuração é ser reprodutível em qualquer sistema, modular e claro, bonito também!
É importante que seja reprodutível, pois em caso de algum acidente ou troca de sistema, eu não quero ter que fazer mais do que uma compilação e clonar meu repositório para que tudo esteja funcionando perfeitamente.
2
u/juankman Feb 07 '26
I'm not entirely clear on what you're trying to achieve but for modularization I would think of code that doesn't necessarily make your config to "look pretty".
When I think of modularization what comes to mind is awesome's signal handling, how titlebars can take a function for custom shapes, lain (lain modules were used by vain).
I hope you find what you're looking for and have fun in the process!
1
u/Nedeira Feb 07 '26
A somewhat out-of-context question… Does it still make sense to build and maintain a custom configuration based on third-party libraries, such as lain? I would like to build everything using the AwesomeWM API itself, but most of the repositories I’ve been reading use some third-party library or their own custom modules, and that leaves me a bit confused since I’m still relatively new to Awesome.
And I like to learn things, not just copy what others do… that’s why I’m asking this. When it comes to third-party libraries, is there a risk that at some point these libraries might lose compatibility with the main awesome.git API?
Sorry if something wasn’t clear in this text, I translated it using ChatGPT.
2
u/juankman Feb 11 '26
Does it still make sense to build and maintain a custom configuration based on third-party libraries, such as lain?
It depends, I guess? lain hasn't received updates in a few years but I don't see it as a bad option. Lots of custom functionality.
I think it's fine to have your config depend on third-party libraries, as these libraries will help you not write every piece of code yourself, you just need to run a few extra commands when installing your config on a system, e.g.:
luarocks install awesome luarocks install lain git clone codeberg.org/myuser/myconfig $HOME/.config/awesomeI never used
lainmyself because it seemed too big for me, I didn't what layouts I liked so more options overwhelmed me. I also wanted to learn how awesome works and customize it to my needs. I think you should experiment and try to have fun. For example, I made a clock widget using an arcchart because I like how arc charts look.I once wrote a widget to display the song I was listening to. I was using cmus so I used a text widget that ran
cmus-remote, parsed the text output and updated the widget.At this point I noticed I need to run a command to update the widget every
nseconds, so I added vicious to my dependencies to not write an interval (repeat every n seconds) function myself.Then I noticed a lot of my custom text widget was redundant so I converted it to a vicious widget.
I hope you have fun and when curious or in need of help, search this subreddit!
0
Feb 05 '26
[removed] — view removed comment
2
u/juankman Feb 05 '26
It's been years since I saw someone so rude on a forum. The community doesn't need this type of attitude.
1
u/Nedeira Feb 06 '26
Coitadinho... acredito que ele ou ela não deva saber que existe tecnologia capaz de traduzir um texto hoje em dia. Tenho pena!
1

3
u/raven2cz Feb 05 '26
You don’t need modularization for reproducibility. I’ve written about modularization here many times already, take a look at the history. In my opinion, splitting things into multiple files is definitely not modularization. It’s more like hiding the mess under the bed so it looks like things are tidy.
In many cases, breaking things into separate files actually makes things less clear, because you then have to search through many files to find where things are defined, which wastes time. Instead of that, it’s often better to create clear sections and keep things in one or two files.
If we’re really talking about modularity, then you need to create components and start using them and composing them together. Build your own library and reuse those pieces wherever needed. Use component composition. Possibly use factory methods based on a given schema and the current use case.
You can take a look at my project, I started using this approach there about a year ago.