VPN Status tray icon for monitoring VPN connection
Project description
QVpnStatus
VPN Status tray icon for monitoring VPN connections from nmcli. Allows you to specify interval to check and also toggle off sound notifications.
See link here for more information.
It is based on my copier-poetry-fbs skeleton which uses PyQT5 for the GUI elements and fbs for the installer creation.
Requirements
QVpnStatus requires Python 3.7 or above.
To install Python 3.7, I recommend using pyenv
.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv
# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"
# install Python 3.7
pyenv install 3.7.12
# make it available globally
pyenv global system 3.7.12
Installation
With pip
:
python3.7 -m pip install qvpnstatus
With pipx
:
python3.7 -m pip install --user pipx
pipx install --python python3.6 qvpnstatus
Creating a native installer
- clone the repo locally
git clone git@gitlab.com:mikeramsey/qvpnstatus.git
- Install poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
- Setting the below settings are highly recommended for ensuring the virtual environment poetry makes is located inside the project folder.
poetry config virtualenvs.create true; poetry config virtualenvs.in-project true;
- Run
poetry install
in the path to install all the dependencies - Enter the virtual environment that poetry created. This can be found by running
poetry env info
See also here - Run
fbs freeze
and thenfbs installer
afterwards if the frozen "compiled" app runs without issues. See here for more on how fbs works. And also here
Credits
Special thanks to below references and resources.
Resources:
Python nmcli api package which made this a breeze:
https://github.com/ushiboy/nmcli
https://pypi.org/project/nmcli/
References:
https://www.learnpyqt.com/tutorials/system-tray-mac-menu-bar-applications-pyqt/
https://itectec.com/ubuntu/ubuntu-connect-disconnect-from-vpn-from-the-command-line/
https://www.devdungeon.com/content/python3-qt5-pyqt5-tutorial#toc-9
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for qvpnstatus-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e27613d7d078cc16c10e907cdb2166b992ba636ff577af6cd00190d49d3e4ff1 |
|
MD5 | 1e41b8c3103cf689f47cd7582026d053 |
|
BLAKE2b-256 | 0c71726854a3d053859bd7f1e693b81ffc0cf14a0a6fe213ce8ab5d94db386d4 |