diff options
-rw-r--r-- | i3pystatus/.config/i3pystatus/conf.py | 28 | ||||
-rw-r--r-- | services-root/vpn-perso.service | 12 | ||||
-rw-r--r-- | services-root/vpn-pro.service | 12 |
3 files changed, 51 insertions, 1 deletions
diff --git a/i3pystatus/.config/i3pystatus/conf.py b/i3pystatus/.config/i3pystatus/conf.py index adcb5ea..7ba2249 100644 --- a/i3pystatus/.config/i3pystatus/conf.py +++ b/i3pystatus/.config/i3pystatus/conf.py @@ -132,14 +132,40 @@ status.register("text", text="|", hints = {"separator": False, "separator_block_width": 0},) -status.register("net_speed", +status.register("openvpn", + format="{status}", + vpn_name="vpn-pro", + status_up="vpro", + status_down="", + status_command="bash -c 'systemctl show vpn-pro.service | grep ActiveState=active'", + hints = {"markup": "pango", "separator": False, "separator_block_width": 0},) + +status.register("text", + text="|", hints = {"separator": False, "separator_block_width": 0},) +status.register("openvpn", + format="{status}", + vpn_name="vpn-perso", + status_up="vperso", + status_down="", + status_command="bash -c 'systemctl show vpn-perso.service | grep ActiveState=active'", + hints = {"markup": "pango", "separator": False, "separator_block_width": 0},) + status.register("text", text="|", hints = {"separator": False, "separator_block_width": 0},) +#status.register("netspeed", +#status.register("net_speed", +# hints = {"separator": False, "separator_block_width": 0},) + +#status.register("text", +# text="|", +# hints = {"separator": False, "separator_block_width": 0},) + + #status.register("external_ip", # color="#fff", # color_down="#fff", diff --git a/services-root/vpn-perso.service b/services-root/vpn-perso.service new file mode 100644 index 0000000..4b0c201 --- /dev/null +++ b/services-root/vpn-perso.service @@ -0,0 +1,12 @@ +[Unit] +Description=VPN pro +After=network-pre.target +Before=network.target netctl.service +Wants=network.target + +[Service] +RemainAfterExit=yes +ExecStart=/usr/bin/openvpn /home/neodarz/.ovpn/neodarz-perso.ovpn + +[Install] +WantedBy=multi-user.target diff --git a/services-root/vpn-pro.service b/services-root/vpn-pro.service new file mode 100644 index 0000000..2259f65 --- /dev/null +++ b/services-root/vpn-pro.service @@ -0,0 +1,12 @@ +[Unit] +Description=VPN pro +After=network-pre.target +Before=network.target netctl.service +Wants=network.target + +[Service] +RemainAfterExit=yes +ExecStart=/usr/bin/openvpn /home/neodarz/.ovpn/neodarz-pro.ovpn + +[Install] +WantedBy=multi-user.target |