summaryrefslogtreecommitdiff
path: root/ar/.local/bin/dmenuconnections
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-29 21:54:51 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-29 21:54:51 +0900
commitf9f1ce2af8546c0825192a8c89d596c200d7fe2d (patch)
tree1cb3a411bcc9ebbb429aba050bf7eb9cab3575cc /ar/.local/bin/dmenuconnections
parentcd12c95fbb657a20f256cde65a736ab0ab53e0e6 (diff)
modified lf/lfrc, modified x11/xprofile, modified zsh/scripts.zsh, modified bin/dmenuconnections, created bin/extract
Diffstat (limited to 'ar/.local/bin/dmenuconnections')
-rwxr-xr-xar/.local/bin/dmenuconnections9
1 files changed, 4 insertions, 5 deletions
diff --git a/ar/.local/bin/dmenuconnections b/ar/.local/bin/dmenuconnections
index 024e7da..cc39771 100755
--- a/ar/.local/bin/dmenuconnections
+++ b/ar/.local/bin/dmenuconnections
@@ -3,8 +3,6 @@
# initial configuration
# sudo pacman --noconfirm -S bluez-utils pulseaudio-bluetooth pulseaudio-alsa blueman
# sudo ln -vsf ${PWD}/etc/bluetooth/main.conf /etc/bluetooth/main.conf
-# sudo systemctl start bluetooth.service
-# sudo systemctl enable bluetooth.service
# Requires:
# blueman
@@ -13,14 +11,14 @@
# btmenu (https://github.com/cdown/btmenu)
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
-[ -z "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
+[ -z "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "🛜", int($3 * 100 / 70) "%" }')
wifi=$(printf "%s %s" "${wifiicon}" "$(cat /sys/class/net/w*/operstate | sed "s/down/❎/;s/up/🌐/")")
if [ -n "${wifi}" ]; then
- choice=$(printf 'bluetooth\nnetwork' | dmenu -i -p "${wifi}")
+ choice=$(printf 'bluetooth\nnetwork\nwifi' | dmenu -i -p "${wifi}")
else
- choice=$(printf 'bluetooth\nnetwork' | dmenu -i -p 'Connect:')
+ choice=$(printf 'bluetooth\nnetwork\nwifi' | dmenu -i -p 'Connect:')
fi
case "${choice}" in
@@ -33,4 +31,5 @@ bluetooth)
esac
;;
network) networkmanager_dmenu ;;
+wifi) nmcli -c no d wifi list | tail -n +2 | sed 's/ \+/ /;s/Infra [0-9]*/ /g;s/WPA. .*$//;s/Mbit\/s[[:space:]]*[0-9]*/Mbit\/s/g;s/Ad-Hoc [0-9]*//g' | dmenu -l 20 -p Networks ;;
esac