Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.6 KB

README.md

File metadata and controls

63 lines (47 loc) · 1.6 KB

Waybar NordVPN script

Simple daemon and cli wrapper for for NordVPN to be used in Waybar or any similar system bar.

Usage

nvpn

nvpn
# or
nvpn toggle_killswitch
# or
nvpn reconnect
# or
nvpn <options for nordvpn>

In case the script is called without arguments, the connection will be toggled by calling nordvpn connect or nordvpn disconnect.

In case the script is called with toggle_killswitch as an argument, the kill-switch functionality of nordvpn will be toggled.

In case the script is called with reconnect as an argument, the connection will be reset, using the same country as the endpoint.

In case the script is called with arguments (except toggle_killswitch), all of those will be passed through to nordvpn, also triggering the update in the system bar module.

nvpnd

nvpnd

The nvpn script should be symlinked to nvpnd to function as a daemon. It will output a status message upon receiving SIGUSR1, which is automatically handled by nvpn.

Configuration

For Waybar:

{
    "custom/nordvpn": {
        "exec": "/path/to/nvpnd",
        "exec-on-event": false,
        "on-click": "/path/to/nvpn",
        "on-click-right": "/path/to/nvpn toggle_killswitch"
    }
}

For changing the format, edit the nvpn::print_status function.

You can also use other names for the script, but then the variables NVPN_CLI and NVPN_DAEMON should be modified in the script.

Dependencies