aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--VERSION4
-rw-r--r--bin/xgo.sh13
-rw-r--r--bin/xsnap.sh2
-rw-r--r--man/man1/xsnap.1df4
-rw-r--r--mpv/mpv.conf22
-rw-r--r--sxhkd/sxhkdrc3
-rw-r--r--vim/autoload/html/spelllang.vim10
8 files changed, 54 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 3ebee365..efd76d52 100644
--- a/Makefile
+++ b/Makefile
@@ -43,9 +43,10 @@
install-rbenv \
install-readline \
install-redshift \
+ install-scrot \
install-sh \
- install-sxhkd \
install-subversion \
+ install-sxhkd \
install-systemd \
install-terminfo \
install-thunar \
@@ -491,7 +492,9 @@ install-man:
cp -p -- man/man7/dotfiles.7df $(XDG_DATA_HOME)/man/man7
install-mpv:
- mkdir -p -- $(XDG_CONFIG_HOME)/mpv
+ mkdir -p -- \
+ $(XDG_CONFIG_HOME)/mpv \
+ $(XDG_DATA_HOME)/mpv/screenshots
cp -p -- mpv/* $(XDG_CONFIG_HOME)/mpv
install-mutt: install-gnupg install-mail mutt/filters/markdown-to-html
@@ -566,10 +569,8 @@ install-redshift: install-x
cp -p -- redshift/redshift.conf $(XDG_CONFIG_HOME)
cp -p -- redshift/xsession.d/* $(HOME)/.xsession.d
-install-sxhkd: install-x install-urxvt
- mkdir -p -- $(XDG_CONFIG_HOME)/sxhkd
- cp -p -- sxhkd/sxhkdrc $(XDG_CONFIG_HOME)/sxhkd
- cp -p -- sxhkd/xsession.d/* $(HOME)/.xsession.d
+install-scrot:
+ mkdir -p -- $(XDG_DATA_HOME)/scrot/screenshots
install-sh: check-sh
mkdir -p -- $(HOME)/.profile.d $(HOME)/.shrc.d
@@ -583,6 +584,11 @@ install-subversion:
mkdir -p -- $(HOME)/.subversion
cp -p -- subversion/config $(HOME)/.subversion
+install-sxhkd: install-scrot install-x
+ mkdir -p -- $(XDG_CONFIG_HOME)/sxhkd
+ cp -p -- sxhkd/sxhkdrc $(XDG_CONFIG_HOME)/sxhkd
+ cp -p -- sxhkd/xsession.d/* $(HOME)/.xsession.d
+
install-systemd:
mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user
cp -p -- systemd/user/* $(XDG_CONFIG_HOME)/systemd/user
diff --git a/VERSION b/VERSION
index d169970c..e0e0fe1e 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v12.0.0
-Fri, 06 May 2022 16:05:54 +0000
+tejr dotfiles v12.1.0
+Mon, 09 May 2022 04:24:48 +0000
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 35c2485f..c59409a5 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -39,7 +39,7 @@ for url do (
# mpv(1)
(*[/.]youtube.com/watch*[?\&]t=) ;;
(*[/.]youtube.com/watch*)
- exec mpv -- "$url"
+ exec mpv --force-window --no-terminal -- "$url"
;;
esac
@@ -59,14 +59,15 @@ for url do (
)
;;
- # Open audio and video in mpv(1); force a window even for audio so I
- # can control it
+ # Open audio and video in mpv(1)
(audio/*|video/*)
- exec mpv --force-window -- "$url"
+ exec mpv --force-window --no-terminal -- "$url"
;;
- # If the MIME type is an image that is not a GIF, load it in feh(1)
- (image/gif) ;;
+ # Open GIFs with a looping mpv(1), and all other images with feh(1)
+ (image/gif)
+ exec mpv --force-window --loop=inf --no-terminal -- "$url"
+ ;;
(image/*)
exec curl -- "$url" | feh -
;;
diff --git a/bin/xsnap.sh b/bin/xsnap.sh
index c4b2a9ea..7a9d0c38 100644
--- a/bin/xsnap.sh
+++ b/bin/xsnap.sh
@@ -1,6 +1,6 @@
# Wrapper for scrot(1) for use in recording screenshots
date=$(date +%Y/%m/%d) || exit
-dir=$HOME/screenshots/scrot/$date
+dir=${XDG_DATA_HOME:-"$HOME"/.local/share}/scrot/screenshots/$date
mkdir -p -- "$dir" || exit
cd -- "$dir" || exit
for ent in * ; do
diff --git a/man/man1/xsnap.1df b/man/man1/xsnap.1df
index ff177754..276e27b3 100644
--- a/man/man1/xsnap.1df
+++ b/man/man1/xsnap.1df
@@ -10,7 +10,7 @@
.SH DESCRIPTION
.B xsnap
takes a PNG screenshot with scrot(1), passing any options thereto, saving the
-image into a date-stamped path ~/screenshots/scrot/YYYY-MM-DD, with increasing
-integer filenames for that day.
+image into a date-stamped path ~/.local/share/scrot/screenshots/YYYY-MM-DD,
+with increasing integer filenames for that day.
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>
diff --git a/mpv/mpv.conf b/mpv/mpv.conf
index 5a2a05c4..d1624a79 100644
--- a/mpv/mpv.conf
+++ b/mpv/mpv.conf
@@ -1,2 +1,24 @@
# Don't try to show me album covers when I play FLAC
no-audio-display
+
+# Use yt-dlp instead of youtube-dl, as the latter project appears to have been
+# abandonded for some time as at 2022-05-08.
+#
+# * <https://github.com/ytdl-org/youtube-dl/issues/29965>
+# * <https://web.archive.org/web/20220212025407/https://github.com/ytdl-org/youtube-dl/issues/29965>
+#
+script-opts-append="ytdl_hook-ytdl_path=yt-dlp"
+
+# Save screenshot images into XDG-respecting location
+screenshot-directory="~/.local/share/mpv/screenshots"
+
+# Use PNG (lossless) for screenshots rather than the default JPEG
+screenshot-format="png"
+
+# Keep the screenshots in directories named after the media file, with the
+# screenshot filename including the media filename, the timestamp within it,
+# and a numeric suffix to guarantee uniqueness. Full paths look like this:
+#
+# ~/.local/share/mpv/screenshots/Red Dwarf S01E01.mkv/mpv_Red Dwarf S01E01.mkv_00:08:20.461_0001.png
+#
+screenshot-template="%f/mpv_%f_%P_%04n"
diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc
index 942381ab..94726e2c 100644
--- a/sxhkd/sxhkdrc
+++ b/sxhkd/sxhkdrc
@@ -28,6 +28,9 @@ super + m
super + p
dmp
+super + t
+ thunar
+
super + v
x-terminal-emulator -e "$VISUAL"
diff --git a/vim/autoload/html/spelllang.vim b/vim/autoload/html/spelllang.vim
index c01a57b2..e451f8a1 100644
--- a/vim/autoload/html/spelllang.vim
+++ b/vim/autoload/html/spelllang.vim
@@ -1,13 +1,13 @@
-" Crude regular expression to match an <html> or <body> tag on one line with
-" a lang= attribute set. This isn't exact, by any means, but I don't want to
-" write an actual HTML parser for a mere 'spelllang' hook nicety that fails
-" silently anyway.
+" Crude regular expression to match an <html>, <body>, or <main> tag on one
+" line with a lang= attribute set. This isn't exact, by any means, but
+" I don't want to write an actual HTML parser for a mere 'spelllang' hook
+" nicety that fails silently anyway.
"
" The first submatch is the language code, e.g. "en", "es". The second
" submatch is optional and follows a hyphen and is for the regional code,
" e.g. "US", "GB", "AR".
"
-let s:pattern = '\m\c<\%(html\|body\)\>[^>]*\<lang=["'']\='
+let s:pattern = '\m\c<\%(html\|body\|main\)\>[^>]*\<lang=["'']\='
\ . '\([a-z-]\{2,}\)\%(-\([a-z]\{2,}\)\)'
" The line count limit for looking for the pattern; no sense churning through