Help with awesome menu

Continuing the discussion from About the Help & Troubleshooting category:

I just installed butterbian using butterknife and the install was a real pleasure. I did it twice as I was happy with the first install which was just to look. Now I have used awesomewm for more than a decade on a plain Debian system. But a few months ago, I decided to give Fedora a go for Wayland when I saw that they had the Cosmic version. Unfortunately whilst Cosmic has some nice features for my use case it did not make the cut.
I was going to go back to my old ways and was dreading it as I had to re-install everything from scratch. Over the decade or more of my awesomewm use I may have had to go and do something in the rc.lua only a couple of times.
Now following the successful install of butterbian I find that what I had before, specifically the awesome menu is not working as it used to. In my previous use of awesome any install of software having a desktop would be automatically picked up in the awesome menu. During my current install I did add many of the packages I use, but unfortunately the menu has not picked any up. Could someone give me a help with this, I am certain it is somewhere in the lua config. Again, unfortunately, one of the reasons I went with butterbian is because of the modular lua config, but I am at a loss. I know that it is possible to add the Debian menu to the awesomewm menu and I think that it picks up its items with freedestop. I now the sources desktop items are in /usr/share/applications, but I am not sure how to set this up with the modular lua approach. Anyone? I hope this is the place to ask. It is not an issue but a need of some help.

Good catch, and it’s the config, not you. The awesomewm-setup menu module has a hard-coded “applications” submenu (terminal, browser, file manager) and never hooks into the Debian menu or freedesktop like the stock rc.lua does. On top of that, the Debian menu system is basically dead on trixie, so even wiring it up wouldn’t get you much.

I’ve just pushed a change that builds the applications submenu straight from the .desktop files in /usr/share/applications and ~/.local/share/applications, using awesome’s built-in menubar code. No extra packages. It also watches those directories, so anything you apt install shows up in the menu a few seconds later without reloading awesome. Grab two files from the repo and drop them over your copies in ~/.config/awesome: modules/menu.lua and themes/default/theme.lua (the second one just makes the menu rows big enough to read). Reload once with Super+Shift+r and you’re set.

Meantime, Super+space gives you the rofi launcher, which already picks up every .desktop file.

1 Like

Quite a few changes to the awesomewm config. Reduction in lines and added theme switching.

1 Like

Gee! Thanks for your prompt reply.

I did what you suggested and had an error.

Using my current theme it worked perfectly, as far as I can quickly see.

The error I get is:

***************

Error whilst running function.
modules/widget.lua: 84 in main chunk

in function require

rc.lua:22 in main chunk

error: …modules/widget.lua:84 attempt to concatenate a nil value (field gh_caret)
**************

It is not a show stopper for me as not replacing the theme works. But, of course, the ability to change theme is a good addition as well!

Thanks again for the super project. I will try to boost the knowledge of its existence on reddit, which is the only social network I contribute or visit.

That one’s on me. The theme.lua you grabbed comes from the rewrite I pushed after my first reply, and it expects the new widgets.lua and a colors.lua that your config doesn’t have. Your old widgets.lua asks the theme for gh_caret, which no longer exists, hence the error.

Easiest fix: clone the repo and run the installer in config-only mode. It backs up your current config and copies the whole set so everything matches, and you get the colour-scheme picker too.

git clone Making sure you're not a bot!
cd awesomewm-setup
./install.sh --only-config

If you’d rather keep your existing config, the theme.lua from commit 7b9bc96 is the one that pairs with your widgets.lua:

git show 7b9bc96:awesome/themes/default/theme.lua > ~/.config/awesome/themes/default/theme.lua

Then restart awesome.

1 Like