Skip to content

Instantly share code, notes, and snippets.

View nkitan's full-sized avatar

Ankit Das nkitan

View GitHub Profile
@nkitan
nkitan / gist:87d0712c39ed2a0bb8215f4f2b118e4f
Created September 4, 2025 16:34
Set up XDG Base Directory Directories and Export Relevant ENV Variables
#!/bin/bash
#
# setup_xdg_dirs.sh
#
# This script ensures the standard XDG base directories exist and creates
# a file in ~/.config/bashrc.d/ to export the necessary environment variables.
# Based on the standards from: https://wiki.archlinux.org/title/XDG_Base_Directory
# Exit immediately if a command exits with a non-zero status.
set -e