ulthar.xyz > Repos

dotfiles

Seven years worth of accumulated configuration cruft
About Files Commits git clone https://ulthar.xyz/repos/dotfiles/dotfiles.git

dotfiles/mime

Download raw file: mime

#!/bin/sh
# God damn you stop breaking by default applications

unfuck() { xdg-mime default "$2.desktop" "$1"; }
mapunfuck() { for m in $1; do unfuck "$2/$m" "$3"; done; }

unfuck inode/directory         pcmanfm.desktop
unfuck application/epub+zip    emacsclient
unfuck application/x-mswinurl  browser-mswinurl
unfuck x-scheme-handler/mailto emacsclient-mailto

docs="pdf postscript"
text="plain html markdown xml"
imgs="jpg jpeg png tiff bmp"
vids="x-matroshka x-msvideo mp4 webm"
loop="webp gif"

mapunfuck "$docs" application org.pwmt.zathura
mapunfuck "$text" text        emacsclient
mapunfuck "$imgs" image       feh
mapunfuck "$vids" video       mpv
mapunfuck "$loop" image       mpv
Generated 2025-03-07 15:24:27 -0700 by RepoRat