Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration file evaluation #49

Open
4 tasks
sdilts opened this issue Oct 23, 2023 · 5 comments
Open
4 tasks

Add configuration file evaluation #49

sdilts opened this issue Oct 23, 2023 · 5 comments

Comments

@sdilts
Copy link
Collaborator

sdilts commented Oct 23, 2023

In Stumpwm, users are able to have initialization code ran at startup so they can customize the WM's behavior. We need the same thing in Mahogany.

Requirements for a complete implementation:

  • config files should follow the XDG base directory specification
  • There should be a command line flag to startup Mahogany without this file.
  • Enabling / disabling evaluation could be a compile time option.
  • Errors during evaluation should not cause Mahogany to crash or shutdown.

Like with defcommand, not all of this needs to be implemented at once.

@Arian-D
Copy link
Contributor

Arian-D commented Jul 26, 2024

Regarding the first requirement, would an implementation similar to StumpWM's load-rc be okay?

@sdilts
Copy link
Collaborator Author

sdilts commented Jul 30, 2024

Ya, that should work for now. I'd like to get rid of the old-school .stumpwmrc and .stumpwm.d style configuration locations, or at the very least not have them be prioritized over anything in the XDG conf directory.

My main concern would be error handling. I guess I'd try to eval the file before starting the rendering loop, and just crash if there's an error?

@Arian-D
Copy link
Contributor

Arian-D commented Jul 30, 2024

Perfect! Also, I just saw this PR which seems to be addressing this, so I'll follow the progress there.

@tpine
Copy link

tpine commented Jul 30, 2024

@Arian-D I haven't had the time to finish completing all the issues brought up in the PR review and Im not sure when I will so Im happy for you to take over from where that pr is at the moment if you want. I think from memory I have fixed the accidental indentation of code around it and removing the format calls.

@Arian-D
Copy link
Contributor

Arian-D commented Jul 31, 2024

Thanks @tpine!

I'll try to have a look this weekend, and will see how to go about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants