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 CLI Options for Config File and Output Path #24

Open
partisani opened this issue Jan 8, 2025 · 3 comments
Open

Add CLI Options for Config File and Output Path #24

partisani opened this issue Jan 8, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@partisani
Copy link

partisani commented Jan 8, 2025

As the title says, this tool is too inflexible to be used correctly in most scenarios that involve scripts, especially ones embedded in places like a NixOS configuration.

Some things that should be changed:

  • Theme and configuration should be allowed to load from files other than ~/.config/gowall/config.yml via a command line argument
  • The user should be allowed to change where the output file(s) is/are saved

btw i still use this tool instead of other ones because this one is better

@Achno Achno changed the title Too inflexible Add CLI Options for Config File and Output Path Jan 9, 2025
@Achno Achno added the enhancement New feature or request label Jan 9, 2025
@Achno
Copy link
Owner

Achno commented Jan 9, 2025

Hello there @partisani,
The output path for the images instead of the default gowall dir being configurable is understandable.

Could you explain why config.yml path should be configured? What problems did you face with the standard config files in ~/.config ?

i will address these enhancements when the exam season is over because i'm overwhelmed right now, i hope you understand.

It will be ready by the time v.0.2.0 is released though

@partisani
Copy link
Author

i will address these enhancements when the exam season is over because i'm overwhelmed right now, i hope you understand.

No pressure or anything, it is ok.

Could you explain why config.yml path should be configured? What problems did you face with the standard config files in ~/.config ?

I found that generating the colorscheme from a script or something else would require the configuration file to be overwritten everytime the colorscheme changed, which lead me to do this as a workaround. And always pass base16 as the theme everytime i called gowall.

In my case, doing this forces Home-Manager to create and (re)build a derivation only to regenerate gowall/config.yml everytime, while some other tool called dipc allows the colors to be passed at runtime via command line arguments. (to the detriment of other features i would need)

@Achno
Copy link
Owner

Achno commented Jan 11, 2025

@partisani Okay since i had some free time i implemented these enhancements locally, and i just want you to give me feedback

  1. You can now specify the OutputFolder in ~/.config/gowall/config.yml : The below sets the directory to ~/MyImages
OutputFolder: "MyImages"
themes: ....
  1. You can now load themes in runtime via giving a .json file in combination with the usual -t flag for the theme
gowall convert ~/Pictures/img.png -t test.json

You can use a relative path with ~ with the json file like this :

gowall convert ~/Pictures/img.png -t ~/clr/test.json

The test.json must have the following interface :

{
    "name": "MyTheme",
    "colors": [
        "#F5E0DC",
        "#F2CDCD",
        "#F5C2E7",
        "#11111B"
    ]
}

What do you think ?

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

No branches or pull requests

2 participants