ani,

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

ashley,

But I like vim

Wilmo, (edited )

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?

Samueru, (edited )

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:


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

Now get the stupid ssh clients to do the same.

ouch,

RIP Bram

thingsiplay,

Vi-ctory

5714,

FINALLY! :wq

atyaz,

Is that how we’re ending our comments ZZ

bleepbloopbop,

I never got used to doing wq over a simple :x

I get that you can write and quit separately, and I do it when needed, but 95% of the time, there’s no need

hangukdise,

My muscle memory causes :wq to be typed without my conscient intervention

bleepbloopbop,

what’s really dangerous is if you do a bunch of force quits in a row with :q! and then you start to get muscle memory for that and accidentally lose a whole document you were working on

taladar,

You mean you don’t have muscle memory to obsessively save every time you stop typing?

humbletightband,

If I lose it, I don’t need it

magikmw,

Software predeterminitism - If it were good code it would have saved itself.

bleepbloopbop,

wellllllll

I don’t think I’ve ever had to redo more than 15 mins of work due to this mistake, but it’s a dangerous road lol

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines