From da71d0fcdcb585b5f1a43da9e5330fb76bfdc8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 25 Oct 2026 07:29:38 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(stow):=20add=20.stowrc,=20?= =?UTF-8?q?link=20mimeapps.list=20by=20absolute=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GLib writes mimeapps.list through a relative symlink by resolving the target against the process's cwd, so default-app changes failed outside ~/.config. mimeapps.list is now an absolute symlink created by hand, which stow does not own, so .stowrc ignores it (and itself) and sets the target to ~. --- .stowrc | 3 +++ README.md | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .stowrc diff --git a/.stowrc b/.stowrc new file mode 100644 index 0000000..a562c55 --- /dev/null +++ b/.stowrc @@ -0,0 +1,3 @@ +--target=~ +--ignore=\.stowrc +--ignore=mimeapps\.list diff --git a/README.md b/README.md index 96bf7ed..cab61dc 100644 --- a/README.md +++ b/README.md @@ -1 +1,12 @@ # dotfiles + +```sh +git clone https://git.tahinli.com/Tahinli/dotfiles ~/dotfiles +cd ~/dotfiles && stow . +ln -sfn ~/dotfiles/.config/mimeapps.list ~/.config/mimeapps.list +``` + +`mimeapps.list` is linked by hand with an absolute path, and `.stowrc` keeps +stow away from it. GLib resolves a relative symlink target against the +writing process's working directory, so stow's `../dotfiles/...` link made +every "set default app" fail outside `~/.config`.