Git Repos / dotfiles / commit 6062e59
Commit: 6062e595fefef3d6daf3ac6f7331601457a4e1a3
Parent: ee38ee04a281baa6c2dbfaecafbc9d570fd582f4
Author: Cameron Vanderzanden, 2022-02-15 01:24
Committer: Cameron Vanderzanden, 2022-02-15 01:24
Commit Message
get_rss (an rss fetching program), various tweaks I wasn't happy with the freed refreshing schemes in any of the available RSS readers, so I wrote a shellscript frontend to fetch(1) that I can call from cron to fetch (and locally cache) RSS feeds. Now I check my feeds from cron, and point my RSS reader at files stored in my local cache. Past that there's minor tweaks to a bunch of configs. Alacritty's config updated to track changes in the program, dunst config changed to actually be useful (I hope), turned on softvol in cmus, swapped newsboat's URL handler back to xdg-open.
Change List
? | File | Add | Del |
---|---|---|---|
A | bin/get_rss.sh | +64 | |
M | bin/run_tv.sh | +2 | -2 |
M | config/alacritty/alacritty.yml.fix | +1 | -2 |
M | config/cmus/rc | +2 | |
M | config/dunst/dunstrc.fix | +1 | -1 |
M | config/newsboat/config | +15 | -2 |
Diff bin/get_rss.sh
diff --git a/bin/get_rss.sh b/bin/get_rss.sh
new file mode 100755
index 0000000..795bdfe
--- /dev/null
+++ b/bin/get_rss.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Copyright (c) 2022, Cameron Vanderzanden. Available under the
+# terms of the 2-clause BSD license. Please see the file "LICENSE" in
+# the root dir of this repository for more information.
+#
+#- get_rss.sh 2022/02/05 cev.
+## Usage: get_rss.sh [-hxV] [-d directory] [-n name] <URL...>
+##
+## Retrieve a remote RSS feed using fetch(1)'s if-modified mode,
+## store the result in a cache directory (default ~/.cache/rss).
+##
+## -d Output directory; write to the specified directory.
+## -h Show help.
+## -n Feed name; don't include any extensions (.xml, for instance).
+## -x Don't refresh feed if screensaver is running.
+## -V Print version info.
+##
+#
+
+[ -x $HOME/bin/cev_print.sh ] && . $HOME/bin/cev_print.sh
+
+self="${0##*'/'}"
+
+RSSCACHEDIR="$HOME/.cache/rss"
+screensaver=""
+
+while getopts "d:hn:xV?" option; do
+ case $option in
+ d) RSSCACHEDIR="$OPTARG" ;;
+ h) print_help && exit ;;
+ n) name="$OPTARG" ;;
+ x) screensaver="YES" ;;
+ V) print_version && exit ;;
+ "?") print_help && exit ;;
+ esac
+ shift $((OPTIND - 1))
+done
+
+if [ -z "$name" ]; then
+ printf "TODO"
+ exit 1
+fi
+
+# check if xscreensaver has blanked or locked the screen.
+if [ ! -z "$screensaver" ]; then
+ # this is run from cron; set DISPLAY so xscreensaver-command will be quiet
+ # TODO should do this differently.
+ DISPLAY=":0.0"
+ export DISPLAY
+ xs="$(xscreensaver-command -time | grep -E ' blanked| locked')"
+ [ ! -z "$xs" ] && exit 0
+fi
+
+url="$@"
+file="${RSSCACHEDIR}/${name}.xml"
+
+# TODO: add error checking, error messages, proper exit status
+if [ ! -f "$file" ]; then
+ fetch -o "$file" "$url" 1>/dev/null 2>&1
+else
+ fetch -i "$file" -o "$file" "$url" 1>/dev/null 2>&1
+fi
+
Return to the top of this page or return to the overview of this repo.
Diff bin/run_tv.sh
diff --git a/bin/run_tv.sh b/bin/run_tv.sh
index 6201655..0e7ace4 100755
--- a/bin/run_tv.sh
+++ b/bin/run_tv.sh
@@ -4,8 +4,8 @@
# Run fxtv with a stack of options needed for FreeBSD bktr(4) and
# my old Hauppage.
-# use a customized version of ffmpeg located in ~/opt5
-BKTR_DEV=2 $HOME/opt5/bin/ffplay \
+# use a customized version of ffmpeg located in ~/.local
+BKTR_DEV=2 $HOME/.local/bin/ffplay \
-f bktr -i /dev/bktr0 \
-vf idet,yadif=deint=1,crop=576:432:32:24 \
-loglevel quiet 1>/dev/null 2>&1
Return to the top of this page or return to the overview of this repo.
Diff config/alacritty/alacritty.yml.fix
diff --git a/config/alacritty/alacritty.yml.fix b/config/alacritty/alacritty.yml.fix
index ac7d680..8a52e2a 100644
--- a/config/alacritty/alacritty.yml.fix
+++ b/config/alacritty/alacritty.yml.fix
@@ -1,4 +1,5 @@
window:
+ opacity: 0.8
padding:
x: 0
y: 0
@@ -21,8 +22,6 @@ font:
draw_bold_text_with_bright_colors: true
-background_opacity: 0.8
-
schemes:
cev: &cev
primary:
Return to the top of this page or return to the overview of this repo.
Diff config/cmus/rc
diff --git a/config/cmus/rc b/config/cmus/rc
index ef29b76..bf34438 100644
--- a/config/cmus/rc
+++ b/config/cmus/rc
@@ -121,6 +121,8 @@ set lib_add_filter=!filename="*.zip"&!filename="*.xm"&!filename="*.umx"&!filenam
set lib_sort=albumartist date album discnumber tracknumber
set mouse=true
set replaygain=album-preferred
+set softvol=true
+set softvol_state=77 77
# filter presets
fset BPM-000=bpm=0
fset BPM-050=bpm>0&bpm<60
Return to the top of this page or return to the overview of this repo.
Diff config/dunst/dunstrc.fix
diff --git a/config/dunst/dunstrc.fix b/config/dunst/dunstrc.fix
index 1cc8336..cb419f8 100644
--- a/config/dunst/dunstrc.fix
+++ b/config/dunst/dunstrc.fix
@@ -4,7 +4,7 @@
monitor = 0
### Geometry ###
width = (0, 1024)
- height = 52
+ height = 140
origin = top-right
offset = 28x121
scale = 0
Return to the top of this page or return to the overview of this repo.
Diff config/newsboat/config
diff --git a/config/newsboat/config b/config/newsboat/config
index c21edeb..31ea343 100644
--- a/config/newsboat/config
+++ b/config/newsboat/config
@@ -1,10 +1,23 @@
+# config & keys
+auto-reload yes
bind-key j down
bind-key k up
-browser "/usr/local/bin/falkon %u"
+browser "/usr/local/bin/xdg-open %u"
+max-items 1000
+notify-beep no
+reload-time 15
+show-keymap-hint no
+# colors & formatting
+articlelist-format "%t"
+articlelist-title-format "%T: %u / %t"
+datetime-format %m/%d
+feedlist-format "%t"
+feedlist-title-format "%N: %u / %t"
color article white default
color background white default
-color info black black bold
+color info black default bold
color listnormal black default bold
color listnormal_unread white default
color listfocus white default bold
color listfocus_unread blue default bold
+color title black default bold
Return to the top of this page or return to the overview of this repo.