Closed maksut closed 1 year ago
@maksut I've created a PR to fix this. Can you checkout the branch jamy/bugfix/reload-existing-theme
and see if that fixes your issue? https://github.com/tinted-theming/base16-shell/pull/35
Looks like I've commented on the PR instead of here. So I'll repeat it here:
Sorry, but no it doesn't fix it.
Is this condition correct?
if [[ "$theme_name" == "$current_theme_name" && "$theme_name" == "$BASE16_THEME" ]]; then
return 0
fi
Maybe that needs to be an OR instead of AND. In my testing $BASE16_THEME was not set (or empty not sure).
Let's move the conversation to the PR but I'll leave the issue open for now.
Describe the bug
Using the recommended .zshrc configuration:
But every time
profile_helper.sh
sourced via.zshrc
, it resets the theme. Meaning, it recreates the theme soft link and executes the hooks. One of my tools (waybar) refreshes itself when the underlying (hook) link is recreated. This means whevener a terminal is opened, the tool resets with a flicker. A bit annoying.Expected behavior
No need to create the soft links and executing hooks when the theme did not change.
System
Operating system: archlinux
Terminal: foot with zsh
Base16 tool waybar
Additional context
I've put this little hack in
set_theme
function inprofile_helper.sh
just before the soft link creation: