From 582c7ad0569e4bc52a86b38e9a51f07f41842e15 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 2 Sep 2024 17:36:35 +0800 Subject: init hyprland scripts --- network-status | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 network-status (limited to 'network-status') diff --git a/network-status b/network-status new file mode 100755 index 0000000..ae54aeb --- /dev/null +++ b/network-status @@ -0,0 +1,27 @@ +#!/bin/sh + +status="$(nmcli general status | grep -oh "\w*connect\w*")" + +if [[ "$status" == "disconnected" ]]; then + printf "󰤮 " +elif [[ "$status" == "connecting" ]]; then + printf "󱍸 " +elif [[ "$status" == "connected" ]]; then + # strength="$(nmcli -f IN-USE,SIGNAL device wifi | grep '*' | awk '{print $2}')" + strength="$(python $HOME/scripts/wifi-conn-strength)" + if [[ "$?" == "0" ]]; then + if [[ "$strength" -eq "0" ]]; then + printf "󰤯 " + elif [[ ("$strength" -ge "0") && ("$strength" -le "25") ]]; then + printf "󰤟 " + elif [[ ("$strength" -ge "25") && ("$strength" -le "50") ]]; then + printf "󰤢 " + elif [[ ("$strength" -ge "50") && ("$strength" -le "75") ]]; then + printf "󰤥 " + elif [[ ("$strength" -ge "75") && ("$strength" -le "100") ]]; then + printf "󰤨 " + fi + else + printf "󰈀 " + fi +fi -- cgit v1.2.3