Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxrodrigo/tmux-nordvpn
Monitor NordVPN connection status from Tmux.
https://github.com/maxrodrigo/tmux-nordvpn
bash command-line dotfiles hacktoberfest nordvpn rising screen shell tmux tmux-conf tmux-nordvpn tmux-option tmux-plugin tmux-plugins tmux-theme tpm tpm-plugin unixporn vpn zsh
Last synced: about 1 month ago
JSON representation
Monitor NordVPN connection status from Tmux.
- Host: GitHub
- URL: https://github.com/maxrodrigo/tmux-nordvpn
- Owner: maxrodrigo
- License: mit
- Created: 2019-12-03T10:55:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T09:27:15.000Z (over 1 year ago)
- Last Synced: 2024-08-04T04:06:19.083Z (5 months ago)
- Topics: bash, command-line, dotfiles, hacktoberfest, nordvpn, rising, screen, shell, tmux, tmux-conf, tmux-nordvpn, tmux-option, tmux-plugin, tmux-plugins, tmux-theme, tpm, tpm-plugin, unixporn, vpn, zsh
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-tmux - tmux-nordvpn
README
NordVPN Tmux Plugin
Monitor NordVPN connection status from Tmux.
## Table of Contents
* [Demo](#demo)
* [Getting Started](#getting-started)
* [Installation](#installation)
* [Requirements](#requirements)
* [Usage](#usage)
* [Supported Format Strings](#supported-format-strings)
* [Options](#options)
* [Examples](#examples)
* [Status Update Interval](#status-update-interval)
* [Contributing](#contributing)## Demo
![tmux-nordvpn demo](assets/demo.svg)
## Getting Started
### Installation
#### Tmux Plugin Manager (recommended)
Add plugin to the list of [TPM](https://github.com/tmux-plugins/tpm) plugins in `.tmux.conf`:
```sh
set -g @plugin 'maxrodrigo/tmux-nordvpn'
```Hit `prefix + I` to fetch the plugin and source it.
If format strings are added to `status-right`, they should now be visible.
#### Manual Installation
Clone the repository:
```sh
git clone https://github.com/maxrodrigo/tmux-nordvpn ~/.tmux/tmux-nordvpn
```Add this line to the bottom of `.tmux.conf`:
```txt
run-shell ~/.tmux/tmux-nordvpn/nordvpn.tmux
```Reload Tmux environment:
```sh
tmux source-file ~/.tmux.conf
```If format strings are added to `status-right`, they should now be visible.
### Requirements
The plugin relays on the NordVPN native application to pull the current status.
The command line tool is required.NordVPN setup tutorials: https://support.nordvpn.com/FAQ/Setup-tutorials/
## Usage
Add any of the [supported format strings](#supported-format-strings) to `status-right` or `status-left`.
```sh
set -g status-right 'NordVPN: #{nordvpn_status_color}#{nordvpn_status} (#{nordvpn_country})'
```### Supported Format Strings
- `#{nordvpn_status}` - connection status.
- `#{nordvpn_server}` - current server.
- `#{nordvpn_country}` - current connection country.
- `#{nordvpn_city}` - current connection city.
- `#{nordvpn_ip}` - current connection IP address.
- `#{nordvpn_status_color}` - change foreground and background color based on the VPN status.### Options
Here are all available options with their default values.
```sh
@nordvpn_exclude_server_domain true # remove "nordvpn.com" from the server name.@nordvpn_connected_text "Connected" # text to display when connected
@nordvpn_connecting_text "Connecting" # text to display when connecting
@nordvpn_disconnected_text "Disconnected" # text to display when disconnected@nordvpn_connected_fg_color "green" # foreground color when connected.
@nordvpn_connecting_fg_color "yellow" # foreground color when connecting.
@nordvpn_disconnected_fg_color "red" # foreground color when disconnected.@nordvpn_connected_bg_color "" # background color when connected.
@nordvpn_connecting_bg_color "" # background color when connecting.
@nordvpn_disconnected_bg_color "" # background color when disconnected.
```### Examples
```sh
# .tmux.conf
set -g @nordvpn_connected_text "c"
set -g @nordvpn_connecting_text "…"
set -g @nordvpn_disconnected_text "d"set -g status-left "#[fg=blue]vpn: #{nordvpn_status_color}#{nordvpn_status} #[fg=cyan]#{nordvpn_server}"
``````sh
# .tmux.conf
set -g @nordvpn_connected_text "Connected to"
set -g @nordvpn_connecting_text "Connecting to"set -g status-left "NordVPN #{nordvpn_status_color}#{nordvpn_status} #{nordvpn_city}, #{nordvpn_country} [#{nordvpn_ip}]"
```## Status Update Interval
Status update won't be instant. The duration depends on the `status-interval` Tmux option. You can set `status-interval` to a low number to make the refresh faster.
```sh
set -g status-interval 5
```## Contributing
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
The best way to send feedback is to file an issue at https://github.com/maxrodrigo/tmux-nordvpn/issues