Describe the feature
As #1092 was understandably rejected, let me try to make a better feature request.
Could Rofi support a few environment variables:
ROFI_CONFIG_FILE). This is treated similarly as -config. ROFI_PLUGIN_PATH). This is treated similarly as -plugin-path.For both these options, if the environment variable is set, but not the corresponding command line option, then the path defined by the environment variable is used.
Usecase: One might want to have different defaults especially for the configuration file in different desktop environments. For instance, use different defaults under GNOME/KDE/Cinnamon/... or under dark/light theme etc. This is something that the system admin or the user might want to do, so the environment variables can be set either in some system-level files or user-level files. Then, the user just needs to run rofi and correct defaults are used.
Not the main purpose but it'd also be possible to create simple wrappers that have some default like alias rofi-dark="ROFI_CONFIG_FILE=~/rofi-dark.conf rofi".
It's not currently possible to set a custom default for plugins or configuration file without compiling Rofi. This would in a way solve both #1092 and #1091. Based on IRC discussions, I got the impression that this might be something that you would approve.
(Note that currently there is no other way to change the plugin path after compilation except providing -plugin-path option. It cannot be set in the configuration file. So, perhaps this kind of environment variable would be useful.)
When reporting a feature request include the following information:
$ rofi -v
Version: 1.5.4
ROFI_PLUGIN_PATH environment that takes a list of paths is added to git.
The config file, see IRC discussion.
rofi now obeys XDG_CONFIG_DIRS
Huge thanks for this one too! That is a perfect solution! :+1:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
rofi now obeys XDG_CONFIG_DIRS