From 633db36d0938fbdc6db408b51fe2e49b2faabb75 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 2 Apr 2020 07:23:21 -0400 Subject: [PATCH 1/8] noto mono default if installed, inconsolata comted --- .config/fontconfig/fonts.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index cc435d5..749a7cc 100755 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -28,8 +28,9 @@ monospace + Noto Sans Mono Liberation Mono - Inconsolata + Joy Pixels Noto Color Emoji From 043c6253537a20875adbfd274c1c3a3377803095 Mon Sep 17 00:00:00 2001 From: Aleks Ozolins Date: Sun, 5 Apr 2020 09:19:53 -0400 Subject: [PATCH 2/8] Update .profile to export XDG base dirs (#526) Not every program will read them from ~/.config/user-dirs.dirs so might as well export them yourself... Also can now use them elsewhere. --- .profile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.profile b/.profile index 1b5460a..890acde 100644 --- a/.profile +++ b/.profile @@ -14,6 +14,9 @@ export BROWSER="brave" export READER="zathura" export STATUSBAR="${LARBSWM}blocks" +# Export XDG environmental variables from '~/.config/user-dirs.dirs' +eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" + # ~/ Clean-up: #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export NOTMUCH_CONFIG="$HOME/.config/notmuch-config" From 77ba6e73c64aebf9e4f35a217117fc3dafbde99c Mon Sep 17 00:00:00 2001 From: Spenser Truex Date: Sun, 5 Apr 2020 15:30:49 -0700 Subject: [PATCH 3/8] Prevent writing all marked imgs onto file (lossage) (#534) This fix issues a warning message and does nothing in that case. Running C-x c (copy) or C-x m (move) will copy/move all the marked files to a single location. If that location is not a directory, then creating that file and overwriting it several times results in complete loss of data in the case of moving, and unhelpful behaviour in the case of "copying". Only the last marked file remains in the file. --- .config/sxiv/exec/key-handler | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index d9f1825..73b572a 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -6,11 +6,13 @@ do "c") [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & ;; "m") [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & ;; "r") From 6cb9c842c6691842d1bd34e495e84e12646d4991 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 5 Apr 2020 18:31:37 -0400 Subject: [PATCH 4/8] inc rmd --- .config/fontconfig/fonts.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 749a7cc..1a4b404 100755 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -30,7 +30,6 @@ Noto Sans Mono Liberation Mono - Joy Pixels Noto Color Emoji From 4471100f17dcdf33fcaafab8cb7c4947473930a5 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 5 Apr 2020 23:13:33 -0400 Subject: [PATCH 5/8] negatives fix --- .local/bin/statusbar/weather | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index 285ac91..34cd245 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -4,7 +4,7 @@ getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1 curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;} showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" -sed '13q;d' "$HOME/.local/share/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/.local/share/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;} case $BLOCK_BUTTON in 1) $TERMINAL -e less -Srf "$HOME/.local/share/weatherreport" ;; From d650aacb907a2458fc22d9a225f6fd3c4ab2ef28 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 5 Apr 2020 23:14:14 -0400 Subject: [PATCH 6/8] weather updates --- .local/bin/statusbar/weather | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index 34cd245..e98628e 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -1,11 +1,22 @@ #!/bin/sh -getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1 +# Displays todays precipication chance (☔) and daily low (❄) and high (🌞). +# Usually intended for the statusbar. + +# If we have internet, get a weather report from wttr.in and store it locally. +# You could set up a shell alias to view the full file in a pager in the +# terminal if desired. This function will only be run once a day when needed. +getforecast() { ping -q -c 1 1.1.1.1 >/dev/null && curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;} -showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" +# Some very particular and terse stream manipulation. We get the maximum +# precipication chance and the daily high and low from the downloaded file and +# display them with coresponding emojis. +showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | + grep -wo "[0-9]*%" | sort -rn | sed "s/^/☔ /g;1q" | tr -d '\n')" sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;} +# The BLOCK_BUTTON bloat for clicking in i3. case $BLOCK_BUTTON in 1) $TERMINAL -e less -Srf "$HOME/.local/share/weatherreport" ;; 2) getforecast && showweather ;; @@ -16,7 +27,9 @@ case $BLOCK_BUTTON in 🌞: Daily high" ;; esac -if [ "$(stat -c %y "$HOME/.local/share/weatherreport" 2>/dev/null | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] - then getforecast && showweather - else showweather -fi +# 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 "$HOME/.local/share/weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || + getforecast + +showweather From 29096439ac8de198511736345206e916a3a5cbe7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 6 Apr 2020 19:28:33 -0400 Subject: [PATCH 7/8] weather for pos, neg and signless pos temps --- .local/bin/statusbar/weather | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index e98628e..0a501e3 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -14,7 +14,7 @@ curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;} # display them with coresponding emojis. showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -rn | sed "s/^/☔ /g;1q" | tr -d '\n')" -sed '13q;d' "$HOME/.local/share/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/.local/share/weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;} # The BLOCK_BUTTON bloat for clicking in i3. case $BLOCK_BUTTON in From 2d8fe0c738e84f2a202914771e7be665718d588e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 7 Apr 2020 09:22:41 -0400 Subject: [PATCH 8/8] emoji fonts not specified for mono --- .config/fontconfig/fonts.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 1a4b404..2d58803 100755 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -30,8 +30,6 @@ Noto Sans Mono Liberation Mono - Joy Pixels - Noto Color Emoji