Waybar: ivpn module sends notification on click
This commit is contained in:
parent
b90a360321
commit
b340176def
|
@ -116,9 +116,9 @@
|
||||||
},
|
},
|
||||||
"custom/ivpn": { // Custom status module for IVPN
|
"custom/ivpn": { // Custom status module for IVPN
|
||||||
"format": "{} IVPN",
|
"format": "{} IVPN",
|
||||||
"exec": "$HOME/.config/waybar/ivpn.sh",
|
"exec": "$HOME/.config/waybar/ivpn-status.sh",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
"on-click": "ivpn connect -last"
|
"on-click": "$HOME/.config/waybar/ivpn-reconnect.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5
waybar/.config/waybar/ivpn-reconnect.sh
Executable file
5
waybar/.config/waybar/ivpn-reconnect.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ivpn connect -last \
|
||||||
|
&& notify-send -u low "IVPN" "Successfully reconnected to IVPN server:\n$(ivpn status | sed -n 2p | xargs)" \
|
||||||
|
|| notify-send -u critical "IVPN" "Failed to reconnect to IVPN\!"
|
Loading…
Reference in a new issue