Added great ssh ip checker
This commit is contained in:
parent
aeefdd48b9
commit
c19ac375e7
14
i3/run.sh
14
i3/run.sh
@ -70,3 +70,17 @@ fi
|
|||||||
if [ "$1" = "paste" ]; then
|
if [ "$1" = "paste" ]; then
|
||||||
DISPLAY=:0.0 xdotool type --clearmodifiers --file <(xsel)
|
DISPLAY=:0.0 xdotool type --clearmodifiers --file <(xsel)
|
||||||
fi
|
fi
|
||||||
|
if [ "$1" = "ip" ]; then
|
||||||
|
shift
|
||||||
|
local RET=0
|
||||||
|
if [ "$(hostname)" = "MMLin" ]; then
|
||||||
|
if grep -q "$1" < <(ifconfig enp2s0f0); then
|
||||||
|
RET=1
|
||||||
|
fi
|
||||||
|
elif [ "$(hostname)" = "G2" ]; then
|
||||||
|
if grep -q "$1" < <(ifconfig enp1s0;ifconfig wlp2s0); then
|
||||||
|
RET=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo $RET
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user