summaryrefslogtreecommitdiffstats
path: root/local/bin/network_control.sh
diff options
context:
space:
mode:
Diffstat (limited to 'local/bin/network_control.sh')
-rwxr-xr-xlocal/bin/network_control.sh53
1 files changed, 0 insertions, 53 deletions
diff --git a/local/bin/network_control.sh b/local/bin/network_control.sh
deleted file mode 100755
index 4dc4b38..0000000
--- a/local/bin/network_control.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-signal=30
-
-# signal dwmblocks to update network block
-send_signal() {
- pkill -RTMIN+$signal dwmblocks
-}
-
-toggle_wifi() {
- status=$(nmcli radio wifi)
-
- if [ "$status" = "enabled" ]; then
- nmcli radio wifi off
- else
- nmcli radio wifi on
- fi
-}
-
-# This one is hard because it requires root, and the VPN interface name
-# 2 ways to toggle, using systemctl, or wg-quick(1)
-# This one might be better controled through a `dmenu` script.
-toggle_vpn() {
- :
-}
-
-toggle_network_quarantine() {
- # Check the status of all wireless devices
- if rfkill list | grep -q "Soft blocked: no"; then
- # not all blocked
- rfkill block all
- else
- # all blocked
- rfkill unblock all
- fi
-}
-
-# WIP
-toggle_bluetooth() {
- :
-}
-
-case $1 in
- wifitoggle) toggle_wifi ;;
- vpntoggle) toggle_vpn ;;
- bluetoothtoggle) toggle_bluetooth ;;
- isolatetoggle) toggle_network_quarantine ;;
- *)
- echo "invalid option :)"
- ;;
-esac
-
-send_signal