Polybar: Remove amidown.sh

This commit is contained in:
Salt 2018-08-21 19:16:45 -05:00
parent 259312c03e
commit 1b78111d21
2 changed files with 1 additions and 69 deletions

View File

@ -1,60 +0,0 @@
#! /bin/bash
#
# netstatus.sh
# Copyright (C) 2018 rehashedsalt <salt@lap-th-e560-0>
#
# Distributed under terms of the MIT license.
#
# Global vars
if_default=""
ipv4_private=""
# Define our tests
function test-gateway {
if ip r | grep default > /dev/null 2>&1; then
ipr="$(ip r | grep default)"
ipv4_private="$(echo $ipr | awk '{print $3}')"
if_default="$(echo $ipr | awk '{print $5}')"
unset ipr
return 0
else
return 1
fi
}
function test-internet {
if ping -c 1 8.8.8.8 > /dev/null 2>&1; then
return 0
else
return 1
fi
}
function test-dns {
if ping -c 1 google.com > /dev/null 2>&1; then
return 0
else
return 1
fi
}
# Actually go through with them
if ! test-gateway; then
printf "NONE"
exit 1
fi
if ! test-internet; then
printf "LOCAL"
exit 2
fi
if ! test-dns; then
printf "NO DNS"
exit 3
fi
printf "UP"
exit 0

View File

@ -88,7 +88,7 @@ border-top-size = 0
modules-left = ${env:PB_BAR_PRIMARY_MODULES_LEFT:battery cpu memory}
modules-center = ${env:PB_BAR_PRIMARY_MODULES_CENTER: bspwm}
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:amidown xbacklight volume date}
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:xbacklight volume date}
[bar/primary-2]
monitor = ${env:PB_MONITOR:eDP-1}
@ -144,14 +144,6 @@ content = " "
# OTHER
#====================
[module/amidown]
type = custom/script
format-prefix = "NET: "
format-prefix-foreground = ${res/colors.alert}
exec = ~/.config/polybar/amidown.sh
exec-if = ! ping -c 1 google.com
interval = 15
[module/battery]
type = internal/battery
format-charging = <label-charging>