diff --git a/hosts/home.nix b/hosts/home.nix index c28ea77..63d1d1c 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -102,13 +102,21 @@ in rm = "trash-put"; emacs = "emacsclient -nw"; }; - # Change to directory when exiting ranger with Q - # https://github.com/ranger/ranger/issues/1554#issuecomment-491650123 bashrcExtra = '' + # Modify killall for wrapped applications, e.g. firefox + # killall firefox -> killall firefox || killall .firefox-wrapped + function killall { + `which killall` $1 || `which killall` .''${1}-wrapped + } + + # pandoc macro + # pandoc document.md -> pandoc document.md -o document.pdf ... function pdf { - pandoc "$1" -o "''${1%.*}.pdf" -V colorlinks=true -V linkcolor=blue + pandoc $1 -o ''${1%.*}.pdf -V colorlinks=true -V linkcolor=blue } + # Change to directory when exiting ranger with Q + # https://github.com/ranger/ranger/issues/1554#issuecomment-491650123 function ranger { local IFS=$'\t\n' local tempfile="$(mktemp -t tmp.XXXXXX)"