From cf93ac0a7ec0cee6a90bdcfcde60e2511a7cebdf Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 31 May 2023 09:28:52 +0200 Subject: [PATCH] add git config, stop sb-forecast from running haywire before captive portals --- .config/git/config | 12 ++++++++++++ .local/bin/statusbar/sb-forecast | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .config/git/config diff --git a/.config/git/config b/.config/git/config new file mode 100644 index 00000000..7c76b81b --- /dev/null +++ b/.config/git/config @@ -0,0 +1,12 @@ +[init] + defaultBranch = main +[push] + recurseSubmodules = check +[pull] + rebase = false +[submodule] + recurse = true +[credential] + helper = store +[include] + path = ~/.config/git/host-setup diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index 7922066f..6274e622 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -16,8 +16,8 @@ weatheropts="?FA" emojiopts="?FA&format=%c" getforecast() { - curl -sf --retry 5 "$url$weatheropts" >"$weatherfile" || exit 1 - curl -sf "$url$emojiopts" --retry 5 | sed 's/☀️//;s/☁️//;s/⛅️//;s/⛈//;s/✨//;s/❄️//;s/🌦//;s/🌧//;s/🌨//;s/🌩//;s/🌫//;' | cut -d ' ' -f 1 >"$emojifile" || exit 1 + curl -sfL --retry 5 "$url$weatheropts" >"$weatherfile" || return 1 + curl -sfL "$url$emojiopts" --retry 5 | sed 's/☀️//;s/☁️//;s/⛅️//;s/⛈//;s/✨//;s/❄️//;s/🌦//;s/🌧//;s/🌨//;s/🌩//;s/🌫//;' | cut -d ' ' -f 1 >"$emojifile" || return 1 } fresh() { [ -s "$weatherfile" ] && [ "$(stat -c %y "$weatherfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ]