home: modify killall for wrapped apps, clean bashrcExtra

inky
Elnu 1 year ago
parent 729a331ced
commit c2292de2bc

@ -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)"

Loading…
Cancel
Save