| various updates and tweaks. - dotfiles - These are my dotfiles. There are many … | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 0c260d415b12fec6409d9b556fe29e180143080d | |
| parent b4a0655231def481288293c626dd93e6cfcd8983 | |
| Author: Jay Scott <[email protected]> | |
| Date: Sat, 1 Oct 2022 20:24:32 +0100 | |
| various updates and tweaks. | |
| Diffstat: | |
| M bin/dmenu_rss.sh | 48 ++++++++++++++++-------------… | |
| R bin/fdm_parse_feeds -> bin/fdm_par… | 0 | |
| M bin/mbsync_notify.sh | 6 +++--- | |
| M castgetrc | 4 ++++ | |
| M fdm/config | 2 +- | |
| M mutt/muttrc | 58 +++++++++++++++--------------… | |
| M sfeed/sfeedrc | 2 ++ | |
| 7 files changed, 62 insertions(+), 58 deletions(-) | |
| --- | |
| diff --git a/bin/dmenu_rss.sh b/bin/dmenu_rss.sh | |
| @@ -29,8 +29,7 @@ tmpfile=/tmp/sfeedtmp.$$ | |
| contains() { | |
| string="$1" | |
| substring="$2" | |
| - if test "${string#*$substring}" != "$string" | |
| - then | |
| + if test "${string#*"$substring"}" != "$string"; then | |
| return 0 | |
| else | |
| return 1 | |
| @@ -39,29 +38,29 @@ contains() { | |
| mark_read() { | |
| - sfeed_plain "$feeds/"* | grep '^N' | sort -r >> "$cache_unread" | |
| - awk '!seen[$0]++' "$cache_unread" > "$tmpfile" | |
| - cat "$tmpfile" > "$cache_read" | |
| + sfeed_plain "$feeds/"* | grep '^N' | sort -r >>"$cache_unread" | |
| + awk '!seen[$0]++' "$cache_unread" >"$tmpfile" | |
| + cat "$tmpfile" >"$cache_read" | |
| } | |
| show_new() { | |
| - true > "$cache_unread" | |
| - sfeed_plain "$feeds/"* | grep '^N' | sort -r >> "$cache_unread" | |
| - awk '!seen[$0]++' "$cache_unread" > "$tmpfile" | |
| + true >"$cache_unread" | |
| + sfeed_plain "$feeds/"* | grep '^N' | sort -r >>"$cache_unread" | |
| + awk '!seen[$0]++' "$cache_unread" >"$tmpfile" | |
| - data=$(grep -vxFf "$cache_read" "$tmpfile" | \ | |
| - grep -iv "$ignore" | dmenu -l 20 -i) | |
| + data=$(grep -vxFf "$cache_read" "$tmpfile" | | |
| + grep -iv "$ignore" | dmenu -l 20 -i) | |
| rm "$tmpfile" | |
| url=$(echo "$data" | sed -n 's@^.* \([a-zA-Z]*://\)\(.*\)$@\1\2@p') | |
| - test -n "$data" && echo "$data" >> "$cache_read" | |
| + test -n "$data" && echo "$data" >>"$cache_read" | |
| show_content "$url" | |
| } | |
| show_all() { | |
| - url=$(sfeed_plain "$feeds"/* | sort -r | dmenu -l 20 -i | \ | |
| - sed -n 's@^.* \([a-zA-Z]*://\)\(.*\)$@\1\2@p') | |
| + url=$(sfeed_plain "$feeds"/* | sort -r | dmenu -l 20 -i | | |
| + sed -n 's@^.* \([a-zA-Z]*://\)\(.*\)$@\1\2@p') | |
| show_content "$url" | |
| } | |
| @@ -75,15 +74,16 @@ show_content() { | |
| } | |
| case $1 in | |
| - -a) | |
| - show_all | |
| - exit | |
| - ;; | |
| - -r) | |
| - mark_read | |
| - exit | |
| - ;; | |
| - *) | |
| - show_new | |
| - exit | |
| +-a) | |
| + show_all | |
| + exit | |
| + ;; | |
| +-r) | |
| + mark_read | |
| + exit | |
| + ;; | |
| +*) | |
| + show_new | |
| + exit | |
| + ;; | |
| esac | |
| diff --git a/bin/fdm_parse_feeds b/bin/fdm_parse_feeds.sh | |
| diff --git a/bin/mbsync_notify.sh b/bin/mbsync_notify.sh | |
| @@ -1,12 +1,12 @@ | |
| #!/usr/bin/bash | |
| maildirnew="$HOME/mail/jay/Inbox/new/" | |
| -new="$(find $maildirnew -type f | wc -l)" | |
| +new="$(find \""$maildirnew"\" -type f | wc -l)" | |
| export DISPLAY=:0 | |
| export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority | |
| -if [ $new -gt 0 ] | |
| +if [ "$new" -gt 0 ] | |
| then | |
| - notify-send "New mail: $new" | |
| + notify-send "New mail: \"$new\"" | |
| fi | |
| diff --git a/castgetrc b/castgetrc | |
| @@ -7,6 +7,10 @@ filename=%(date)-%(title).mp3 | |
| url=https://www.2600.com/oth-broadband.xml | |
| spool=/data/media/podcasts/offthehook | |
| +[cory-doctorows] | |
| +url=http://feeds.feedburner.com/doctorow_podcast | |
| +spool=/data/media/podcasts/cory-doctorows | |
| + | |
| [corecursive] | |
| url=https://link.chtbl.com/corecursive?id=corecursive&platform=rss | |
| spool=/data/media/podcasts/corecursive | |
| diff --git a/fdm/config b/fdm/config | |
| @@ -38,7 +38,7 @@ action "alpine-devel" maildir "${listdir}/alpine.devel" | |
| # feeds | |
| action "feedtag" tag "msgid" value "%1" | |
| -action "feedget" rewrite "%h/bin/fdm_parse_feeds" | |
| +action "feedget" rewrite "%h/bin/fdm_parse_feeds.sh" | |
| action "feedsave" { | |
| maildir "${feeddir}%1" | |
| add-to-cache "${feedcache}" key "%[msgid]" | |
| diff --git a/mutt/muttrc b/mutt/muttrc | |
| @@ -53,37 +53,15 @@ set record = "+jay/Sent" | |
| # inbox | |
| mailboxes +jay | |
| -mailboxes -label "inbox" +jay/Inbox | |
| - | |
| -# feeds | |
| -mailboxes +feeds | |
| -mailboxes +feeds/antenna | |
| -mailboxes +feeds/archlinux | |
| -mailboxes +feeds/codemadness | |
| -mailboxes +feeds/drewdevault | |
| -mailboxes +feeds/gamingonlinux | |
| -mailboxes +feeds/linuxtorrents | |
| -mailboxes +feeds/midnightpub | |
| -mailboxes +feeds/newsboat | |
| -mailboxes +feeds/qutebrowser | |
| -mailboxes +feeds/rdrview | |
| -mailboxes +feeds/seeshyjo | |
| -mailboxes +feeds/tildenews | |
| -mailboxes +feeds/tomasino | |
| -mailboxes +feeds/tvtorrents | |
| -mailboxes +feeds/unixsheikh | |
| -mailboxes +feeds/uninformativ | |
| +mailboxes ! `echo ~/.mail/jay/*` | |
| # mailing lists | |
| mailboxes +mailinglists | |
| -mailboxes -label "alpine.users" +ml/alpine.users | |
| -mailboxes -label "alpine.devel" +ml/alpine.devel | |
| -mailboxes -label "alpine.announce" +ml/alpine.announce | |
| -mailboxes -label "alpine.aports" +ml/alpine.aports | |
| -mailboxes -label "srht.discuss" +ml/srht.discuss | |
| -mailboxes -label "srht.dev" +ml/srht.dev | |
| -mailboxes -label "freebsd.questions" +ml/freebsd.questions | |
| -mailboxes -label "freebsd.announce" +ml/freebsd.announce | |
| +mailboxes ! `echo ~/.mail/ml/*` | |
| + | |
| +# feeds | |
| +mailboxes +feeds | |
| +mailboxes ! `echo ~/.mail/feeds/*` | |
| set sort_alias = alias | |
| set reverse_alias = yes | |
| @@ -94,14 +72,15 @@ bind index gg first-entry | |
| bind index G last-entry | |
| bind index <space> collapse-thread | |
| macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "… | |
| -macro index o "<shell-escape>fdm -f ~/.config/fdm/config fetch<enter>" "run is… | |
| +macro index o "<shell-escape>fdm -f ~/.config/fdm/config fetch<enter>" "run fd… | |
| macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" | |
| +macro index A "<save-message>=jay/archive<enter><enter><sync-mailbox><enter>" … | |
| macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" | |
| # sorting | |
| set sort = threads | |
| set sort_aux = reverse-date | |
| -set pager_index_lines = 10 | |
| +set pager_index_lines = 15 | |
| set pager_context = 1 | |
| set index_format = '%Z | %{%b %d %Y} | %-15.15F | %s' | |
| @@ -112,6 +91,7 @@ set sidebar_width = 25 | |
| set sidebar_short_path = yes | |
| set sidebar_folder_indent = yes | |
| set sidebar_format = "%B%* %?N?%N?" | |
| +set sidebar_divider_char = │ | |
| bind index,pager \Ck sidebar-prev | |
| bind index,pager <tab> sidebar-next | |
| bind index,pager <backtab> sidebar-prev | |
| @@ -121,9 +101,11 @@ bind index,pager \Cl sidebar-open | |
| set help = no | |
| # status bar | |
| +set sidebar_delim_chars = "/" | |
| set status_chars = " *%A" | |
| set status_format = "───[ Folder: %f ]───[%r%m messages%?n… | |
| +# default | |
| color normal color223 color0 | |
| # status bar | |
| @@ -148,3 +130,19 @@ color body color2 color0 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" | |
| # image links | |
| color body color2 color0 "\\[image\\ [0-9]+\\]" | |
| + | |
| +# sidebar | |
| +color sidebar_new bold color11 color0 | |
| +color sidebar_divider bold color2 color0 | |
| + | |
| +# patch syntax | |
| +color body brightwhite default ^[[:space:]].* | |
| +color body brightwhite default ^(diff).* | |
| +color body white default ^[\-\-\-].* | |
| +color body white default ^[\+\+\+].* | |
| +color body green default ^[\+].* | |
| +color body red default ^[\-].* | |
| +color body brightblue default [@@].* | |
| +color body brightwhite default ^(\s).* | |
| +color body brightwhite default ^(Signed-off-by).* | |
| +color body brightwhite default ^(Cc) | |
| diff --git a/sfeed/sfeedrc b/sfeed/sfeedrc | |
| @@ -37,4 +37,6 @@ feeds() { | |
| feed 'unixsheikh' 'https://unixsheikh.com/feed.rss' | |
| feed 'uninformativ' 'https://www.uninformativ.de/blog/feeds/en.atom' | |
| feed 'fabiensanglard' 'https://fabiensanglard.net/rss.xml' | |
| + feed 'pluralistic' 'https://pluralistic.net/feed/' | |
| + feed 'craphound' 'https://craphound.com/feed' | |
| } |