From 79d0fcfdd1816e7e35259f9ea65d0c178b473d3b Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Mon, 29 May 2023 12:39:14 -0600 Subject: [PATCH] fix nerdfonts --- scripts/dmenu-otp | 1 + scripts/dmenu-pass | 5 +++-- scripts/iwctl-dmenu-connect | 8 ++++---- scripts/iwctl-scan | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/dmenu-otp b/scripts/dmenu-otp index 3ffd0de..421aee2 100755 --- a/scripts/dmenu-otp +++ b/scripts/dmenu-otp @@ -10,5 +10,6 @@ password=$(find ~/.password-store/ -type f -name '*.gpg' | sed 's/.*\/\(.*\)\.gp # Otherwise, copy to clipboard and notify OTP pass otp "$password" | while read -r OUTPUT; do echo $OUTPUT | xsel -ib + xdotool type "$OUTPUT" notify-send " $password" "$OUTPUT" done diff --git a/scripts/dmenu-pass b/scripts/dmenu-pass index 8f0d24a..921f2d7 100755 --- a/scripts/dmenu-pass +++ b/scripts/dmenu-pass @@ -8,5 +8,6 @@ password=$(find ~/.password-store/ -type f -name '*.gpg' | # Exit if none chosen [ -z "$password" ] && exit -# If chosen, copy to clipboard, and notify -pass show "$password" | head -1 | xsel -ib && notify-send " $password" "Copied to clipboard" +# If chosen, use xdotool to type it +pass=$(pass show "$password" | head -1) +xdotool type "$pass" && notify-send " $password" "Successfully decrypted" diff --git a/scripts/iwctl-dmenu-connect b/scripts/iwctl-dmenu-connect index 5ffff0e..e4047d6 100755 --- a/scripts/iwctl-dmenu-connect +++ b/scripts/iwctl-dmenu-connect @@ -9,17 +9,17 @@ network=$(iwctl station wlan0 get-networks | cut -d " " -f 7-21 | tail +5 | awk iwctl station wlan0 connect --dont-ask "$network" sleep 2 # Bit of grace time # Exit with notification if $network is shown on status -iwctl station wlan0 show | grep "network" | awk '{print $3}' | grep -q "$network" && notify-send "直 Wireless Network" "Connected to $network" && exit +iwctl station wlan0 show | grep "network" | awk '{print $3}' | grep -q "$network" && notify-send "󰖩 Wireless Network" "Connected to $network" && exit # Try connecting with passphrase pass=$(dmenu -p "Passphrase:" -P < /dev/null) # Test for empty password, exit if true -[ -z "$pass" ] && notify-send "直 Wireless Network" "Invalid password: Empty" && exit +[ -z "$pass" ] && notify-send "󰖩 Wireless Network" "Invalid password: Empty" && exit # Attempt conection with provided pass, notify and exit on success iwctl --passphrase="$pass" station wlan0 connect --dont-ask "$network" sleep 2 # Bit of grace time # Exit with notification if $network is shown on status -iwctl station wlan0 show | grep "network" | awk '{print $3}' | grep -q "$network" && notify-send "直 Wireless Network" "Connected to $network" && exit +iwctl station wlan0 show | grep "network" | awk '{print $3}' | grep -q "$network" && notify-send "󰖩 Wireless Network" "Connected to $network" && exit # Notify unsuccessful operation -notify-send "直 Wireless Network" "Operation unsuccessful" +notify-send "󰖩 Wireless Network" "Operation unsuccessful" diff --git a/scripts/iwctl-scan b/scripts/iwctl-scan index 975ef59..71c0116 100755 --- a/scripts/iwctl-scan +++ b/scripts/iwctl-scan @@ -2,4 +2,4 @@ # Shortcut for scanning networks # Attempt to scan networks, notify operation success -iwctl station wlan0 scan && notify-send "直 Wireless Network" "Scanning..." || notify-send "󰖩 Wireless Network" "Operation unsuccessful" +iwctl station wlan0 scan && notify-send "󰖩 Wireless Network" "Scanning..." || notify-send "󰖩 Wireless Network" "Operation unsuccessful"