From bc14a1aa7955ea33a3b722c64836118177f282e2 Mon Sep 17 00:00:00 2001 From: codfish Date: Mon, 29 Dec 2025 16:10:08 -0500 Subject: [PATCH] feat: set XDG_CONFIG_HOME to use dotfiles config --- .gitignore | 4 ++++ bin/dotfiles | 2 +- cheat/cheatsheets/personal/ts | 4 ++++ lib/brew | 1 + oh-my-zsh-custom/02-exports.zsh | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fab0ed7..f7b5c85 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ oh-my-zsh oh-my-zsh-custom/00-dotfiles.zsh oh-my-zsh-custom/plugins/* cheat/cheatsheets/community + +# Sharing configs ($XDG_CONFIG_HOME) +.config +!.config/ghostty diff --git a/bin/dotfiles b/bin/dotfiles index 066288d..e930a41 100755 --- a/bin/dotfiles +++ b/bin/dotfiles @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -DOTFILES="${HOME}/.dotfiles" +export DOTFILES="${HOME}/.dotfiles" DOTFILES_REPO=${DOTFILES_REPO:-codfish/dotfiles} DOTFILES_TARBALL_PATH="https://github.com/codfish/dotfiles/tarball/main" ZSH="$HOME/.dotfiles/oh-my-zsh" diff --git a/cheat/cheatsheets/personal/ts b/cheat/cheatsheets/personal/ts index 64dbe9b..3cad0ff 100644 --- a/cheat/cheatsheets/personal/ts +++ b/cheat/cheatsheets/personal/ts @@ -3,6 +3,10 @@ syntax: typescript tags: [ typescript, javascript, ts, development ] --- +/* `-b` is necessary to typecheck a project with multiple composite tsconfig files */ +tsc -b + + /* Create a union type from the values of a js object */ /* Really good video on this: https://www.youtube.com/watch?v=6M9aZzm-kEc */ const statuses = { diff --git a/lib/brew b/lib/brew index d699a9d..1115d2b 100644 --- a/lib/brew +++ b/lib/brew @@ -134,6 +134,7 @@ run_brew_cask() { [dropbox]='Dropbox' [figma]='Figma' [firefox]='Firefox' + [ghostty]='Ghostty' [google-chrome]='Google Chrome' [google-drive]='Google Drive' [jetbrains-toolbox]='JetBrains Toolbox' diff --git a/oh-my-zsh-custom/02-exports.zsh b/oh-my-zsh-custom/02-exports.zsh index 23c900e..b81af79 100644 --- a/oh-my-zsh-custom/02-exports.zsh +++ b/oh-my-zsh-custom/02-exports.zsh @@ -68,3 +68,6 @@ export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig" # volta export VOLTA_HOME="$HOME/.volta" + +# https://superuser.com/questions/365847/where-should-the-xdg-config-home-variable-be-defined +export XDG_CONFIG_HOME="$DOTFILES/.config"