summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-11-06 18:15:56 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-11-06 18:15:56 +0530
commit8d513837b076b31c131e49b9ee47a5816fef3030 (patch)
treefef9facfcc1c97b6af1e4bf90cb7c5166ceaf5e3
parent371d02c202c19e68d240729260e2e526a33e41ae (diff)
wifi-menu notification+icon addition
-rw-r--r--.local/share/icons/wifi-slash.svg1
-rw-r--r--.local/share/icons/wifi-solid.svg1
-rwxr-xr-x.scripts/wifi-menu10
-rw-r--r--.xinitrc3
4 files changed, 12 insertions, 3 deletions
diff --git a/.local/share/icons/wifi-slash.svg b/.local/share/icons/wifi-slash.svg
new file mode 100644
index 0000000..7771281
--- /dev/null
+++ b/.local/share/icons/wifi-slash.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path fill="currentColor" d="M6.92 5.51L3.71 2.29a1 1 0 0 0-1.42 1.42L4.56 6A15.21 15.21 0 0 0 1.4 8.39a1 1 0 0 0 0 1.41a1 1 0 0 0 .71.3a1 1 0 0 0 .7-.29a13.07 13.07 0 0 1 3.24-2.35L7.54 9a10.78 10.78 0 0 0-3.32 2.27a1 1 0 1 0 1.42 1.4a8.8 8.8 0 0 1 3.45-2.12l1.62 1.61a7.07 7.07 0 0 0-3.66 1.94a1 1 0 1 0 1.42 1.4A5 5 0 0 1 12 14a4.13 4.13 0 0 1 .63.05l7.66 7.66a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42ZM12 16a3 3 0 1 0 3 3a3 3 0 0 0-3-3Zm0 4a1 1 0 1 1 1-1a1 1 0 0 1-1 1ZM22.61 8.39A15 15 0 0 0 10.29 4.1a1 1 0 1 0 .22 2A13.07 13.07 0 0 1 21.2 9.81a1 1 0 0 0 1.41-1.42Zm-4.25 4.24a1 1 0 0 0 1.42-1.4a10.75 10.75 0 0 0-4.84-2.82a1 1 0 1 0-.52 1.92a8.94 8.94 0 0 1 3.94 2.3Z"/></svg> \ No newline at end of file
diff --git a/.local/share/icons/wifi-solid.svg b/.local/share/icons/wifi-solid.svg
new file mode 100644
index 0000000..b421544
--- /dev/null
+++ b/.local/share/icons/wifi-solid.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160c0-35.3-28.7-64-64-64s-64 28.7-64 64s28.7 64 64 64s64-28.7 64-64z"/></svg> \ No newline at end of file
diff --git a/.scripts/wifi-menu b/.scripts/wifi-menu
index 4713c00..df9f9e5 100755
--- a/.scripts/wifi-menu
+++ b/.scripts/wifi-menu
@@ -5,7 +5,15 @@ choice=$(echo -e "up\ndown\nconnect" | dmenu -p "Do you wish to connect to a wi-
case $choice in
"up"|"down")
ssid=$(nmcli -t -f ssid dev wifi| cut -d\' -f2 | dmenu -p "Select Wifi  " -l 20)
- nmcli c "$choice" "$ssid" ;;
+ nmcli c "$choice" "$ssid";
+ if [ "$choice" == "up" ]; then
+ dunstify "Connected" "You are now connected to $ssid" -i wifi-solid
+ elif [ "$choice" == "down" ]; then
+ dunstify "Disconnected" "You have disconnected from $ssid"-i wifi-slash
+ else
+ :
+ fi;;
+
"connect")
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -p "Select Wi-Fi  :" -l 20 | cut -d' ' -f1)
pass=$(echo "" | dmenu -P -p "Enter Password  : ")
diff --git a/.xinitrc b/.xinitrc
index 56cfb98..5dbaec9 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -3,9 +3,8 @@
dunst &
sxhkd &
setbg &
-nm-applet &
unclutter &
-picom --experimental-backends &
+picom &
setxkbmap -option caps:escape &
dwmblocks &
exec dwm