gennaro-tedesco / zathuraconf

Change zathura colour schemes
Apache License 2.0
67 stars 2 forks source link

Suggestion for changing the config from within zathura #10

Open ParadoxPacer opened 3 months ago

ParadoxPacer commented 3 months ago

Is there any way to change the color config from an already open zathura window using the input bar?

gennaro-tedesco commented 3 months ago

No, there isn't - this is on Zathura's: in order to change the configuration the application must reload the config file at start-up only.

ParadoxPacer commented 3 months ago

I actually found a way to keymap it with map <C-w> exec '/Users/[username]/go/bin/zathuraconf -f /Users/[username]/zathuraconf/themes/tokyonight.json' map <C-c> exec '/Users/[username]/go/bin/zathuraconf -f /Users/[username]/zathuraconf/themes/catppuccin.json'

You just need to point to the zathuraconf bin and give the absolute path to the .json files. (BTW these examples apply specifically for a MacOS file system the location of the bin may be different on Linux)

and then what you need to do is enter ":source" in the inputbar and it will reload the page and change the colorscheme without having to close zathura

gennaro-tedesco commented 3 months ago

Ah interesting, I did not know, thank you for sharing!