[ ] I tried asking on Slack (especially for configuration related issues)
Describe the bug
I'm using Regolith 2.1 on Ubuntu 22.04 --- so cool so far. But I faced one minor bug.
The command regolith-look refresh relies on load_regolith_xres() function defined in /usr/lib/regolith/regolith-session-common.sh
If you look at the function below, as it states, it loads two times (before and after the regolith look loading). But the problem is, the first load doesn't supports -I"$USER_XRESOURCE_SEARCH_PATH" (But the second load supports.)
So if you define some variables in $USER_XRESOURCE_SEARCH_PATH and include them in user Xresources, regolith-look refresh gives an error (due to the first load) -- But everything still works because of the second load. I think the first load should use the -I"$USER_XRESOURCE_SEARCH_PATH" option consistently.
# 1. Load the Regolith Xresource override file if exists
# 2. Load Regolith Look Xresource as defined in override or use default
# 3. Re-merge Regolith Xresource override file if exists
load_regolith_xres() {
if [ -f "$USER_XRESOURCE_OVERRIDE_FILE" ]; then
xrdb -merge "$USER_XRESOURCE_OVERRIDE_FILE" # <--- no -I"$USER_XRESOURCE_SEARCH_PATH" !!
fi
LOOK_STYLE_ROOT_PATH=$(xrescat regolith.look.path "$DEFAULT_XRESOURCE_LOOK_PATH")
LOOK_STYLE_ROOT_FILE="$LOOK_STYLE_ROOT_PATH/root"
if [ -f "$LOOK_STYLE_ROOT_FILE" ]; then
xrdb -I"$USER_XRESOURCE_SEARCH_PATH" -merge "$LOOK_STYLE_ROOT_FILE"
fi
if [ -f "$USER_XRESOURCE_OVERRIDE_FILE" ]; then
xrdb -I"$USER_XRESOURCE_SEARCH_PATH" -merge "$USER_XRESOURCE_OVERRIDE_FILE"
fi
}
To Reproduce
Steps to reproduce the behavior:
Define some variables in $HOME/.config/regolith2/Xresources.d
Use those values using #include xxx in $HOME/.config/regolith2/Xresources
Do regolith-look refresh
This will give you an uncomfortable error message as below, but functionally everything works.
❯ regolith-look refresh
/home/paul/.config/regolith2/Xresources:48:10: fatal error: colors: No such file or directory
48 | #include "colors"
| ^~~~~~~~
compilation terminated.
Executing look loader script: /usr/share/regolith-look/default_loader.sh
> Updating already existing 'Regolith' profile
[SUCCESS] Reinstalled Regolith GNOME Terminal version 0.1.0 for the 'Regolith' profile!
Thanks for the super detailed @ywpkwon ! I agree with your assessment. Would you care to write the PR? If not I'll update myself sometime by the weekend.
Describe the bug I'm using Regolith 2.1 on Ubuntu 22.04 --- so cool so far. But I faced one minor bug.
The command
regolith-look refresh
relies onload_regolith_xres()
function defined in/usr/lib/regolith/regolith-session-common.sh
If you look at the function below, as it states, it loads two times (before and after the regolith look loading). But the problem is, the first load doesn't supports-I"$USER_XRESOURCE_SEARCH_PATH"
(But the second load supports.)So if you define some variables in
$USER_XRESOURCE_SEARCH_PATH
and include them in user Xresources,regolith-look refresh
gives an error (due to the first load) -- But everything still works because of the second load. I think the first load should use the-I"$USER_XRESOURCE_SEARCH_PATH"
option consistently.To Reproduce Steps to reproduce the behavior:
$HOME/.config/regolith2/Xresources.d
#include xxx
in$HOME/.config/regolith2/Xresources
regolith-look refresh
This will give you an uncomfortable error message as below, but functionally everything works.
Installation Details