adapt to KDE/Plasma, get rid of XFCE specifics
This commit is contained in:
10
status-ip.sh
10
status-ip.sh
@@ -8,11 +8,9 @@ EXIT="$?"
|
||||
|
||||
if [ "$var_conn" == "on" ]; then
|
||||
if $(echo $IP | grep -qE "$VPNIP"); then
|
||||
IMAGE="/usr/share/icons/gnome/16x16/apps/gnome-monitor.png"
|
||||
TEXT="VPN ($IP)"
|
||||
var_ip4="$IP"
|
||||
var_vpn="on"
|
||||
echo "<img>$IMAGE</img>"
|
||||
elif ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
|
||||
EXIT="fail"
|
||||
TEXT="t/o"
|
||||
@@ -23,7 +21,7 @@ if [ "$var_conn" == "on" ]; then
|
||||
var_vpn="off"
|
||||
fi
|
||||
|
||||
echo "<txt> $TEXT</txt>"
|
||||
echo "$TEXT"
|
||||
|
||||
# If request was successful, try IPv6 as well
|
||||
if [ "$EXIT" != "fail" ]; then
|
||||
@@ -36,11 +34,11 @@ if [ "$var_conn" == "on" ]; then
|
||||
TEXT="$IP6"
|
||||
var_ip6="$IP6"
|
||||
fi
|
||||
echo "<tool>IPv6: $TEXT</tool>"
|
||||
echo "IPv6: $TEXT"
|
||||
fi
|
||||
else
|
||||
echo "<txt>offline</txt>"
|
||||
echo "<tool>Offline status is set. Turn on to enable checks</tool>"
|
||||
echo "offline"
|
||||
echo "Offline status is set. Turn on to enable checks"
|
||||
var_vpn=off
|
||||
var_ip4=0.0.0.0
|
||||
var_ip6=::0
|
||||
|
||||
@@ -75,9 +75,7 @@ OUT=$(echo $OUT | sed -r 's/^;//')
|
||||
OUT=$(echo $OUT | sed -r 's/;/ \| /g')
|
||||
TOOL=$(echo $TOOL | sed -r 's/^;//')
|
||||
TOOL=$(echo $TOOL | sed -r 's/;/ \| /g')
|
||||
echo "<txt>$OUT</txt>"
|
||||
echo "<tool>$TOOL</tool>"
|
||||
echo "<img>/usr/share/icons/gnome/16x16/actions/format-justify-fill.png</img>"
|
||||
echo "<click>xfce4-terminal -x $CURDIR/status-interaction.sh &</click>"
|
||||
echo "$OUT"
|
||||
echo "$TOOL"
|
||||
|
||||
wtmp var_mailqueue_runs # write updated values back to status file
|
||||
|
||||
Reference in New Issue
Block a user