feat(rofi): add rofi config and scripts
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
e9cb27e509
commit
48cd765ce9
4 changed files with 202 additions and 1 deletions
24
.local/bin/rofi-vpn
Executable file
24
.local/bin/rofi-vpn
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
print_opts() {
|
||||
printf "reconnect\nconnect\ndisconnect\n"
|
||||
}
|
||||
|
||||
main() {
|
||||
selected="$(print_opts 2>/dev/null \
|
||||
| rofi -dmenu -p 'mullvad')"
|
||||
|
||||
case "$selected" in
|
||||
"reconnect")
|
||||
mullvad reconnect && sleep 1 && notify-send "Mullvad VPN" "$(mullvad status)"
|
||||
;;
|
||||
"connect")
|
||||
mullvad connect && sleep 1 && notify-send "Mullvad VPN" "$(mullvad status)"
|
||||
;;
|
||||
"disconnect")
|
||||
mullvad disconnect && sleep 1 && notify-send "Mullvad VPN" "$(mullvad status)"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main
|
Loading…
Add table
Add a link
Reference in a new issue