dotfiles/.local/bin/scripts/xo

11 lines
274 B
Text
Raw Normal View History

2022-10-13 21:56:23 +02:00
#!/bin/sh
# xdg-open all given files
# TODO handle .desktop-files with gtk-launch/dex/kioclient exec, add selector from xdg-mime-file
while test $# -gt 0; do
2023-11-04 19:08:39 +01:00
case $1 in
(*.epub) okular "$1" &;;
(*) xdg-open "$(case "$1" in (-*) echo './';; esac)$1";;
esac
2022-10-13 21:56:23 +02:00
shift
done