From 37ff7062874b72bafa99afe661f42653565ed511 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Wed, 11 Sep 2024 04:25:38 +0900 Subject: RESTRUCTURE. Replicate relative paths in public/ --- local/bin/network_control.sh | 53 -------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100755 local/bin/network_control.sh (limited to 'local/bin/network_control.sh') 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 -- cgit v1.2.3