All Projects → shervinsahba → polybar-vpn-controller

shervinsahba / polybar-vpn-controller

Licence: MIT License
Polybar module for VPN control. Set up for Mullvad VPN but modifiable for others.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to polybar-vpn-controller

Polybar Themes
A huge collection of polybar themes with different styles, colors and variants.
Stars: ✭ 3,687 (+12613.79%)
Mutual labels:  polybar, unixporn, polybar-scripts
bspwm-config
Green themed bspwm configuration for ricing lovers
Stars: ✭ 19 (-34.48%)
Mutual labels:  polybar, unixporn, polybar-scripts
dotfiles
collection (and a backup) of my config files
Stars: ✭ 49 (+68.97%)
Mutual labels:  polybar, unixporn
polybar-now-playing
Script for polybar to display and control media(not only Spotify) using DBus.
Stars: ✭ 34 (+17.24%)
Mutual labels:  polybar, polybar-scripts
dotfiles
A collection of dotfiles for i3, polybar and more.
Stars: ✭ 25 (-13.79%)
Mutual labels:  polybar, unixporn
dotfiles
dotfiles of simonvic daily used enviroment
Stars: ✭ 75 (+158.62%)
Mutual labels:  polybar, unixporn
raven
Rust-based themer for linux, specializing in i3. Rice at a moment's notice!
Stars: ✭ 48 (+65.52%)
Mutual labels:  polybar, unixporn
polytiramisu
Simple notifications from tiramisu in polybar
Stars: ✭ 31 (+6.9%)
Mutual labels:  polybar, polybar-scripts
blue-sky
A clean and blue BSPWM setup
Stars: ✭ 267 (+820.69%)
Mutual labels:  polybar, unixporn
dotfiles
Repository to manage and share personal dotfiles
Stars: ✭ 67 (+131.03%)
Mutual labels:  polybar, unixporn
StartTreeV2
🌳 A $tree styled start page generator!
Stars: ✭ 124 (+327.59%)
Mutual labels:  unixporn
WireGuard-Wrapper
Simple wrapper that makes WireGuard easier to use with VPN providers.
Stars: ✭ 29 (+0%)
Mutual labels:  mullvad
dotfiles
Files that start with a dot (they're very cool).
Stars: ✭ 124 (+327.59%)
Mutual labels:  unixporn
wal-discord
Generate Discord css from pywal colors
Stars: ✭ 76 (+162.07%)
Mutual labels:  unixporn
dotfiles
r/unixporn dotfiles
Stars: ✭ 12 (-58.62%)
Mutual labels:  unixporn
dots
My dotfiles
Stars: ✭ 67 (+131.03%)
Mutual labels:  unixporn
tunfish-vxlan
A proof-of-concept for creating convenient VPN environments on top of secure WireGuard tunnels, with VXLAN.
Stars: ✭ 22 (-24.14%)
Mutual labels:  vpn-manager
dotfiles
dotfiles of my linux setup
Stars: ✭ 25 (-13.79%)
Mutual labels:  polybar
dotfiles
My Linux settings and configs
Stars: ✭ 33 (+13.79%)
Mutual labels:  polybar
polybar-forecast
A weather forecast module for Polybar
Stars: ✭ 85 (+193.1%)
Mutual labels:  polybar

polybar-vpn-controller

Manage your VPN via this polybar module. The module reports the VPN's status in one of three states: [<location> | connecting... | No VPN ], where the location is your public IP address. With optional dependencies, <location> is replaced with <city> <country>.

  • left-click: to connect and disconnect
  • right-click: optional rofi menu to select between locations
  • middle-click: copy your public IP address to the clipboard

(The polybar theme seen in the gif was modified from polybar-5 provided by Aditya Shakya and originally designed by Benedikt Vollmerhaus)

supported VPNs

polybar-vpn-controller is scripted to facilitate differing VPN's, but compatibility will depend on your VPN's API. The stock settings are intended for use with Mullvad VPN. See the vpn_module.sh script user settings to judge whether this code can easily be adapted for your choice of VPN.

It'd be great to make this module more robust for other VPN's, so please contribute other setups. Thanks!

dependencies

You need a VPN!

  • mullvad-vpn, available in the AUR
  • or your own VPN (requires reconfiguring vpn_module.sh)

optional dependencies

  • rofi - menu-based control of the VPN
  • geoip and geoip-database - provide country info instead of public IP address
  • geoip-database-extra - also provides city info
  • xclip - allows copying ip address to clipboard

The optional dependencies can be found in the Arch Package Repository.

install

This setup assumes that your polybar configuration is at ~/.config/polybar. To setup a VPN other than Mullvad, read the configuration tips in vpn_module.sh. Modify as necessary.

cd ~/.config/polybar
git clone https://github.com/shervinsahba/polybar-vpn-controller.git
cd polybar-vpn-controller
mkdir -p ~/.local/share/fonts
cp fonts/* ~/.local/share/fonts/
cat vpn_user_module >> $HOME/.config/polybar/user_modules.ini

After installation add the vpn module to your config.ini polybar.

known issues

The Mullvad VPN client may create excessive entries in the system journal because of the way this script calls on it. To suppress these messages in your log, follow these instructions for a distro with systemd. Tested on Manjaro and Arch.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].