Rofi: [REQUEST] Environment variables for defining config file (and plugin path)

Created on 19 Apr 2020  路  4Comments  路  Source: davatorium/rofi

Describe the feature

As #1092 was understandably rejected, let me try to make a better feature request.

Could Rofi support a few environment variables:

  • Set the default configuration file (e.g., ROFI_CONFIG_FILE). This is treated similarly as -config.
  • Set the default plugin path (e.g., 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
Feature Request

Most helpful comment

rofi now obeys XDG_CONFIG_DIRS

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vktec picture vktec  路  4Comments

inputsh picture inputsh  路  6Comments

blueyed picture blueyed  路  5Comments

atomheartother picture atomheartother  路  5Comments

strogiyotec picture strogiyotec  路  4Comments