diff options
author | ubuntuperonista <30541016+ubuntuperonista@users.noreply.github.com> | 2023-01-28 22:17:11 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 22:17:11 -0300 |
commit | ebc8ddb8a7525d845569df7fa738bc992557a950 (patch) | |
tree | 2405193e458ac42baf40890d68c3c99ee132b1dc | |
parent | 224426ee8bb9ce886287a54506abed98f6c452b4 (diff) | |
download | wifi_toggle-ebc8ddb8a7525d845569df7fa738bc992557a950.tar.gz |
Delete wifi_toggle
-rw-r--r-- | wifi_toggle | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/wifi_toggle b/wifi_toggle deleted file mode 100644 index 3d54e8c..0000000 --- a/wifi_toggle +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -## This scrips toggle the wifi adator. -## Works on Ubuntu 16.04lts and up. -STATEFILE="/tmp/wifionoff.state" - -if [ $# -eq 1 ]; then - case $1 in - "up"|"on") - STATE=off - ;; - "down"|"off") - STATE=on - ;; - esac -else - if [ ! -e ${STATEFILE} ]; then - STATE=on - else - . ${STATEFILE} - fi -fi -if [ -z ${STATE} ]; then - STATE=on -fi - -if [ ${STATE} = "on" ]; then - nmcli radio wifi off - STATE=off - echo 'Wifi off' - notify-send 'Wifi apagado' - play -q ~/Público/wifioff.ogg -t alsa & # -# disown # -else - nmcli radio wifi on - STATE=on - echo 'Wifi on' - notify-send 'Wifi encendido' - play -q ~/Público/wifion.ogg -t alsa & # -# disown # -fi - -echo "STATE=${STATE}" > ${STATEFILE} |