Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Helper script to override Firefox's attempt to open .cbz files as Zip files, regardless of OS file associations
#!/bin/sh
# NOTE: Despite this script using KDE commands like ark and kdialog, Firefox
# doesn't obey KDE's file associations, so you'll need to use a non-KDE
# file manager like PCManFM to edit the file associations.
open_zip() {
exec ark "$@"
}
offer_comix() {
if kdialog --yesno 'File appears to be a Comic Book Archive\nOpen in Comix instead?'; then
exec comix "$@"
else
open_zip "$@"
fi
}
case "$1" in
(*.[cC][bB][zZ]) offer_comix "$@";;
*) open_zip "$@";;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.