From f450e6bc9290400d164b35153b0a0921041aa61d Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Tue, 11 Jun 2019 16:59:50 +0200 Subject: [PATCH] Add VPN indicator to polybar Resolves #7 Signed-off-by: Severin Kaderli --- system/.config/custom/aliases | 7 ++++--- system/.config/polybar/config | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/system/.config/custom/aliases b/system/.config/custom/aliases index 8704495..cccda61 100644 --- a/system/.config/custom/aliases +++ b/system/.config/custom/aliases @@ -20,9 +20,6 @@ alias ls='lsd --icon never' alias la="ls -al" alias lt="ls --tree" -# Alias for using ripgrep as grep replacement -alias grep="rg -n" - # Alias for using bat as cat replacement alias cat="bat" @@ -39,6 +36,10 @@ if [ -d "${HOME}/documents" ]; then alias doc='cd ${HOME}/documents' fi +if [ -d "${HOME}/work" ]; then + alias wo='cd ${HOME}/work' +fi + # Alias for opening my code editor alias e="code" diff --git a/system/.config/polybar/config b/system/.config/polybar/config index 0462107..fe6843d 100644 --- a/system/.config/polybar/config +++ b/system/.config/polybar/config @@ -43,7 +43,7 @@ module-margin = 2 modules-left = i3 modules-center = -modules-right = update gmail todo battery volume backlight wlan network date power +modules-right = update gmail todo battery volume backlight vpn wlan ethernet date power tray-position = none separator = | @@ -220,6 +220,18 @@ interval = 0.1 scroll-up = light -A 5 scroll-down = light -U 5 +############################################################################## +# VPN indicator # +############################################################################## +[module/vpn] +type = custom/script +exec = nmcli connection show --active | grep "vpn" | cut -d " " -f 1 + +format = 