Skip to content

Instantly share code, notes, and snippets.

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
# 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 "$@"
open_zip "$@"
case "$1" in
(*.[cC][bB][zZ]) offer_comix "$@";;
*) open_zip "$@";;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment