From: Siraaj Khandkar Date: Tue, 12 Jul 2022 19:49:58 +0000 (-0400) Subject: Add "open" function to fork xdg-open X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=5671a1eef64379979e9e398d3995c2331f32964f;p=khome.git Add "open" function to fork xdg-open --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 3bf7676..7bd88cb 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -1,5 +1,16 @@ # +## open : string -> unit +## +## Fork xdg-open so we don't block current terminal session when opening +## things like pdf files. For example: +## +## open book.pdf +## +open() { + (xdg-open "$1" &) & +} + ## notify_done : unit -> unit notify_done() { local -r _status_code="$?"