pw4ever / awesome-wm-config

awesome window manager config with persistent dynamic tagging
271 stars 55 forks source link

Persistent tagging sometimes does not work #11

Closed mindrunner closed 5 years ago

mindrunner commented 6 years ago

Hi, first of all: awesome awesome setup. I did some modifications to fit my needs. I might share them when I find time.

Sometimes my persistent Tagging gets messed up. By just rebooting the computer, it starts over with just the genesis tag instead of my custom list. Do you face that problem as well? How can we debug it?

pw4ever commented 6 years ago

Thanks for sending the feedback, @mindrunner

Could you clarify what you mean by "sometimes"? Is it totally random, or after reloading awesome to test out config changes?

For example, tag persistence could be messed up when encountering config errors when reloading awesome, and hence tag persistent exit signal handler has not been scheduled.

The tags and autostart inhibitor are persisted to awful.util.getdir("cache") ($HOME/.cache/awesome for me).

Also, if awesome has been abruptly shutdown (e.g., due to system power loss), autostart inhibitor could prevent autostart of apps for the next reboot. What I would do is to rm ~/.cache/awesome/awesome-autostart-once* and restart awesome.

mindrunner commented 6 years ago

Hi @pw4ever

With sometimes, I meant "sometimes when rebooting". Furthermore, today I experienced the same behaviour by just undocking and re-dockign the laptop.

I do use my own autostart scripts, does that matter?

pw4ever commented 6 years ago

@mindrunner The autostart script should not matter. A more relevant factor is how awesome/X enumerate displays across scenarios such as rebooting, undocking, and re-docking.

The persistent dynamic tags are implemented by marshalling dynamic tags on each display to files in awful.util.getdir("cache") ($HOME/.cache/awesome) using exit signal (which should be fired on awesome restart and system reboot/docking/undocking), and accordingly unmarshalling on awesome init.

So, if the display identification changes across reboot/docking/undocking, or if your custom changes aborts on errors during init, this could impact dynamic tag restoration.

Also, you should reboot/shutdown system by either 1) via the current awesome keybinding (search for bindings to system_reboot and system_power_off in the rc.lua) or 2) first exiting awesome, and then rebooting from display manager or shell. If you directly reboot via shell commands (systemctl/halt/shutdown) when awesome is still running, tag persistence logic in the registered awesome exit signal handler may have not correctly completed, and hence fail to restore tags upon reboot.

One thing to try: Exit Awesome to Display Manager (DM), switch to a TTY (e.g., Ctrl+Alt+F1 or F2), and log in to shell. Check whether the dynamic tags are correctly persisted into $HOME/.cache/awesome).

mindrunner commented 6 years ago

Hi @pw4ever Thank you for helping out in such a detailled way. Since I don't have time at the moment to work on my desktop setup, I had to revert back to my former awesome config.

https://github.com/mindrunner/awesome-config

However, I would like to merge both our configs, because I still see a huge benefit in yours at some edges: 1) Dynamic, renamable Tags 2) Persistence 3) Interesting ideas about key-bindings 4) Different way of autostarting programs

However, I found some glitches (and missing features) I would like to see/implement, before this is production ready for me.

1) Persistence not reliable (see previous posts in this thread) 2) Clients on Tags should be persisted as well (surviving a computer restart) 3) Multi Monitor support, including dock/undock stuff. 4) Sometimes, the focus on the "Tag-Rename" or "Confirm-With-Yes" Dialogs are lost and then there is only one way to recover: Restart awesomewm.

I started working on 1). However, I was not satisfied with the short term result, reverting back to my static config.

1) and 2) and 3) are - in my opinion - some very important features I really miss in awesomewm. I was thinking about how an implementation could look like, but did't finalize my thoughts yet. (Maybe database backed?)

Some of the feautes will be upstream in awesomewm in some point in the future. However, this is a long term feature branch and the won't merge this year.

pw4ever commented 5 years ago

@mindrunner I have recently set up a multi-screen desktop workstation. I have seen the tag issue you originally mentioned. I have released a new version "4.0.14" that fixes these issues for me; I am now having consistent tag save/restore upon restart/reboot.

If you could, can you please give it "4.0.14" a try to see if it fixes the issue on your end?

mindrunner commented 5 years ago

Cool, thanks for the feedback and for the fix. Unfortunately, I just packed all my things into boxes and will be traveling lightweight for a while. So no multi-screens for me at the moment. As soon as I will have time to check, I will report back! :)

pw4ever commented 5 years ago

Close for now. Thanks for reporting the issue.