diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2023-01-04 18:37:40 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2023-01-04 18:37:40 -0500 |
| commit | 6e11f434d71a49a6f3dd42d1471eaf7b46003717 (patch) | |
| tree | 74cbff4ee50f947901b7afd7c38ff04c1dc61e66 | |
| parent | b9e00afded90f03ac18f75aa7dfc8e7f3e146348 (diff) | |
updating scripts
| -rw-r--r-- | .config/newsboat/urls | 1 | ||||
| -rwxr-xr-x | .config/xinitrc | 2 | ||||
| -rwxr-xr-x | .local/bin/internet | 10 | ||||
| -rwxr-xr-x | .local/bin/prompt | 2 | ||||
| -rwxr-xr-x | .local/bin/weather | 2 |
5 files changed, 15 insertions, 2 deletions
diff --git a/.config/newsboat/urls b/.config/newsboat/urls index ac37640..bb50b94 100644 --- a/.config/newsboat/urls +++ b/.config/newsboat/urls @@ -9,3 +9,4 @@ https://lukesmith.xyz/lindy.xml "Lindy Press" https://drewdevault.com/blog/index.xml "Drew DeVault" https://www.youtube.com/feeds/videos.xml?channel_id=FEwhat_to_watch "Rex Krueger" https://www.youtube.com/feeds/videos.xml?channel_id=FEwhat_to_watch "Rex Krueger" +https://jacobmcdonnell.com/articles/rss.xml diff --git a/.config/xinitrc b/.config/xinitrc index 451b5dd..4eef6ce 100755 --- a/.config/xinitrc +++ b/.config/xinitrc @@ -1,8 +1,8 @@ #!/bin/sh exec $HOME/.local/bin/setWall $HOME/Documents/Pictures/Wallpapers/ & exec /usr/bin/picom & -[ $wm == "/usr/local/bin/dwm" ] && exec /usr/local/bin/dwmblocks & exec /usr/bin/mpd /home/jmm/.config/mpd/mpd.conf & exec $HOME/.local/bin/keys & exec /usr/bin/pipewire & +[ $wm == "/usr/local/bin/dwm" ] && exec /usr/local/bin/dwmblocks & exec $wm diff --git a/.local/bin/internet b/.local/bin/internet new file mode 100755 index 0000000..70e48ec --- /dev/null +++ b/.local/bin/internet @@ -0,0 +1,10 @@ +#!/bin/sh + +[ "$(connmanctl services | grep "Wired" | awk -F' ' '{print $2}')" = "Wired" ] && CONNECTION="Wired" || CONNECTION="$(connmanctl services | grep '*' | awk -F' ' '{print $2}')" + +[ "$CONNECTION" = "Wired" ] && IP="$(ip address | grep dynamic | grep 192.168.)" || IP="$(ip address | grep wlo | grep 192.168. )" + +IP="${IP%/*}" +IP="${IP##* }" + +printf $CONNECTION diff --git a/.local/bin/prompt b/.local/bin/prompt new file mode 100755 index 0000000..52f8af3 --- /dev/null +++ b/.local/bin/prompt @@ -0,0 +1,2 @@ +#!/bin/sh +[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2 diff --git a/.local/bin/weather b/.local/bin/weather index 000ba1b..a52a855 100755 --- a/.local/bin/weather +++ b/.local/bin/weather @@ -4,7 +4,7 @@ getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1 curl -sf "wttr.in/Ocean+City" > "$HOME/.cache/weatherreport" || exit 1 ;} showweather() { printf "%s" "$(sed '16q;d' "$HOME/.cache/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" -sed '13q;d' "$HOME/.cache/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;} +sed '13q;d' "$HOME/.cache/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print "❄️",$1 "°","🌞",$2 "°"}' ;} [ "$(stat -c %y "$HOME/.cache/weatherreport" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] && getforecast showweather |
