Before opening a feature request
What is the user problem or growth opportunity you want to see solved?
It would be nice if rofi had some functionality for optional imports.
This would allow for dynamic configuration to play nicely with static (fallback) configuration.
Lets say you have some program dynamically generating extra configuration for rofi.
Currently if you have your main rofi configuration just @import it, it will work, but it would fail in cases this extra (optional) configuration is missing.
Example snippet:
//
// ~/.config/rofi/config.rasi
//
// Default configuration copied for example purposes
configuration {
// Timeout from user input.
timeout {
// The delay after inactivity to execute action.
delay: 0;
// The action to execute once the delay expires.
action: "kb-cancel";
}
// File browser mode.
filebrowser {
sorting-method: "name";
directories-first: true;
}
}
// Default theme gets imported here
@theme "default"
// Optional overrides file gets imported here
@import? "overrides"
In this example, having some kind of optional import directive (i'm suggesting an @import? directive for this) would allow for the override.rasi to be loaded if it exists, else just continue/fallback to the previously defined configuration.
How do you know that this problem exists today? Why is this important?
It allows rofi to be more flexible when configuring it with dynamically generated sources/imports.
Who will benefit from it?
Everybody
Rofi version (rofi -v)
1.7.7
Configuration
.
Additional information
No response
Before opening a feature request
What is the user problem or growth opportunity you want to see solved?
It would be nice if rofi had some functionality for optional imports.
This would allow for dynamic configuration to play nicely with static (fallback) configuration.
Lets say you have some program dynamically generating extra configuration for rofi.
Currently if you have your main rofi configuration just
@importit, it will work, but it would fail in cases this extra (optional) configuration is missing.Example snippet:
In this example, having some kind of optional import directive (i'm suggesting an
@import?directive for this) would allow for theoverride.rasito be loaded if it exists, else just continue/fallback to the previously defined configuration.How do you know that this problem exists today? Why is this important?
It allows rofi to be more flexible when configuring it with dynamically generated sources/imports.
Who will benefit from it?
Everybody
Rofi version (rofi -v)
1.7.7
Configuration
.
Additional information
No response