wireguard -> polybar etc.
This commit is contained in:
parent
601277609f
commit
faaf205da7
|
|
@ -75,7 +75,7 @@ exec --no-startup-id twmnd &
|
||||||
#Wpgtk
|
#Wpgtk
|
||||||
exec --no-startup-id ~/.config/wpg/wp_init.sh
|
exec --no-startup-id ~/.config/wpg/wp_init.sh
|
||||||
#Battery notify
|
#Battery notify
|
||||||
exec --no-startup-id ~/.config/Scripts/i3-battery-monitor
|
exec --no-startup-id ~/.config/Scripts/i3-battery-monitor &
|
||||||
#Conky
|
#Conky
|
||||||
#exec --no-startup-id conky -d -c ~/.config/conky/conkybg &
|
#exec --no-startup-id conky -d -c ~/.config/conky/conkybg &
|
||||||
#Picom
|
#Picom
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ monitor = ${env:MONITOR:eDP-1}
|
||||||
include-file = ~/.config/polybar/top-bar
|
include-file = ~/.config/polybar/top-bar
|
||||||
modules-left = i3 arrow01 xwindow arrow0
|
modules-left = i3 arrow01 xwindow arrow0
|
||||||
modules-center = term chrome editor fm music vpn
|
modules-center = term chrome editor fm music vpn
|
||||||
modules-right = arrow10 redshift arrow9 vpn-nordvpn-status arrow7 wlan arrow6 pkg arrow5 pavolume arrow4 battery arrow3 backlight arrow2 networkmanager arrow1 popup-calendar
|
modules-right = arrow10 redshift arrow9 vpn-wireguard-wg arrow8 vpn-nordvpn-status arrow7 wlan arrow6 pkg arrow5 pavolume arrow4 battery arrow3 backlight arrow2 networkmanager arrow1 popup-calendar
|
||||||
|
|
||||||
;tray-position = right
|
;tray-position = right
|
||||||
;tray-padding = 2
|
;tray-padding = 2
|
||||||
|
|
@ -101,13 +101,13 @@ content-background = ${colors.color3}
|
||||||
[module/arrow8]
|
[module/arrow8]
|
||||||
type = custom/text
|
type = custom/text
|
||||||
content = ""
|
content = ""
|
||||||
content-foreground = ${colors.color2}
|
content-foreground = ${colors.color3}
|
||||||
content-background = ${colors.color3}
|
content-background = ${colors.color4}
|
||||||
|
|
||||||
[module/arrow9]
|
[module/arrow9]
|
||||||
type = custom/text
|
type = custom/text
|
||||||
content = ""
|
content = ""
|
||||||
content-foreground = ${colors.color3}
|
content-foreground = ${colors.color4}
|
||||||
content-background = ${colors.color6}
|
content-background = ${colors.color6}
|
||||||
|
|
||||||
[module/arrow10]
|
[module/arrow10]
|
||||||
|
|
@ -219,6 +219,14 @@ label = "%output% "
|
||||||
label-foreground = ${colors.color0}
|
label-foreground = ${colors.color0}
|
||||||
label-background = ${colors.color9}
|
label-background = ${colors.color9}
|
||||||
|
|
||||||
|
[module/vpn-wireguard-wg]
|
||||||
|
type = custom/script
|
||||||
|
exec = ~/.config/polybar/scripts/wireguard/vpn-wireguard-wg.sh
|
||||||
|
interval = 5
|
||||||
|
click-left = ~/.config/polybar/scripts/wireguard/vpn-wireguard-wg.sh --toggle &
|
||||||
|
label-foreground = ${colors.color0}
|
||||||
|
label-background = ${colors.color4}
|
||||||
|
|
||||||
[module/temperature]
|
[module/temperature]
|
||||||
type = internal/temperature
|
type = internal/temperature
|
||||||
thermal-zone = 6
|
thermal-zone = 6
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
connection_status() {
|
||||||
|
if [ -f "$config" ]; then
|
||||||
|
connection=$(sudo wg show "$config_name" 2>/dev/null | head -n 1 | awk '{print $NF }')
|
||||||
|
|
||||||
|
if [ "$connection" = "$config_name" ]; then
|
||||||
|
echo "1"
|
||||||
|
else
|
||||||
|
echo "2"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "3"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
config="$HOME/wg/wg0.conf"
|
||||||
|
config_name=$(basename "${config%.*}")
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--toggle)
|
||||||
|
if [ "$(connection_status)" = "1" ]; then
|
||||||
|
sudo wg-quick down "$config" 2>/dev/null
|
||||||
|
else
|
||||||
|
sudo wg-quick up "$config" 2>/dev/null
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [ "$(connection_status)" = "1" ]; then
|
||||||
|
echo " WG up"
|
||||||
|
elif [ "$(connection_status)" = "3" ]; then
|
||||||
|
echo "#3 Config not found!"
|
||||||
|
else
|
||||||
|
echo " WG down"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
@ -64,6 +64,7 @@ inetutils
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
intel-ucode
|
intel-ucode
|
||||||
iproute2
|
iproute2
|
||||||
|
ipset
|
||||||
iputils
|
iputils
|
||||||
iwd
|
iwd
|
||||||
jfsutils
|
jfsutils
|
||||||
|
|
@ -102,6 +103,7 @@ ncmpcpp
|
||||||
neofetch
|
neofetch
|
||||||
neovim
|
neovim
|
||||||
netctl
|
netctl
|
||||||
|
network-manager-applet
|
||||||
networkmanager
|
networkmanager
|
||||||
networkmanager-openvpn
|
networkmanager-openvpn
|
||||||
newsboat
|
newsboat
|
||||||
|
|
@ -177,6 +179,7 @@ vulkan-intel
|
||||||
w3m
|
w3m
|
||||||
wget
|
wget
|
||||||
which
|
which
|
||||||
|
wireguard-tools
|
||||||
wireless_tools
|
wireless_tools
|
||||||
wpa_supplicant
|
wpa_supplicant
|
||||||
xcursor-vanilla-dmz
|
xcursor-vanilla-dmz
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue