withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

Sourcing dotfiles on multiple platforms #1906

Open ruffCode opened 1 year ago

ruffCode commented 1 year ago

Checks

Operating system

Linux (Pop OS)

Expected behaviour

I have Fig installed on a Mac, when installing on Linux, the dotfiles integration should not load automatically.

Actual behaviour

Dotfiles are downloaded automatically. USER_HOME is overridden by its Mac counterpart, breaking Zsh hooks and anything else that depends on the correct location of USER_HOME

Steps to reproduce

Install Fig on Mac, enable dotfiles integration, load dotfiles, install on Linux and echo $USER_HOME which will return /Users/username instead of /home/username

Environment

fig-details:
  - cli-version: 1.5.0
  - desktop-version: 2.5.3
  - figterm-version: 5.2.0
hardware-info:
  - chip-id: Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
  - cores: 8
  - mem: 31842.84 GB
os-info:
  - kernel: 5.19.0-76051900-generic
  - distro: "Pop!_OS 22.04 LTS"
  - distro-version: "22.04 LTS"
environment:
  - shell: /usr/bin/zsh
  - terminal: tabby
  - cwd: /home/alexi
  - exe-path: /usr/bin/fig
  - install-method: unknown
  - env-vars:
    - XDG_SESSION_TYPE: x11
    - GTK_IM_MODULE: ibus
    - PATH: /home/alexi/.sdkman/candidates/springboot/current/bin:/home/alexi/.sdkman/candidates/maven/current/bin:/home/alexi/.sdkman/candidates/kscript/current/bin:/home/alexi/.sdkman/candidates/kotlin/current/bin:/home/alexi/.sdkman/candidates/kobweb/current/bin:/home/alexi/.sdkman/candidates/ki/current/bin:/home/alexi/.sdkman/candidates/java/current/bin:/home/alexi/.sdkman/candidates/groovy/current/bin:/home/alexi/.sdkman/candidates/gradleprofiler/current/bin:/home/alexi/.sdkman/candidates/gradle/current/bin:/home/alexi/.sdkman/candidates/ant/current/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/alexi/Android/Sdk/emulator:/home/alexi/Android/Sdk/platform-tools:/home/alexi/Android/Sdk/tools:/home/alexi/Android/Sdk/tools/bin:/home/alexi/bin:/home/alexi/.config/zsh/bin:/usr/local/cuda-11.7/bin:/usr/local/bin:/usr/local/sbin:/home/alexi/.local/bin:/home/alexi/.cargo/bin:/home/alexi/.rover/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/alexi/.dotnet/tools:/home/alexi/.local/share/JetBrains/Toolbox/scripts:/home/alexi/.fig/bin:/home/alexi/.config/zsh/functions:/home/alexi/scripts:/home/alexi/apps:/home/alexi/balena-cli:/home/alexi/kt-script/bin:/home/alexi/go/bin:/home/alexi/bin/openapitools:/home/alexi/.yarn/bin:/home/alexi/.config/yarn/global/node_modules/.bin:/opt/kode/bin:/home/alexi/.porterv1
    - DISPLAY: :1
    - XDG_CURRENT_DESKTOP: Unity
    - XDG_SESSION_DESKTOP: pop
    - XMODIFIERS: @im=ibus
    - SHELL: /usr/bin/zsh
    - QT_IM_MODULE: ibus
    - TERM: xterm-256color
    - FIG_PID: 623619
    - FIG_SET_PARENT:
mschrage commented 1 year ago

You should go into Dotfiles and specify that you only want that block sourced on macOS. (Also potentially, we should add USER_HOME to our blocklist during import. cc @rahulsarathy)

Screen Shot 2022-10-13 at 7 22 17 PM
ruffCode commented 1 year ago

Thanks for the quick response, @mschrage. That's what I ended up doing once I found those options.

I have a few suggestions/requests on Dotfiles, if you don't mind.

I know that in this context, it's challenging to strike the right balance between out-of-the-box usability and covering potential conflicts between systems. I love the product and appreciate all your hard work.

Thanks much!

-Alexi