• AutoTL;DRB
    link
    fedilink
    English
    2723 days ago

    This is the best summary I could come up with:


    For fans of the Vim text editor, the latest development code has landed support for the XDG Base Directory “XDG_BASE_DIR” specification.

    Rather than just dumping all configuration files / cache / data into the home directory folder, Vim can now respect the XDG Base Directory specification with regards to the directories such as for the XDG cache, configuration files, persistent data files, and state data files.

    Vim will continue to work fine for environments not setting the XDG paths / environment variables.

    The XDG_BASE_DIR support was merged this week after being under review and discussion since last month.

    This closes a 7 year old bug report requesting Vim follow XDG_CONFIG_HOME specifications or the APPDATA path on Windows.


    The original article contains 117 words, the summary contains 117 words. Saved 0%. I’m a bot and I’m open source!

  • Wilmo Bones
    link
    fedilink
    Akan
    6
    edit-2
    22 days ago

    Holy moly great news. There’s hope for our /home after all. I think Firefox has an open bug thread or request thread for XDG Base Directory that’s like …20 years old?

    • @SamueruOP
      link
      2
      edit-2
      22 days ago

      https://bugzilla.mozilla.org/show_bug.cgi?id=259356

      20 indeed

      I use this script with librewolf, give it a try, simply place it in $HOME/.local/bin name it librewolf and export that location as first in $PATH:

      #!/bin/sh
      
      APPHOME="$XDG_DATA_HOME/librewolf/HOME"
      APPEXEC="$HOME/.local/opt/librewolf/librewolf" # Replace this with the path to librewolf
      
      # XDG Check
      if [ -z "$XDG_CACHE_HOME" ] || [ -z "$XDG_CONFIG_HOME" ] || [ -z "$XDG_DATA_HOME" ] || [ -z "$XDG_STATE_HOME" ]; then
      	echo "One or more XDG Base dir variables not defined, bailing out"; exit 1
      fi
      
      # MAKE FAKEHOME AND LINKS
      mkdir -p "$APPHOME/.local" "$XDG_DATA_HOME/pki" "$XDG_DATA_HOME/icons" 2>/dev/null
      [ ! -e "$APPHOME/.local/share" ] && ln -s "$XDG_DATA_HOME" "$APPHOME/.local/share"
      [ ! -e "$APPHOME/.local/state" ] && ln -s "$XDG_STATE_HOME" "$APPHOME/.local/state"
      [ ! -e "$APPHOME/.config" ] && ln -s "$XDG_CONFIG_HOME" "$APPHOME/.config"
      [ ! -e "$APPHOME/.cache" ] && ln -s "$XDG_CACHE_HOME" "$APPHOME/.cache"
      [ ! -e "$APPHOME/.icons" ] && ln -s "$XDG_DATA_HOME/icons" "$APPHOME/.icons" # Some apps have hardcoded ~/.icons path
      [ ! -e "$APPHOME/.pki" ] && ln -s "$XDG_DATA_HOME/pki" "$APPHOME/.pki" # Chromium/electron hardcode ~/.pki
      
      find "$APPHOME" -xtype l -delete
      for FILES in "$HOME"/*; do
          FILENAME=$(basename "$FILES")
          DEST="$APPHOME/$FILENAME"
          if [ ! -e "$DEST" ]; then
              ln -s "$FILES" "$DEST"
          fi
      done
      
      
      # START APP AT APPHOME
      HOME="$APPHOME" "$APPEXEC" "$@" || notify-send "App not found"
      
  • @ani@endlesstalk.org
    link
    fedilink
    -1822 days ago

    LMAO vim is such a garbage. GNU Emacs had XDG for years already. Do yourself a favor and switch to Emacs