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

defining theme instead of passing it as parameter? #63

Open
Kampouse opened this issue Sep 18, 2020 · 2 comments
Open

defining theme instead of passing it as parameter? #63

Kampouse opened this issue Sep 18, 2020 · 2 comments

Comments

@Kampouse
Copy link

Kampouse commented Sep 18, 2020

Hey i was digging around your project i been able to modify my theme but there a thing that i was curious to see if this possible: keep your "edited" theme like you only nead to do a eovim --theme
i tried to rename my new file as the 'default' one and eovim did not like that returning me with "permission denied "while not running it as a sudoer :(
ounce after that you will only nead to use eovim to use your edited theme

and also i made a eovim theme tutorial...

@jeanguyomarch
Copy link
Owner

Hi, sorry for not acknowleding your issue, it seemed to have vanished from my mind.
If I understood correctly:

  • you have written your own theme (congrats :D)
  • eovim loads, by default, the default theme
  • you would like that eovim loads your custom theme, without having to manually specify --theme=/the/path/to/your/theme.

Without modifying eovim, I think there is no way around this.
I can understand this is indeed not very convenient.

A simple "solution" would be for eovim to rely on an environment variable (e.g. EOVIM_THEME=/the/path/to/your/theme) but I don't find it very "gracious".
Indeed, eovim is configured through vimscript, and I not quite happy with such "exceptions". Ideally, the theme could be provided through vimscript. However, this maybe require "hot-loading" the edje theme, I am not sure how difficult this is. I can try, though, it seems like a nice feature.

I'd propose the following use-case. Please let me know if you find it acceptable:

There should be two directories for themes:

  1. <install_prefix>/eovim/themes/: this one currently exists, but probably requires root permissions;
  2. <home>/.config/eovim/themes/: this one does not exist, and would not require root permissions.

The list of available themes would be constructed as follows:

  1. read the .edj files in directory 1.
  2. read the .edj files in directory 2., overriding existing themes.

A theme could be selected through vimscript (i.e. init.vim) with:

let g:eovim_theme = "<theme name>"

Where <theme name> would be something like default or a custom name.
If g:eovim_theme contains the path to a .edj (e.g. /tmp/dev/theme.edj) file, then this file is taken. So there would be two lookup options (ie. by name or by path).

@jeanguyomarch
Copy link
Owner

Oh, and I would love to see the eovim theme tutorial you mentioned.

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

2 participants