From be7ed1516b6bb9f11fbdc1a1c82627a82544cff6 Mon Sep 17 00:00:00 2001 From: "M.Zeinali" Date: Fri, 30 Sep 2022 17:52:33 +0330 Subject: [PATCH 1/4] Add `s` to OPTARGS (#1174) --- .local/bin/slider | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ;; From 1804d4c7f0d098517e741a134f9c0fa8583002fb Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Sun, 2 Oct 2022 19:11:00 +0000 Subject: [PATCH 2/4] Delete prompt (#1200) --- .local/bin/prompt | 8 -------- 1 file changed, 8 deletions(-) delete mode 100755 .local/bin/prompt 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 From 92de5e82b365dc027bf10f1f28e77b5e784e9992 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Sun, 2 Oct 2022 19:11:17 +0000 Subject: [PATCH 3/4] weatherreport is stored in cache (#1201) --- .config/shell/aliasrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 8273a2f..0541d0f 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -51,4 +51,4 @@ alias \ lf="lfub" \ magit="nvim -c MagitOnly" \ ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \ - weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \ + weath="less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" \ From 7d7872b602adc8be021bf25b02f2372e87290aa2 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Sun, 2 Oct 2022 19:22:00 +0000 Subject: [PATCH 4/4] Make sb-forecast and sb-moonphase more robust (#1198) * Make sb-forecast more robust * Make sb-moonphase more robust --- .local/bin/statusbar/sb-forecast | 2 +- .local/bin/statusbar/sb-moonphase | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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")"