From 384fb1e69c7750f54d7d0edddce789cd3a97dfc4 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Sat, 17 Sep 2022 17:02:46 -0400 Subject: [PATCH] Use sidebar config --- wofi/wofi-drun.sh | 10 ++++++++++ wofi/wofi-emoji.sh | 2 +- wofi/wofi-wifi-menu.sh | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100755 wofi/wofi-drun.sh diff --git a/wofi/wofi-drun.sh b/wofi/wofi-drun.sh new file mode 100755 index 0000000..6d36035 --- /dev/null +++ b/wofi/wofi-drun.sh @@ -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 diff --git a/wofi/wofi-emoji.sh b/wofi/wofi-emoji.sh index 8f45995..8487e6d 100755 --- a/wofi/wofi-emoji.sh +++ b/wofi/wofi-emoji.sh @@ -2,7 +2,7 @@ # 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 ### DATA ### 😀 grinning face face smile happy joy :D grin diff --git a/wofi/wofi-wifi-menu.sh b/wofi/wofi-wifi-menu.sh index 79e2493..f269aa1 100755 --- a/wofi/wofi-wifi-menu.sh +++ b/wofi/wofi-wifi-menu.sh @@ -50,7 +50,7 @@ elif [[ "$CONSTATE" =~ "disabled" ]]; then 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 exit 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 [ "$CHENTRY" = "manual" ] ; then # 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 MPASS=$(echo "$MSSID" | awk -F "," '{print $2}') @@ -93,7 +93,7 @@ else nmcli con up "$CHSSID" else 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 nmcli dev wifi con "$CHSSID" password "$WIFIPASS" fi