Use sidebar config

This commit is contained in:
John Mertz 2022-09-17 17:02:46 -04:00
parent 67e4eb1d8a
commit cf703f1696
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
3 changed files with 14 additions and 4 deletions

10
wofi/wofi-drun.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
WOFI=$(pgrep -xc wofi | cut -b 1)
echo $WOFI
if [[ "$WOFI" -eq "0" ]]; then
wofi -s /home/jpm/.dotfiles/wofi/style.css -c $HOME/.dotfiles/wofi/sidebar --show drun -I
else
killall wofi 2&>1 /dev/null
fi

View File

@ -2,7 +2,7 @@
# Modified from: https://github.com/dln/wofi-emoji # Modified from: https://github.com/dln/wofi-emoji
sed '1,/^### DATA ###$/d' $0 | wofi --show dmenu -i -s $HOME/.dotfiles/wofi/style.css | cut -d ' ' -f 1 | tr -d '\n' | wl-copy --primary sed '1,/^### DATA ###$/d' $0 | wofi --show dmenu -i -c $HOME/.dotfiles/wofi/sidebar -s $HOME/.dotfiles/wofi/style.css | cut -d ' ' -f 1 | tr -d '\n' | wl-copy --primary
exit exit
### DATA ### ### DATA ###
😀 grinning face face smile happy joy :D grin 😀 grinning face face smile happy joy :D grin

View File

@ -50,7 +50,7 @@ elif [[ "$CONSTATE" =~ "disabled" ]]; then
fi fi
CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | wofi -s $HOME/.dotfiles/wofi/style.css -i -d --prompt "Wi-Fi SSID: " --lines "$LINENUM" --location "$POSITION" --yoffset "$YOFF" --xoffset "$XOFF" --width $RWIDTH) CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | wofi -s $HOME/.dotfiles/wofi/style.css -i -d --prompt "Wi-Fi SSID: " -c $HOME/.dotfiles/wofi/sidebar)
if [[ $CHENTRY == "" ]]; then if [[ $CHENTRY == "" ]]; then
exit exit
fi fi
@ -61,7 +61,7 @@ CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}')
# If the user inputs "manual" as their SSID in the start window, it will bring them to this screen # If the user inputs "manual" as their SSID in the start window, it will bring them to this screen
if [ "$CHENTRY" = "manual" ] ; then if [ "$CHENTRY" = "manual" ] ; then
# Manual entry of the SSID and password (if appplicable) # Manual entry of the SSID and password (if appplicable)
MSSID=$(echo "enter the SSID of the network (SSID,password)" | wofi -s $HOME/.dotfiles/wofi/style.css -d "Manual Entry: " --lines 1) MSSID=$(echo "enter the SSID of the network (SSID,password)" | wofi -s $HOME/.dotfiles/wofi/style.css -d "Manual Entry: " -c $HOME/.dotfiles/wofi/sidebar)
# Separating the password from the entered string # Separating the password from the entered string
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}') MPASS=$(echo "$MSSID" | awk -F "," '{print $2}')
@ -93,7 +93,7 @@ else
nmcli con up "$CHSSID" nmcli con up "$CHSSID"
else else
if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then
WIFIPASS=$(echo "if connection is stored, hit enter" | wofi -s $HOME/.dotfiles/wofi/style.css -P -d --prompt "password" --lines 1 --location "$POSITION" --yoffset "$YOFF" --xoffset "$XOFF" --width $RWIDTH) WIFIPASS=$(echo "if connection is stored, hit enter" | wofi -s $HOME/.dotfiles/wofi/style.css -P -d --prompt "password" -c $HOME/.dotfiles/wofi/sidebar)
fi fi
nmcli dev wifi con "$CHSSID" password "$WIFIPASS" nmcli dev wifi con "$CHSSID" password "$WIFIPASS"
fi fi