From 236b082078838a9453c7b5eb63fbb9417359d479 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Sat, 13 May 2023 14:43:12 +0000 Subject: [PATCH 1/2] weath: Add option to get forecast from a different location --- .config/shell/aliasrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 09f9a327..501763c4 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -18,6 +18,11 @@ se() { [ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice" ;} +weath() { + [ -z "$1" ] && less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport || + curl --retry 5 -sm 10 "${WTTRURL:-wttr.in}/$1" | less -S + ;} + # Verbosity and settings that you pretty much just always are going to want. alias \ cp="cp -iv" \ @@ -58,4 +63,3 @@ 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_CACHE_HOME:-$HOME/.cache}/weatherreport" \ From fc1cd24557438aa97d26a53a7bd9e00eb3a2d849 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Sun, 14 May 2023 07:59:18 +0000 Subject: [PATCH 2/2] Remove retry and make max time lower because it is interactive --- .config/shell/aliasrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 501763c4..4478464d 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -20,7 +20,7 @@ se() { weath() { [ -z "$1" ] && less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport || - curl --retry 5 -sm 10 "${WTTRURL:-wttr.in}/$1" | less -S + curl -sm 5 "${WTTRURL:-wttr.in}/$1" | less -S ;} # Verbosity and settings that you pretty much just always are going to want.