#!/usr/bin/fish # Mount ~/notes/enc-logins if necessary, then launch Zim. set data ~/notes/enc-logins set data_encrypted ~/notes/.enc-logins set mount_name enc-logins grep $mount_name /proc/mounts >/dev/null set unmounted $status if test $unmounted != 0 Xdialog --title "Logins wiki" --password --inputbox "Password for $data:" 0x0 2>|read password echo $password|encfs -S $data_encrypted $data end grep $mount_name /proc/mounts >/dev/null set unmounted $status if test $unmounted != 0 Xdialog --title "Logins wiki" --msgbox "Failed to mount $data." 0x0 else zim --no-daemon $data Home end