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

refactor theme check #3

Merged

Conversation

stevensonmt
Copy link

@VuiMuich, what do you think of this approach? I haven't tested it to see if the xdg::BaseDirectories::find_config_files() works the way I think it does, but it seems like it should.

@VuiMuich
Copy link
Owner

Hey, thanks for the refactor! This is way better than my code was!

I believe though fn missing_expected_file might be broken, as I get an error File: 'up' not found., but my test directory is missing a theme.toml and permissions for the scripts but up and down are definitely there..

Might find some time for this at some point this weekend I guess.

@stevensonmt
Copy link
Author

stevensonmt commented Aug 20, 2021

So the find_config_files method is not working the way I thought. The iterator is just a single item with the config path ending in "current" rather than returning an iterator over the files in that directory. It looks like xdg::BaseDirectories::list_config_files is what I needed instead. Check most recent commit to see if it works for you. Worked for me.
BTW, feel free to remove the test I added. It's only valid if you know you have a valid theme applied.

@VuiMuich VuiMuich merged commit 8289a33 into VuiMuich:leftwm-check_for_theme Aug 23, 2021
@stevensonmt stevensonmt deleted the leftwm-check_for_theme branch August 23, 2021 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants