summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-10-02 15:25:53 -0400
committerLuke Smith <luke@lukesmith.xyz>2022-10-02 15:25:53 -0400
commit87ab89cf180c8ca9f8b4888847c4b06ab5b30f61 (patch)
treea7c10124c70cd00d9cd5a902245111e7d007eed0 /.local/bin
parent28a57eb59ec33308ab0e835429e9a0dcb054d07e (diff)
parent7d7872b602adc8be021bf25b02f2372e87290aa2 (diff)
downloadeibhear-87ab89cf180c8ca9f8b4888847c4b06ab5b30f61.tar.gz
eibhear-87ab89cf180c8ca9f8b4888847c4b06ab5b30f61.tar.zst
eibhear-87ab89cf180c8ca9f8b4888847c4b06ab5b30f61.zip
Merge branch 'master' of github.com:LukeSmithxyz/voidrice
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/prompt8
-rwxr-xr-x.local/bin/slider2
-rwxr-xr-x.local/bin/statusbar/sb-forecast2
-rwxr-xr-x.local/bin/statusbar/sb-moonphase2
4 files changed, 3 insertions, 11 deletions
diff --git a/.local/bin/prompt b/.local/bin/prompt
deleted file mode 100755
index 666434f..0000000
--- a/.local/bin/prompt
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# A dmenu binary prompt script.
-# Gives a dmenu prompt labeled with $1 to perform command $2.
-# For example:
-# `./prompt "Do you want to shutdown?" "shutdown -h now"`
-
-[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2
diff --git a/.local/bin/slider b/.local/bin/slider
index 674781a..3460c77 100755
--- a/.local/bin/slider
+++ b/.local/bin/slider
@@ -9,7 +9,7 @@
# Application cache if not stated elsewhere.
cache="${XDG_CACHE_HOME:-$HOME/.cache}/slider"
-while getopts "hvrpi:c:a:o:d:f:t:e:x:" o; do case "${o}" in
+while getopts "hvrpi:c:a:o:d:f:t:e:x:s:" o; do case "${o}" in
c) bgc="$OPTARG" ;;
t) fgc="$OPTARG" ;;
f) font="$OPTARG" ;;
diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast
index 45584c5..af77d2c 100755
--- a/.local/bin/statusbar/sb-forecast
+++ b/.local/bin/statusbar/sb-forecast
@@ -29,7 +29,7 @@ esac
# The test if our forcecast is updated to the day. If it isn't download a new
# weather report from wttr.in with the above function.
-[ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
+[ ! -s "$weatherreport" ] && [ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
getforecast
showweather
diff --git a/.local/bin/statusbar/sb-moonphase b/.local/bin/statusbar/sb-moonphase
index fab8b4d..5eb1875 100755
--- a/.local/bin/statusbar/sb-moonphase
+++ b/.local/bin/statusbar/sb-moonphase
@@ -4,7 +4,7 @@
moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase"
-[ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
+[ ! -s "$moonfile" ] && [ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
{ curl -sf "wttr.in/?format=%m" > "$moonfile" || exit 1 ;}
icon="$(cat "$moonfile")"