From 6a5ad1ee5b4c08a3c2847f898b0486848df17add Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 18 Aug 2022 16:45:33 +0200 Subject: Updates --- .config/dunst/dunstrc | 2 +- .config/fontconfig/fonts.conf | 22 ++++++++++++++++++++++ .config/zsh/alias.zsh | 4 ++-- .local/bin/status/sb-forecast | 16 ++++++++++------ 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 .config/fontconfig/fonts.conf diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 750892b..9a2cc75 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -28,7 +28,7 @@ sort = yes idle_threshold = 0 - font = NotoSans Nerd Font 14 + font = "NotoSans Nerd Font 14" line_height = 0 markup = full diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..2b72920 --- /dev/null +++ b/.config/fontconfig/fonts.conf @@ -0,0 +1,22 @@ + + + + + serif + + NotoEmoji Nerd Font + + + + sans-serif + + NotoEmoji Nerd Font + + + + monospace + + NotoEmoji Nerd Font Mono + + + diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 8cb02e1..501e608 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -14,7 +14,7 @@ alias exa='exa --color=always --group-directories-first --icons' \ ls='exa -l' tree() { - exa -T $@ | less + exa -T $@ | $PAGER } alias \ e='editorcmd' \ @@ -175,7 +175,7 @@ alias nb='newsboat' \ highlight='highlight -Oxterm256 -t4' \ hi='highlight' hil() { - highlight -Oxterm256 -t4 "$1" | less + highlight -Oxterm256 -t4 "$1" | $PAGER } search() { make -C /usr/ports search name=$1 | grep 'Path:'; diff --git a/.local/bin/status/sb-forecast b/.local/bin/status/sb-forecast index 0f7aa52..0ac1a40 100755 --- a/.local/bin/status/sb-forecast +++ b/.local/bin/status/sb-forecast @@ -1,18 +1,22 @@ #!/bin/sh weatherreport="/tmp/weatherreport" +weatherglyph="/tmp/weatherglyph" +moonreport="/tmp/moonglyph" getweather() { - curl -sf "wttr.in/lyon" >$weatherreport || exit 1 + curl -sf "wttr.in/Lyon" >$weatherreport || exit 1 + curl -sf "wttr.in/Lyon?format=%c" >$weatherglyph || exit 1 + curl -sf "wttr.in/Lyon?format=%m" >$moonglyph || exit 1 } [ -f $weatherreport ] && [ "$(gnustat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || getweather -printf "%s" "$(sed '16q;d' "$weatherreport" | -grep -wo "[0-9]*%" | sort -rn | sed "s/^/ /g;1q" | tr -d '\n')" +printf "%s %s" \ + "$(cat $weatherglyph)" \ + "$(sed '16q;d' "$weatherreport" | grep -wo "[0-9]*%" | sort -rn | sed "s/^/ /g;1q" | tr -d '\n')" +moon=$(cat $moonreport) sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | - awk '{print " ﰕ " $1 "°C"," " $2 "°C"}' - -# weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" + awk -v moon=$moon '{print " ﰕ " $1 "°C"," " $2 "°C " moon}' -- cgit v1.2.3