about summary refs log tree commit diff stats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/X11/xprofile2
-rw-r--r--etc/aliasrc1
-rw-r--r--etc/ksh/kshrc11
-rw-r--r--etc/mpv/mpv.conf28
-rw-r--r--etc/newsboat/config38
-rw-r--r--etc/sfeedrc13
-rw-r--r--etc/shrc6
-rw-r--r--etc/yt-dlp/config3
-rw-r--r--etc/yt-dlp/config-music3
-rw-r--r--etc/yt-dlp/config-playlist4
10 files changed, 66 insertions, 43 deletions
diff --git a/etc/X11/xprofile b/etc/X11/xprofile
index 9c9dc74..49dc6b0 100644
--- a/etc/X11/xprofile
+++ b/etc/X11/xprofile
@@ -28,5 +28,7 @@ xbanish &
 mpdas -c $HOME_ETC/mpdasrc &
 # remind user of important tasks
 XFILE="$HOME_ETC/X11/xsession" bother &
+# update rss
+sfeed_update "$HOME_ETC"/sfeedrc &
 # cleanup tabbed
 rm $HOME_CACHE/catgirl/tabbed-catgirl.xid
diff --git a/etc/aliasrc b/etc/aliasrc
index 43eb733..7db59df 100644
--- a/etc/aliasrc
+++ b/etc/aliasrc
@@ -4,6 +4,7 @@ alias \
 	ls='ls -Fh'\
 	ll='ls -Fhl'\
 	la='ls -Fha'\
+	lr='lr -G'\
 	lynx='lynx -cookies- -vikeys'\
 	df='df -h'\
 	du='du -h'\
diff --git a/etc/ksh/kshrc b/etc/ksh/kshrc
index 28b3c0c..3ab924b 100644
--- a/etc/ksh/kshrc
+++ b/etc/ksh/kshrc
@@ -22,9 +22,9 @@ export PF_INFO="ascii title os host shell editor wm pkgs palette"
 # fix manpath so local man pages work
 # crude *bsd detection
 if [[ -d /usr/X11R6 ]]; then
-export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:$HOME_DATA/man"
+export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:$HOME_DATA/man:$HOME_EXT_DATA/man"
 else
-export MANPATH="/usr/share/man:/usr/local/share/man:$HOME_DATA/man"
+export MANPATH="/usr/share/man:/usr/local/share/man:$HOME_DATA/man:$HOME_EXT_DATA/man"
 fi
 set -o vi
 
@@ -34,3 +34,10 @@ set -o vi
 [[ -f "$HOME_ETC/aliasrc" ]] && . "$HOME_ETC/aliasrc"
 [[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh"
 [[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh"
+
+call_it_a_day() {
+	date +%s > /tmp/start-update.time
+	doas sh -c 'pkg_add -Iu; pkg_delete -Ia'
+	echo "update took $(($(date +%s)-$(< /tmp/start-update.time))) seconds" > $HOME_LOG/call-it-a-day.log
+	doas poweroff
+}
diff --git a/etc/mpv/mpv.conf b/etc/mpv/mpv.conf
new file mode 100644
index 0000000..b21d06a
--- /dev/null
+++ b/etc/mpv/mpv.conf
@@ -0,0 +1,28 @@
+# Configuration file settings and the command line options use the same
+# underlying mechanisms. Most options can be put into the configuration file
+# by dropping the preceding '--'. See the man page for a complete list of
+# options.
+#
+# Profiles should be placed at the bottom of the configuration file to ensure
+# that settings wanted as defaults are not restricted to specific profiles.
+
+# use sndio
+ao=sndio
+
+# gpu-accel
+vo=gpu
+
+# Default audio volume is 100. Lower it to 75.
+volume=75
+
+# prefer english audio tracks
+alang=en,eng
+
+# Display English subtitles if available.
+slang=en,eng
+
+# Use Cozette for subtitle fonts.
+sub-font='Hermit'
+
+screenshot-directory=~/share/xdg/pic/
+screenshot-template=mpv-%f-%P
diff --git a/etc/newsboat/config b/etc/newsboat/config
deleted file mode 100644
index a6b49a9..0000000
--- a/etc/newsboat/config
+++ /dev/null
@@ -1,38 +0,0 @@
-#show-read-feeds no
-auto-reload yes
-
-external-url-viewer "flc"
-
-bind-key j down
-bind-key k up
-bind-key j next articlelist
-bind-key k prev articlelist
-bind-key J next-feed articlelist
-bind-key K prev-feed articlelist
-bind-key G end
-bind-key g home
-bind-key d pagedown
-bind-key u pageup
-bind-key l open
-bind-key h quit
-bind-key a toggle-article-read
-bind-key n next-unread
-bind-key N prev-unread
-bind-key D pb-download
-bind-key U show-urls
-bind-key x pb-delete
-bind-key ^t next-unread
-
-color listnormal cyan default
-color listfocus black yellow standout bold
-color listnormal_unread blue default
-color listfocus_unread yellow default bold
-color info red black bold
-color article cyan default
-
-browser lh
-macro , open-in-browser
-macro t set browser "yt-dlp --add-metadata -i"; open-in-browser ; set browser lh
-macro a set browser "yt-dlp --add-metadata -i --config-location ~/etc/yt-dlp/config-music"; open-in-browser ; set browser lh
-macro v set browser "mpv"; open-in-browser ; set browser lh
-macro w set browser "lynx -cookies- -vikeys"; open-in-browser ; set browser lh
diff --git a/etc/sfeedrc b/etc/sfeedrc
new file mode 100644
index 0000000..2c5686d
--- /dev/null
+++ b/etc/sfeedrc
@@ -0,0 +1,13 @@
+# some feeds don't like hidden user agent
+fetch() {
+	# fail on redirects, timeout is 15 seconds.
+	curl -L --max-redirs 0 -f -s -m 15 \
+		"$2" 2>/dev/null
+}
+
+sfeedpath="$HOME_DATA/sfeed/feeds"
+
+# list of feeds to fetch:
+feeds() {
+	# feed <name> <feedurl> [basesiteurl] [encoding]
+}
diff --git a/etc/shrc b/etc/shrc
index 9da8cef..ccd0ae2 100644
--- a/etc/shrc
+++ b/etc/shrc
@@ -27,9 +27,13 @@ export COMM="comm-sel"
 export READER="zathura"
 export MAILER="neomutt"
 export MUSIC="ncmpcpp"
-export RSS="newsboat"
+export RSS="sfeed_curses"
 export SCR="maim"
 export LOCK="xlock"
+#sfeed
+export SFEED_PLUMBER='lh'
+export SFEED_YANKER="xclip -sel c -r"
+export SFEED_URL_FILE="$HOME_DATA/sfeed/read"
 #less args
 export LESS='-iFMRX~ -x2'
 #locale info
diff --git a/etc/yt-dlp/config b/etc/yt-dlp/config
index 23171b9..60a5c77 100644
--- a/etc/yt-dlp/config
+++ b/etc/yt-dlp/config
@@ -1,6 +1,5 @@
---prefer-free-formats
 # always use aria2
---external-downloader aria2c
+--downloader aria2c
 # format
 --format bestvideo+bestaudio/best
 # format definition
diff --git a/etc/yt-dlp/config-music b/etc/yt-dlp/config-music
index b8109f8..a4be168 100644
--- a/etc/yt-dlp/config-music
+++ b/etc/yt-dlp/config-music
@@ -2,6 +2,9 @@
 --prefer-free-formats
 # only download audio stream
 --format bestaudio
+# fix dumb track names
+--restrict-filenames
 # dl to ~mus
 --paths ~/share/xdg/mus
+# coherent output format
 --output %(uploader_id,uploader,album_artist)s/%(release_year,release_date>%Y,upload_date>%Y|)s-%(album|singles)s/%(track_number,playlist_index|)02d%(track_number,playlist_index&-|)s%(track,title|title)s.%(ext)s
diff --git a/etc/yt-dlp/config-playlist b/etc/yt-dlp/config-playlist
new file mode 100644
index 0000000..528f5a3
--- /dev/null
+++ b/etc/yt-dlp/config-playlist
@@ -0,0 +1,4 @@
+# fix dumb track names
+--restrict-filenames
+# coherent output format
+--output %(uploader)s/%(playlist_title)s/%(playlist_index)02d-s%(track,title|title)s.%(ext)s