aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/hostname12
-rwxr-xr-xmodules/internetbin16536 -> 16536 bytes
-rwxr-xr-xmodules/networkdowntraffic4
-rwxr-xr-xmodules/networkuptraffic4
-rw-r--r--modules/src/internet.c2
5 files changed, 17 insertions, 5 deletions
diff --git a/modules/hostname b/modules/hostname
new file mode 100755
index 0000000..41ec4fa
--- /dev/null
+++ b/modules/hostname
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Prints USER@hostname
+
+PREFIX=' '
+
+get_hostname()
+{
+ echo "$PREFIX$USER@$(hostname)"
+}
+
+get_hostname
diff --git a/modules/internet b/modules/internet
index 6fe6aec..22cbd6a 100755
--- a/modules/internet
+++ b/modules/internet
Binary files differ
diff --git a/modules/networkdowntraffic b/modules/networkdowntraffic
index f1b5584..e8d3a74 100755
--- a/modules/networkdowntraffic
+++ b/modules/networkdowntraffic
@@ -12,7 +12,7 @@ get_down_traffic()
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
for IFACE in $IFACES; do
if [ $IFACE != "lo" ]; then
- RECIEVE1=$(($(ip -s -c link show wlan0 | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE1))
+ RECIEVE1=$(($(ip -s -c link show $IFACE | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE1))
fi
done
@@ -21,7 +21,7 @@ get_down_traffic()
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
for IFACE in $IFACES; do
if [ $IFACE != "lo" ]; then
- RECIEVE2=$(($(ip -s -c link show wlan0 | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE2))
+ RECIEVE2=$(($(ip -s -c link show $IFACE | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE2))
fi
done
diff --git a/modules/networkuptraffic b/modules/networkuptraffic
index 6b002e6..396e969 100755
--- a/modules/networkuptraffic
+++ b/modules/networkuptraffic
@@ -12,7 +12,7 @@ get_up_traffic()
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
for IFACE in $IFACES; do
if [ $IFACE != "lo" ]; then
- TRANSMIT1=$(($(ip -s -c link show wlan0 | tail -n1 | cut -d " " -f5) + TRANSMIT1))
+ TRANSMIT1=$(($(ip -s -c link show $IFACE | tail -n1 | cut -d " " -f5) + TRANSMIT1))
fi
done
@@ -21,7 +21,7 @@ get_up_traffic()
IFACES=$(ip -o link show | awk -F': ' '{print $2}')
for IFACE in $IFACES; do
if [ $IFACE != "lo" ]; then
- TRANSMIT2=$(($(ip -s -c link show wlan0 | tail -n1 | cut -d " " -f5) + TRANSMIT2))
+ TRANSMIT2=$(($(ip -s -c link show $IFACE | tail -n1 | cut -d " " -f5) + TRANSMIT2))
fi
done
diff --git a/modules/src/internet.c b/modules/src/internet.c
index d0f6afd..916445b 100644
--- a/modules/src/internet.c
+++ b/modules/src/internet.c
@@ -2,7 +2,7 @@
int main()
{
- char *internet_icon = "";
+ char *internet_icon = " ";
printf("%s\n", internet_icon);