diff --git a/GNUmakefile b/GNUmakefile index 82de358..03da67e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ include dotfiles.mk -MODULES=xmodmap emacs picom cower mowedline herbstluftwm +MODULES=xmodmap emacs picom cower mowedline herbstluftwm xdg STOW=stow .PHONY: all clean $(MODULES) zsh @@ -96,3 +96,15 @@ x11-install: lib-install x11/dot-x11-0-1-any.pkg.tar.xz x11/dot-x11-0-1-any.pkg.tar.xz: x11/PKGBUILD cd x11 && makepkg -sicf + +####### +# XDG # +####### + +xdg: xdg/.config/mimeapps.list xdg/.config/user-dirs.dirs \ + xdg/.config/user-dirs.locale + +# Helper + +%: %.org + $(call tangle) diff --git a/xdg/.config/.gitignore b/xdg/.config/.gitignore new file mode 100644 index 0000000..59dfc43 --- /dev/null +++ b/xdg/.config/.gitignore @@ -0,0 +1,3 @@ +mimeapps.list +user-dirs.dirs +user-dirs.locale diff --git a/xdg/.config/mimeapps.list.org b/xdg/.config/mimeapps.list.org new file mode 100644 index 0000000..9ff8b6b --- /dev/null +++ b/xdg/.config/mimeapps.list.org @@ -0,0 +1,41 @@ +#+title: XDG Mimeapps + +Suggest to open images in Feh when downloading them through Firefox (and others): + +#+begin_src conf-unix :noweb-ref added-associations :tangle no + image/png=feh.desktop; +#+end_src + +Suggest opening atom XML files in Emacs. + +#+begin_src conf-unix :noweb-ref added-associations :tangle no + application/atom+xml=emacsclient.desktop; +#+end_src + +Use Firefox to open =http://= and =https://= links. + +#+begin_src conf-unix :noweb-ref default-applications :tangle no + x-scheme-handler/http=firefox.desktop + x-scheme-handler/https=firefox.desktop +#+end_src + +Use Emacs to handle any =org-protocol://= links. + +#+begin_src conf-unix :noweb-ref default-applications :tangle no + x-scheme-handler/org-protocol=EmacsClient.desktop +#+end_src + +The rest of this file seems to have been set up by something else, so I've left those around. + +#+begin_src conf-unix :noweb yes + [Added Associations] + application/octet-stream=firefox.desktop;org.pwmt.zathura.desktop;zathura.desktop; + application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop; + <> + + [Default Applications] + x-scheme-handler/discord-610508934456934412=discord-610508934456934412.desktop + x-scheme-handler/msteams=teams.desktop + x-scheme-handler/discord-402572971681644545=discord-402572971681644545.desktop + <> +#+end_src diff --git a/xdg/.config/user-dirs.dirs b/xdg/.config/user-dirs.dirs deleted file mode 100644 index 584252e..0000000 --- a/xdg/.config/user-dirs.dirs +++ /dev/null @@ -1,8 +0,0 @@ -XDG_DESKTOP_DIR="$HOME/" -XDG_DOWNLOAD_DIR="$HOME/downloads" -XDG_TEMPLATES_DIR="$HOME/" -XDG_PUBLICSHARE_DIR="$HOME/" -XDG_DOCUMENTS_DIR="$HOME/documents" -XDG_MUSIC_DIR="$HOME/music" -XDG_PICTURES_DIR="$HOME/pictures" -XDG_VIDEOS_DIR="$HOME/" diff --git a/xdg/.config/user-dirs.dirs.org b/xdg/.config/user-dirs.dirs.org new file mode 100644 index 0000000..87f633f --- /dev/null +++ b/xdg/.config/user-dirs.dirs.org @@ -0,0 +1,25 @@ +#+title: XDG User Directory Configuration +#+property: header-args:conf-unix :tangle user-dirs.dirs + +I don't generally show a desktop, so just use home as my desktop directory. + +#+begin_src conf-unix + XDG_DESKTOP_DIR="$HOME/" +#+end_src + +Use =documents=, =downloads=, =music=, =pictures=, and =videos= instead of their capitalized cousins. I just prefer seeing them that way. + +#+begin_src conf-unix + XDG_DOWNLOAD_DIR="$HOME/downloads" + XDG_DOCUMENTS_DIR="$HOME/documents" + XDG_MUSIC_DIR="$HOME/music" + XDG_PICTURES_DIR="$HOME/pictures" + XDG_VIDEOS_DIR="$HOME/videos" +#+end_src + +I don't actually think I use anything that uses these at all, so + +#+begin_src conf-unix + XDG_TEMPLATES_DIR="$HOME/" + XDG_PUBLICSHARE_DIR="$HOME/" +#+end_src diff --git a/xdg/.config/user-dirs.locale b/xdg/.config/user-dirs.locale deleted file mode 100644 index 7741b83..0000000 --- a/xdg/.config/user-dirs.locale +++ /dev/null @@ -1 +0,0 @@ -en_US diff --git a/xdg/.config/user-dirs.locale.org b/xdg/.config/user-dirs.locale.org new file mode 100644 index 0000000..56ded5b --- /dev/null +++ b/xdg/.config/user-dirs.locale.org @@ -0,0 +1,7 @@ +#+title: XDG User Directory Locale Configuration + +I don't know what exactly this does, but =en_US= is basically what I use for everything. + +#+begin_src conf-unix + en_US +#+end_src