addded rofi config

This commit is contained in:
2026-06-11 19:02:21 +02:00
parent 8ff3d825d4
commit aef04496ac
328 changed files with 22908 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
#!/usr/bin/env bash
## Author : Aditya Shakya
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Twitter : @adi1090x
## Edited : fennek
style="$($HOME/.config/rofi/applets/menu/style.sh)"
dir="$HOME/.config/rofi/applets/menu/configs/$style"
rofi_command="rofi -theme $dir/network.rasi"
## Get info
IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')"
#SSID="$(iwgetid -r)"
#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')"
#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
#STATUS="$(nmcli radio wifi)"
active=""
urgent=""
# Options
launch_cli="者"
launch="asdasd"
bluetooth=""
if (ping -c 1 archlinux.org || ping -c 1 bitbucket.org || ping -c 1 sourceforge.net) &>/dev/null; then
active="-a 0"
SSID="$(nmcli | grep -i inet4 | awk '{ print $2 }' | head -c-4)"
#SSID="﬉ $(iwgetid -r)"
PIP="$(wget --timeout=30 http://ipinfo.io/ip -qO -)"
else
urgent="-u 0"
SSID="Disconnected"
PIP="Not Available"
connected=""
fi
## Icons
bmon=""
launch_cli=""
launch=""
options="$connected\n$bmon\n$bluetooth\n$launch"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$SSID | $PIP" -dmenu $active $urgent -selected-row 1)"
case $chosen in
$connected)
#if [[ $STATUS == *"enable"* ]]; then
#nmcli radio wifi off
#fi
;;
$bmon)
alacritty -e bmon
;;
$bluetooth)
blueman-manager
#alacritty -e nmtui
;;
$launch)
nm-connection-editor
;;
esac