Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not assume selected theme is in a cache dir #24

Closed
wants to merge 1 commit into from

Conversation

bew
Copy link

@bew bew commented May 12, 2022

When ~/.cache is a tmpfs, the selected theme is lost on reboot.
This commit ensures that the selected theme is searched in $FAST_WORK_DIR
when it is set instead of assuming it is in a cache directory.

When ~/.cache is a tmpfs, the selected theme is lost on reboot.
This commit ensures that the selected theme is searched in the $FAST_WORK_DIR
when it is set instead of assuming it is in a cache directory.
@ss-o ss-o added plugin 🧿 triage 📑 The issue is awaiting investigation. labels May 12, 2022
@ss-o ss-o self-assigned this May 12, 2022
@bew
Copy link
Author

bew commented May 12, 2022

It seems it's still not perfect though, as when starting a new shell it still writes somehow a secondary theme:

ls -l .cache/fsh/
.rw-r--r-- 3.4k lesell_b 12 May 23:51 secondary_theme.zsh`

Not sure where that one comes from 👀

@bew
Copy link
Author

bew commented May 12, 2022

Ok it seems I didn't solve it at all: (I probably should have created a proper issue first)

I have:

FAST_WORK_DIR=~/.long_term_cache/zsh--fast-syntax-highlighting
echo "FAST_WORK_DIR (before zi): $FAST_WORK_DIR"

zi light z-shell/F-Sy-H

echo "FAST_WORK_DIR (after zi): $FAST_WORK_DIR"

And when starting zsh I get:

FAST_WORK_DIR (before zi): /home/lesell_b/.long_term_cache/zsh--fast-syntax-highlighting
FAST_WORK_DIR (after zi): /home/lesell_b/.cache/fsh

@ss-o
Copy link
Member

ss-o commented May 12, 2022

It seems it's still not perfect though, as when starting a new shell it still writes somehow a secondary theme:

ls -l .cache/fsh/
.rw-r--r-- 3.4k lesell_b 12 May 23:51 secondary_theme.zsh`

Not sure where that one comes from eyes

Hi @bew 👋

Could you describe your environment e.g:

echo "OSTYPE=${OSTYPE} CPUTYPE=$(uname -m) MACHINE_TYPE=$MACHTYPE ZSH_VERSION=${ZSH_VERSION}"

Or any other additional information which would help to reproduce the issue, this data also gets collected to improve tests. I keep forgetting to update issue templates

@bew
Copy link
Author

bew commented May 12, 2022

Sure, I created a separate issue, I've put the requested env in it: #25

@ss-o ss-o linked an issue May 12, 2022 that may be closed by this pull request
ss-o referenced this pull request in bew/dotfiles May 18, 2022
gitstatus' bootstrap was auto-downloading its pre-compiled binary to
a directory in ~/.cache, which is a tmpfs => empty on boot.

Similarly fast-syntax-highlighting was saving which theme is selected in
a directory in ~/.cache => empty on boot, so it was falling back on
default theme.
(also update this plugin, and point it to an updated fork)
@bew
Copy link
Author

bew commented May 20, 2022

I'm not sure what you want me to do for my tentative PR, I'll just close that PR (it's so small anyway) and let you do the changes.

@bew bew closed this May 20, 2022
@bew bew deleted the bew-patch-1 branch May 20, 2022 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage 📑 The issue is awaiting investigation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State is lost on reboot by default when ~/.cache is a tmpfs
2 participants