Last active
May 19, 2024 17:51
-
-
Save mster429/b95dd6a450fbd027a2564a695080a1a4 to your computer and use it in GitHub Desktop.
Get data usage on linux top bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://humdi.net/vnstat/vnstat-latest.tar.gz | |
tar zxvf vnstat-latest.tar.gz | |
sudo apt install build-essential libgd-dev check pkg-config autotools-dev libsqlite3-dev | |
sudo ./configure --prefix=/usr --sysconfdir=/etc && sudo make | |
sudo make install | |
sudo cp -v examples/systemd/vnstat.service /etc/systemd/system/ | |
sudo systemctl enable vnstat | |
sudo systemctl start vnstat | |
# install executor (https://extensions.gnome.org/extension/2932/executor/) | |
sudo apt-get install chrome-gnome-shell | |
vnstat -i wlp2s0 --oneline | awk -F ';' '{print "Usage: " $6 " " $11}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment