summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-08-12 07:20:44 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-08-12 07:20:44 +0530
commit937b269967f2ef0ac379cb8cd1d787cc91426d12 (patch)
treeaba6f183e06bf6d0e9e4a56f84dad90977281ba6 /.scripts
parentc87e60e7e9f39e33dce2144d8a855f47358b84a2 (diff)
specifying bash for non-posix compliant scripts+correcting other scripts
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/pdfpicconv2
-rwxr-xr-x.scripts/setbg6
-rwxr-xr-x.scripts/sscp2
-rwxr-xr-x.scripts/wifi-captive-login2
-rwxr-xr-x.scripts/wifi-menu6
5 files changed, 8 insertions, 10 deletions
diff --git a/.scripts/pdfpicconv b/.scripts/pdfpicconv
index 8b7a551..4ab432d 100755
--- a/.scripts/pdfpicconv
+++ b/.scripts/pdfpicconv
@@ -1,3 +1,3 @@
#!/bin/sh
output=$(echo $1 | cut -d. -f1)
-pdftoppm -jpeg -r 300 $1 $output.jpg
+pdftoppm -jpeg -r 300 $1 $output && mv $output*.jpg $output.jpg
diff --git a/.scripts/setbg b/.scripts/setbg
index f743745..024f28d 100755
--- a/.scripts/setbg
+++ b/.scripts/setbg
@@ -14,10 +14,8 @@ echo "Generating pywal color schemes..."
wal -n -i $wall >/dev/null &&
echo "dwm reading Xresources color values at runtime"
xdotool key super+F5
-pywal-discord
$HOME/.local/usr/wal-telegram/wal-telegram
ln -sf ~/.cache/wal/dunstrc ~/.config/dunst/dunstrc
-pkill dunst
-dunst &
-#(cd $HOME/.local/src/dwm && sudo make clean install>/dev/null)
+pkill dunst &&
+dunst
echo "^_^ Enjoy your new look!!!"
diff --git a/.scripts/sscp b/.scripts/sscp
index ffe1701..e6760be 100755
--- a/.scripts/sscp
+++ b/.scripts/sscp
@@ -1,5 +1,5 @@
#!/bin/sh
-latestss=$(ls -t $HOME/pix/Screenshots/ | head -n5 | dmenu -l 5)
+latestss=$(ls -t $HOME/pix/Screenshots/ | head -n10 | dmenu -l 10)
xclip -selection clipboard -t image/png -i $HOME/pix/Screenshots/$latestss
diff --git a/.scripts/wifi-captive-login b/.scripts/wifi-captive-login
index fdfaf2f..4e5c4fa 100755
--- a/.scripts/wifi-captive-login
+++ b/.scripts/wifi-captive-login
@@ -1,5 +1,5 @@
#!/bin/sh
if command -v netstat 1>/dev/null; then
- login=$(netstat -nr | sed '3p;d' | cut -d " " -f 10) ;
+ login=$(netstat -nr | sed -n '3p' | cut -d " " -f 10) ;
st -e librewolf $login ;
fi
diff --git a/.scripts/wifi-menu b/.scripts/wifi-menu
index dd5b9b3..4713c00 100755
--- a/.scripts/wifi-menu
+++ b/.scripts/wifi-menu
@@ -1,13 +1,13 @@
-#!/bin/sh
+#!/bin/bash
choice=$(echo -e "up\ndown\nconnect" | dmenu -p "Do you wish to connect to a wi-fi or disconnect?:")
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" ;;
"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  : ")
- nmcli device wifi connect $bssid password $pass ;;
+ nmcli device wifi connect "$bssid" password "$pass" ;;
esac