Add bash_profile and update configs

This commit is contained in:
natemaia 2018-06-01 19:19:37 -07:00
parent be4ebea6ee
commit 4f8834e3d3
2 changed files with 11 additions and 2 deletions

5
home/.bash_profile Normal file
View File

@ -0,0 +1,5 @@
# .bash_profile
# sourced by bash when used as a login shell
# automatically run startx when logging in on tty1
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- vt1 &>/dev/null

View File

@ -1,13 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
count=0
disconnected="/" disconnected="/"
disconnected2="\\" disconnected2="\\"
wireless_connected="" wireless_connected=""
ethernet_connected="" ethernet_connected=""
while true; do while true; do
if ping -c1 8.8.8.8 &>/dev/null; then if ping -c1 www.google.com &>/dev/null; then
ID=$(ip link | awk '/state UP/ {print $2}') if (( count < 1 )); then
ID="$(ip link | awk '/state UP/ {print $2}')"
((count++))
fi
if [[ $ID == e* ]]; then if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 20 echo "$ethernet_connected" ; sleep 20
else else