config/shell: texmex
This commit is contained in:
parent
81410fe313
commit
97024d9d97
|
@ -99,6 +99,7 @@ locate-zox() {
|
|||
}
|
||||
# Switch directory heuristically using zoxide and locate
|
||||
d() {
|
||||
# TODO do not use expr, rather test, so there can be floats
|
||||
test "$1" != "-" -a ! -d "$1" -a $# -eq 1 || { cd "$@" && return; }
|
||||
local query="$(zoxide-list "$@")"
|
||||
# First find out whether there is an obvious match
|
||||
|
@ -106,7 +107,7 @@ d() {
|
|||
# which is not the current directory
|
||||
# If not select with fzf, using locate to find extra options
|
||||
target="$(if test -n "$query" &&
|
||||
expr "$(echo "$query" | sed 's| \+\([^ ]\+\).*|\1|;q')" \> 20 \& \
|
||||
echo "$(echo "$query" | sed 's| \+\([^ ]\+\).*|\1|;q')" \> 20 \& \
|
||||
$(echo "$query" | sed 'N;s|/.* \([0-9]\+\)|> 10 * \1|;q' | sed 's| */.*||') >/dev/null &&
|
||||
[[ ! "$(echo "$query" | head -1)" =~ ".*$PWD" ]]
|
||||
then echo "$query" | head -1
|
||||
|
|
|
@ -262,7 +262,7 @@ curlh() {
|
|||
|
||||
u() {
|
||||
# Line below handy for users of netkeeper
|
||||
sudo nft list ruleset | grep -q outall && echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null
|
||||
sudo nft list ruleset | grep -q outall && echo "Suspending netkeeper" >&2 | echo 'pausing netkeeper for sysupgrade' | netkeeper 30 2>/dev/null
|
||||
if command -v pacman >/dev/null; then
|
||||
if test "$(stat /etc/pacman.d/mirrorlist --printf=%y | cut -d'-' -f1-2)" != "$(date +%Y-%m)"
|
||||
then
|
||||
|
@ -429,6 +429,9 @@ npm-reinstall() {
|
|||
# Reconnect to ONKYO since it is buggy
|
||||
alias onkyo='bluetoothctl disconnect 00:09:B0:1D:DC:98 && sleep 1 && bluetoothctl connect 00:09:B0:1D:DC:98'
|
||||
|
||||
alias pdfcon='TEXMF="" pdfjam -o $(date +%F).pdf'
|
||||
alias pdfwor='TEXMF="" pdfjam -o collections/$(date +%F)_Akkorde.pdf'
|
||||
|
||||
# Custom tools {{{1
|
||||
|
||||
sedcomment() { sed -i "s/$1/#\0/" "${@:2}"; }
|
||||
|
|
Loading…
Reference in New Issue