summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/o
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-11-07 01:27:32 -0700
committerxyz <gky44px1999@gmail.com>2021-11-07 01:27:32 -0700
commit6ff33f6a2c7fc2473ff851b217eaf1e9a38310a9 (patch)
tree934301ebacde87531ea4d03be9a5560be36217ba /home/xyz/.local/bin/o
parent5c05a7f2cbde91c1385bd81520af0752b49d40f0 (diff)
o, treat libreoffice's shit
Diffstat (limited to 'home/xyz/.local/bin/o')
-rwxr-xr-xhome/xyz/.local/bin/o7
1 files changed, 6 insertions, 1 deletions
diff --git a/home/xyz/.local/bin/o b/home/xyz/.local/bin/o
index 38c74968..20cf2ede 100755
--- a/home/xyz/.local/bin/o
+++ b/home/xyz/.local/bin/o
@@ -9,7 +9,12 @@
# nohup seems not necessary if don't care about daemon SIGHUP requirement
if [ $# -eq 1 ] && [ -e "$1" ] && { ! [ -x "$1" ] || [ -d "$1" ];}; then
- nohup xdg-open "$1" 0<&- >&- 2>&- &
+ case "$1" in
+ # libreoffice, please don't let firefox eat your shit
+ *.docx|*.pptx) cmd=libreoffice;;
+ *) cmd=xdg-open;;
+ esac
+ nohup "$cmd" "$1" 0<&- >&- 2>&- &
else
nohup "$@" 0<&- >&- 2>&- &
fi