diff --git a/Makefile b/Makefile index ea64fb3..5bd624b 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,9 @@ sync-arch: # VSCodium @$(WGET) $(REPO_SRC)/.config/VSCodium/product.json -O $(HOME)/.config/VSCodium/product.json +# Pacman hooks + @$(WGET) $(REPO_SRC)/pacman.d/hooks/stop-wine-associations.hook -P /etc/pacman.d/hooks + # Windows Subsystem for Linux specific sync-wsl: diff --git a/pacman.d/hooks/stop-wine-associations.hook b/pacman.d/hooks/stop-wine-associations.hook new file mode 100644 index 0000000..367393b --- /dev/null +++ b/pacman.d/hooks/stop-wine-associations.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Path +Target = usr/share/wine/wine.inf + +[Action] +Description = Stopping Wine from hijacking file associations... +When = PostTransaction +Exec = /bin/sh -c '/usr/bin/grep -q "HKCU,\"Software\\\Wine\\\FileOpenAssociations\",\"Enable\",2,\"N\"" /usr/share/wine/wine.inf || /usr/bin/sed -i "s/\[Services\]/\[Services\]\nHKCU,\"Software\\\Wine\\\FileOpenAssociations\",\"Enable\",2,\"N\"/g" /usr/share/wine/wine.inf'