diff --git a/.gitignore b/.gitignore
index f875e1c..b40df96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,15 @@
.stats_*
-.code-*
+*.code-workspace
+
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+!.vscode/*.code-snippets
+
+# Local History for Visual Studio Code
+.history/
+
+# Built Visual Studio Code Extensions
+*.vsix
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index ef74dae..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "ship"]
- path = ship
- url = https://github.com/xtonousou/shIP.git
diff --git a/README.md b/README.md
index af206aa..f3e4736 100644
--- a/README.md
+++ b/README.md
@@ -8,12 +8,13 @@
| Filename | Preview | Tooltip Preview | On Click Action |
|:--------------------------------:|:------------:|:------------------:|:-----------------------------:|
-| [smart-watch-battery-panel.sh] | ![swbattery] | | |
+| [smart-watch-battery-panel.sh] | ![swbattery] | | |
| [battery-panel.sh] | ![battery] | [battery-tooltip] | [battery-gui] |
| [cleaner-panel.sh] | ![cleaner] | | [cleaner-gui] [cleaner-gui-2] |
| [cpu-panel.sh] | ![cpu] | [cpu-tooltip] | [cpu-gui] |
| [datetime-panel.sh] | ![datetime] | [datetime-tooltip] | |
| [die-panel.sh] | ![die] | | |
+| [disk-panel.sh] | ![disk] | [disk-tooltip] | |
| [eject-panel.sh] | ![eject] | | [eject-gui] |
| [kernel-panel.sh] | ![kernel] | [kernel-tooltip] | |
| [memory-panel.sh] | ![memory] | [memory-tooltip] | [memory-gui] |
@@ -34,6 +35,7 @@ To get started, you need a horizontal xfce4-panel with **28p** row size and **10
| /path/to/cpu-panel.sh | **xos4 Terminus Bold 18** | **1.50** |
| /path/to/datetime-panel.sh | **xos4 Terminus Bold 18** | **1.00** |
| /path/to/die-panel.sh | **xos4 Terminus Bold 18** | **2.75** |
+| /path/to/disk-panel.sh | **xos4 Terminus Bold 18** | **5.00** |
| /path/to/eject-panel.sh | **xos4 Terminus Bold 18** | **3600** |
| /path/to/kernel-panel.sh | **xos4 Terminus Bold 18** | **3600** |
| /path/to/memory-panel.sh | **xos4 Terminus Bold 18** | **1.00** |
@@ -46,20 +48,6 @@ To get started, you need a horizontal xfce4-panel with **28p** row size and **10
You just need `xfce4-panel` and `xfce4-genmon-plugin`. Additional requirements are mentioned inside the scripts.
-#### Workarounds
-
-##### Smart Watch Battery Panel
-
-In order to use `smart-watch-battery-panel.sh` you need to use a crontab or a systemd timer to generate the required information.
-
-```bash
-crontab -e
-* * * * * /usr/bin/env bash /path/to/xfce4-genmon-scripts/adb-info.sh $(arp -e -n | awk "/98:28:a6:dd:00:8c/{print \$1}") battery ticwatch
-```
-
-1. Replace the MAC address with the correct one. Hint: Use `arp -n -a` to get the MAC address.
-2. Replace the 3rd argument **ticwatch**, with a unique name that describes your device.
-
#### Installation
Clone the project `git clone --depth 1 https://github.com/xtonousou/xfce4-genmon-scripts.git`.
@@ -77,6 +65,20 @@ These icons are provided **as-is** without any change.
Please refer [here](https://github.com/Templarian/MaterialDesign/blob/master/LICENSE) for the respective license.
+#### Workarounds
+
+##### Smart Watch Battery Panel
+
+In order to use `smart-watch-battery-panel.sh` you need to use a crontab or a systemd timer to generate the required information.
+
+```bash
+crontab -e
+* * * * * /usr/bin/env bash /path/to/xfce4-genmon-scripts/adb-info.sh $(arp -e -n | awk "/98:28:a6:dd:00:8c/{print \$1}") battery ticwatch
+```
+
+1. Replace the MAC address with the correct one. Hint: Use `arp -n -a` to get the MAC address.
+2. Replace the 3rd argument **ticwatch**, with a unique name that describes your device.
+
#### License
This project is licensed under GPL(v3) or later.
@@ -88,6 +90,7 @@ This project is licensed under GPL(v3) or later.
[cpu-panel.sh]: cpu-panel.sh
[datetime-panel.sh]: datetime-panel.sh
[die-panel.sh]: die-panel.sh
+[disk-panel.sh]: disk-panel.sh
[eject-panel.sh]: eject-panel.sh
[kernel-panel.sh]: kernel-panel.sh
[memory-panel.sh]: memory-panel.sh
@@ -97,32 +100,34 @@ This project is licensed under GPL(v3) or later.
[spotify-panel.sh]: spotify-panel.sh
-[preview-panel]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/preview-panel.png "xfce4-panel"
-[swbattery]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/smart-watch-battery-panel/swbattery.png "smart watch battery"
-[battery]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/battery-panel/battery.gif "battery"
-[battery-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/battery-panel/battery-tooltip.gif "battery-tooltip"
-[battery-gui]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/battery-panel/battery-gui.png "battery-gui"
-[cleaner]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/cleaner-panel/cleaner.png "cleaner"
-[cleaner-gui]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/cleaner-panel/cleaner-gui.png "cleaner-gui"
-[cleaner-gui-2]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/cleaner-panel/cleaner-gui-2.png "cleaner-gui-2"
-[cpu]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/cpu-panel/cpu.gif "cpu"
-[cpu-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/cpu-panel/cpu-tooltip.gif "cpu-tooltip"
-[cpu-gui]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/cpu-panel/cpu-gui.png "cpu-gui"
-[datetime]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/datetime-panel/datetime.gif "datetime"
-[datetime-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/datetime-panel/datetime-tooltip.png "datetime-tooltip"
-[die]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/die-panel/die.gif "die"
-[eject]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/eject-panel/eject.png "eject"
-[eject-gui]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/eject-panel/eject-gui.png "eject-gui"
-[kernel]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/kernel-panel/kernel.png "kernel"
-[kernel-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/kernel-panel/kernel-tooltip.png "kernel-tooltip"
-[memory]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/memory-panel/memory.gif "memory"
-[memory-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/memory-panel/memory-tooltip.gif "memory-tooltip"
-[memory-gui]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/memory-panel/memory-gui.png "memory-gui"
-[network]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/network-panel/network.gif "network"
-[network-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/network-panel/network-tooltip.png "network-tooltip"
-[pacman]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/pacman-panel/pacman.png "pacman"
-[pacman-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/pacman-panel/pacman-tooltip.png "pacman-tooltip"
-[power]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/power-panel/power.png "power"
-[power-gui]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/power-panel/power-gui.png "power-gui"
-[spotify]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/spotify-panel/spotify.gif "spotify"
-[spotify-tooltip]: https://raw.githubusercontent.com/xtonousou/xfce4-genmon-scripts/master/previews/spotify-panel/spotify-tooltip.png "spotify-tooltip"
+[preview-panel]: previews/preview-panel.png "xfce4-panel"
+[swbattery]: previews/smart-watch-battery-panel/swbattery.png "smart watch battery"
+[battery]: previews/battery-panel/battery.gif "battery"
+[battery-tooltip]: previews/battery-panel/battery-tooltip.gif "battery-tooltip"
+[battery-gui]: previews/battery-panel/battery-gui.png "battery-gui"
+[cleaner]: previews/cleaner-panel/cleaner.png "cleaner"
+[cleaner-gui]: previews/cleaner-panel/cleaner-gui.png "cleaner-gui"
+[cleaner-gui-2]: previews/cleaner-panel/cleaner-gui-2.png "cleaner-gui-2"
+[cpu]: previews/cpu-panel/cpu.gif "cpu"
+[cpu-tooltip]: previews/cpu-panel/cpu-tooltip.gif "cpu-tooltip"
+[cpu-gui]: previews/cpu-panel/cpu-gui.png "cpu-gui"
+[datetime]: previews/datetime-panel/datetime.gif "datetime"
+[datetime-tooltip]: previews/datetime-panel/datetime-tooltip.png "datetime-tooltip"
+[die]: previews/die-panel/die.gif "die"
+[disk]: previews/disk-panel/disk.png "disk"
+[disk-tooltip]: previews/disk-panel/disk-tooltip.png "disk-tooltip"
+[eject]: previews/eject-panel/eject.png "eject"
+[eject-gui]: previews/eject-panel/eject-gui.png "eject-gui"
+[kernel]: previews/kernel-panel/kernel.png "kernel"
+[kernel-tooltip]: previews/kernel-panel/kernel-tooltip.png "kernel-tooltip"
+[memory]: previews/memory-panel/memory.gif "memory"
+[memory-tooltip]: previews/memory-panel/memory-tooltip.gif "memory-tooltip"
+[memory-gui]: previews/memory-panel/memory-gui.png "memory-gui"
+[network]: previews/network-panel/network.gif "network"
+[network-tooltip]: previews/network-panel/network-tooltip.png "network-tooltip"
+[pacman]: previews/pacman-panel/pacman.png "pacman"
+[pacman-tooltip]: previews/pacman-panel/pacman-tooltip.png "pacman-tooltip"
+[power]: previews/power-panel/power.png "power"
+[power-gui]: previews/power-panel/power-gui.png "power-gui"
+[spotify]: previews/spotify-panel/spotify.gif "spotify"
+[spotify-tooltip]: previews/spotify-panel/spotify-tooltip.png "spotify-tooltip"
diff --git a/disk-panel.sh b/disk-panel.sh
index 6bfe0a3..0536bf3 100755
--- a/disk-panel.sh
+++ b/disk-panel.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Dependencies: bash>=3.2, bleachbit(optional), coreutils, file, gawk)
+# Dependencies: bash>=3.2, bleachbit(optional), coreutils, file, gawk, hddtemp, bc
# Makes the script more portable
readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -11,57 +11,47 @@ readonly ICON="${DIR}/icons/disk/database.png"
# Command to grab current HDD's temperature
# Change --unit to F if you don't want Celsius as default
+# Virtual Machines will report 0 ℃
GET_TEMP=$(sudo hddtemp --unit=C --wake-up --quiet --numeric /dev/sda)
# To determine if colors are applied
OVERHEAT=0
# Panel
+INFO=""
if hash bleachbit &> /dev/null; then
- INFO="bleachbit &> /dev/null"
+ INFO+="bleachbit &> /dev/null"
+elif hash gparted &> /dev/null; then
+ INFO+="gparted &> /dev/null"
fi
if [[ $(file -b "${ICON}") =~ PNG|SVG ]]; then
INFO+="
${ICON}"
- INFO+=""
-else
- INFO+=""
fi
-[[ "${GET_TEMP}" -gt 42 ]] && \
- OVERHEAT=1 && \
- INFO+=""
+USED_SPACE=$(awk '{$1 = $1 / 1048576; printf "%.2f", $1}' <<< $(df / | awk '/\/dev/{print $3}'))
+TOTAL_SPACE=$(awk '{$1 = $1 / 1048576; printf "%.2f", $1}' <<< $(df / | awk '/\/dev/{print $2}'))
+PERCENTAGE=$(echo $(echo "${USED_SPACE} * 100" | bc -l) / "${TOTAL_SPACE}" | bc -l)
-INFO+="$(awk '{$1 = $1 / 1048576; printf "%.2f", $1}' <<< $(df / | awk '/\/dev/{print $3}'))"
-INFO+="/"
-INFO+="$(awk '{$1 = $1 / 1048576; printf "%.2f", $1}' <<< $(df / | awk '/\/dev/{print $2}'))"
-INFO+=" GB"
-
-# Close span tag if warning colors are applied
-[[ "${OVERHEAT}" -eq 1 ]] && \
- INFO+=""
-
-INFO+=""
+# Percentage bar
+BAR="${PERCENTAGE}"
# Tooltip
MORE_INFO=""
-MORE_INFO+="┌ $(df -h / | awk '/\/dev/{print $1}' | head -n1)\n"
-MORE_INFO+="├─ Vendor:\t\t$(awk '/[V]endor:/{print $2}' /proc/scsi/scsi)\n"
-MORE_INFO+="├─ Model:\t\t$(awk '/[Mm]odel:/{print $4, $5}' /proc/scsi/scsi)\n"
-MORE_INFO+="├─ Revision:\t\t$(awk '/[Rr]ev:/{print $7}' /proc/scsi/scsi)\n"
-MORE_INFO+="├─ Type:\t\t\t$(awk '/[Tt]ype:/{print $2, $3, $4}' /proc/scsi/scsi)\n"
-
+MORE_INFO+="Usage:\\t\\t${USED_SPACE} / ${TOTAL_SPACE} GB\\n"
############# !!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!! ####################
# Append the following line to /etc/sudoers (Recommended: edit with visudo)
# %wheel ALL=(ALL) NOPASSWD: /usr/bin/hddtemp
# If you don't do the above, xfce4-panel will freeze and
-# eventually will freeze X too. So, be careful!
-MORE_INFO+="└─ Temperature:\t${GET_TEMP} ℃"
-
+# eventually will freeze X too and maybe PAM as well. So, be careful!
+MORE_INFO+="Temperature:\\t${GET_TEMP} ℃"
MORE_INFO+=""
# Panel Print
echo -e "${INFO}"
+# Bar print
+echo -e "${BAR}"
+
# Tooltip Print
echo -e "${MORE_INFO}"
diff --git a/network-panel.sh b/network-panel.sh
index 0919782..7baeb1f 100755
--- a/network-panel.sh
+++ b/network-panel.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Dependencies: bash>=3.2, bc, coreutils, file, gawk, ship>=2.6 (see https://github.com/xtonousou/shIP)
+# Dependencies: bash>=3.2, bc, coreutils, file, gawk, tr, ss
# Makes the script more portable
readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -9,8 +9,8 @@ readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Recommended size is 24x24 px
readonly ICON="${DIR}/icons/network/web.png"
-# Displays all active network interfaces with their IPv4 addresses (local)
-readonly TOOLTIP=$(ship --ipv4)
+# Displays summary of tcp and udp connections
+readonly TOOLTIP=$(ss -s | head -n 3 | grep -Ev "^$")
# You can pass the desired network interface on the command
# On the generic monitor properties
diff --git a/previews/disk-panel/disk-tooltip.png b/previews/disk-panel/disk-tooltip.png
new file mode 100644
index 0000000..395e745
Binary files /dev/null and b/previews/disk-panel/disk-tooltip.png differ
diff --git a/previews/disk-panel/disk.png b/previews/disk-panel/disk.png
new file mode 100644
index 0000000..cfaabeb
Binary files /dev/null and b/previews/disk-panel/disk.png differ
diff --git a/previews/disk-panel/network-tooltip.png b/previews/disk-panel/network-tooltip.png
deleted file mode 100644
index 1896f37..0000000
Binary files a/previews/disk-panel/network-tooltip.png and /dev/null differ
diff --git a/previews/disk-panel/network.gif b/previews/disk-panel/network.gif
deleted file mode 100644
index b41645b..0000000
Binary files a/previews/disk-panel/network.gif and /dev/null differ
diff --git a/previews/network-panel/network-tooltip.png b/previews/network-panel/network-tooltip.png
index 1896f37..2b08a80 100644
Binary files a/previews/network-panel/network-tooltip.png and b/previews/network-panel/network-tooltip.png differ
diff --git a/ship b/ship
deleted file mode 160000
index d060ada..0000000
--- a/ship
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit d060adae4f4c2da35f4baff954e37c03a005df65
diff --git a/spotify-panel.sh b/spotify-panel.sh
index 95657f4..25ce7bf 100755
--- a/spotify-panel.sh
+++ b/spotify-panel.sh
@@ -49,11 +49,9 @@ else
if [[ $(file -b "${ICON}") =~ PNG|SVG ]]; then
INFO="
${ICON}"
INFO+=""
- INFO+="Offline"
INFO+=""
else
INFO=""
- INFO+="Offline"
INFO+=""
fi