diff --git a/bin/,head b/bin/,head new file mode 100755 index 0000000..89d338c --- /dev/null +++ b/bin/,head @@ -0,0 +1,4 @@ +#!/bin/sh +# Head as much as fits on screen +exec head -n $(echo "$(tput lines) - 5" | bc) "$@" + diff --git a/bin/,mpath b/bin/,mpath new file mode 100755 index 0000000..ba462e4 --- /dev/null +++ b/bin/,mpath @@ -0,0 +1,3 @@ +#!/bin/sh +echo "$MANPATH" | tr -s ":" "\n" + diff --git a/bin/,myip b/bin/,myip new file mode 100755 index 0000000..a13e2dd --- /dev/null +++ b/bin/,myip @@ -0,0 +1,9 @@ +#!/bin/sh +# A few options to get public IP address on command line. The dig solution +# below using the OpenDNS resolver doesn't work when connected to +# ExpressVPN because all DNS requests are handled by the ExpressVPN DNS +# servers and the OpenDNS DNS resolver is blocked. +exec curl -s https://ifconfig.co +#exec curl -s https://ifconfig.me +#exec dig +short myip.opendns.com @resolver1.opendns.com + diff --git a/bin/,myipinfo b/bin/,myipinfo new file mode 100755 index 0000000..b835547 --- /dev/null +++ b/bin/,myipinfo @@ -0,0 +1,3 @@ +#!/bin/sh +exec curl -s ipinfo.io + diff --git a/bin/,path b/bin/,path new file mode 100755 index 0000000..67d39f2 --- /dev/null +++ b/bin/,path @@ -0,0 +1,3 @@ +#!/bin/sh +echo "$PATH" | tr -s ":" "\n" + diff --git a/bin/,tail b/bin/,tail new file mode 100755 index 0000000..25f45d2 --- /dev/null +++ b/bin/,tail @@ -0,0 +1,4 @@ +#!/bin/sh +# Tail as much as fits on screen +exec tail -n $(echo "$(tput lines) - 5" | bc) "$@" + diff --git a/bin/,tmux b/bin/,tmux new file mode 100755 index 0000000..cc279a4 --- /dev/null +++ b/bin/,tmux @@ -0,0 +1,3 @@ +#!/bin/sh +exec tmux -f "$XDG_CONFIG_HOME/tmux/tmux.conf" "$@" + diff --git a/files/bashrc b/files/bashrc index 2c78160..3dcf104 100644 --- a/files/bashrc +++ b/files/bashrc @@ -175,23 +175,6 @@ alias vim='nvim' alias grep="grep --color=auto" alias egrep="egrep --color=auto" alias fgrep="fgrep --color=auto" -alias path='echo $PATH | tr -s ":" "\n"' -alias mpath='echo $MANPATH | tr -s ":" "\n"' - -alias tmux='tmux -f "$XDG_CONFIG_HOME/tmux/tmux.conf"' - -# Head and tail as much as fits on screen -alias head='head -n $((${LINES:-15}-5))' -alias tail='tail -n $((${LINES:-15}-5))' - -# A few options to get public IP address on command line. The dig solution -# below using the OpenDNS resolver doesn't work when connected to -# ExpressVPN because all DNS requests are handled by the ExpressVPN DNS -# servers and the OpenDNS DNS resolver is blocked. -alias ipinfo="curl -s ipinfo.io" -alias myip="curl -s https://ifconfig.co" -#alias myip="curl -s https://ifconfig.me" -#alias myip="dig +short myip.opendns.com @resolver1.opendns.com" alias dark='change_bg dark' alias light='change_bg light'