aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-04-27 21:50:35 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-04-27 21:50:35 +1200
commitd8a5acfe5822f5ac7b1b3a8cbdef201fc25a9a50 (patch)
treee210dc01b5077f77a897bae101de222e68af8523
parentMerge branch 'release/v11.19.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-d8a5acfe5822f5ac7b1b3a8cbdef201fc25a9a50.tar.gz
dotfiles-d8a5acfe5822f5ac7b1b3a8cbdef201fc25a9a50.zip
Merge branch 'release/v11.20.0'v11.20.0
* release/v11.20.0: Don't let Vim change X terminal window titles Add ncmpcpp config Switch .xinitrc to .xsession Refine browser selection logic Lowercase default td(1df) directory
-rw-r--r--Makefile27
-rw-r--r--README.md4
-rw-r--r--VERSION4
-rw-r--r--X/xsession (renamed from X/xinitrc)9
-rw-r--r--X/xsession.d/background.sh (renamed from X/xinitrc.d/background.sh)0
-rw-r--r--X/xsession.d/browser.sh (renamed from X/xinitrc.d/browser.sh)12
-rw-r--r--X/xsession.d/dunst.sh (renamed from X/xinitrc.d/dunst.sh)0
-rw-r--r--X/xsession.d/redshift.sh (renamed from X/xinitrc.d/redshift.sh)0
-rw-r--r--X/xsession.d/ssh.sh (renamed from X/xinitrc.d/ssh.sh)0
-rw-r--r--X/xsession.d/sxhkd.sh (renamed from X/xinitrc.d/sxhkd.sh)0
-rw-r--r--X/xsession.d/urxvt.sh (renamed from X/xinitrc.d/urxvt.sh)0
-rw-r--r--X/xsession.d/xkb.sh (renamed from X/xinitrc.d/xkb.sh)0
-rw-r--r--bin/td.sh2
-rw-r--r--check/xinit.sh6
-rw-r--r--check/xsession.sh6
-rw-r--r--lint/xsession.sh (renamed from lint/xinit.sh)4
-rw-r--r--man/man1/xrbg.1df4
-rw-r--r--man/man7/dotfiles.7df5
-rw-r--r--ncmpcpp/config1
-rw-r--r--sh/profile.d/browser.sh4
-rw-r--r--vim/filetype.vim6
-rw-r--r--vim/vimrc6
22 files changed, 60 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index df6f04d1..8cf0e3e8 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@
install-mpv \
install-mutt \
install-mysql \
+ install-ncmpcpp \
install-newsboat \
install-perlcritic \
install-perltidy \
@@ -64,7 +65,7 @@
check-man \
check-sh \
check-urxvt \
- check-xinit \
+ check-xsession \
check-zsh \
lint \
lint-bash \
@@ -75,7 +76,7 @@
lint-sh \
lint-urxvt \
lint-vim \
- lint-xinit
+ lint-xsession
.SUFFIXES:
.SUFFIXES: .awk .bash .m4 .mi5 .pl .sed .sh
@@ -496,6 +497,10 @@ install-mutt: install-gnupg install-mail mutt/filters/markdown-to-html
cp -p -- mutt/filters/markdown-to-html \
$(HOME)/.local/libexec/mutt/filters
+install-ncmpcpp:
+ mkdir -p -- $(XDG_CONFIG_HOME)/ncmpcpp
+ cp -p -- ncmpcpp/config $(XDG_CONFIG_HOME)/ncmpcpp
+
install-newsboat: install-systemd
mkdir -p -- $(XDG_CONFIG_HOME)/newsboat $(XDG_DATA_HOME)/newsboat
cp -p -- newsboat/config $(XDG_CONFIG_HOME)/newsboat
@@ -624,15 +629,15 @@ install-wget: install-sh
mkdir -p -- $(XDG_CACHE_HOME)/wget $(XDG_CONFIG_HOME)/wget
cp -p -- wget/wgetrc $(XDG_CONFIG_HOME)/wget/wgetrc
-install-x: check-xinit
+install-x: check-xsession
mkdir -p -- \
$(XDG_CONFIG_HOME)/sxhkd \
- $(HOME)/.xinitrc.d \
+ $(HOME)/.xsession.d \
$(HOME)/.Xresources.d
cp -p -- X/redshift.conf $(XDG_CONFIG_HOME)
cp -p -- X/sxhkdrc $(XDG_CONFIG_HOME)/sxhkd
- cp -p -- X/xinitrc $(HOME)/.xinitrc
- cp -p -- X/xinitrc.d/*.sh $(HOME)/.xinitrc.d
+ cp -p -- X/xsession $(HOME)/.xsession
+ cp -p -- X/xsession.d/*.sh $(HOME)/.xsession.d
cp -p -- X/Xresources $(HOME)/.Xresources
cp -p -- X/Xresources.d/* $(HOME)/.Xresources.d
@@ -680,8 +685,8 @@ check-sh:
check-urxvt: urxvt/ext/select
sh check/urxvt.sh
-check-xinit:
- sh check/xinit.sh
+check-xsession:
+ sh check/xsession.sh
check-zsh:
sh check/zsh.sh
@@ -694,7 +699,7 @@ lint: lint-bash \
lint-sh \
lint-urxvt \
lint-vim \
- lint-xinit
+ lint-xsession
lint-bash: check-bash
sh lint/bash.sh
@@ -720,5 +725,5 @@ lint-urxvt: check-urxvt
lint-vim:
sh lint/vim.sh
-lint-xinit: check-xinit
- sh lint/xinit.sh
+lint-xsession: check-xsession
+ sh lint/xsession.sh
diff --git a/README.md b/README.md
index dc609744..8f123c04 100644
--- a/README.md
+++ b/README.md
@@ -96,6 +96,8 @@ Configuration is included for:
- [mpv](https://mpv.io/)---Media player
- [Mutt](http://www.mutt.org/)---Terminal mail user agent
- [`mysql(1)`](https://linux.die.net/man/1/mysql)---Command-line MySQL client
+- [ncmpcpp](https://rybczak.net/ncmpcpp/)---ncurses based MPD client inspired
+ by ncmpc
- [Newsboat](https://newsboat.org/)---Terminal RSS/Atom feed reader
- [`psql(1)`](https://linux.die.net/man/1/psql)---Command-line PostgreSQL
client
@@ -656,7 +658,7 @@ available to run them:
- `lint-games`
- `lint-ksh`
- `lint-sh`
- - `lint-xinit`
+ - `lint-xsession`
- Perl::Critic:
- `lint-urxvt`
- [Vint](https://github.com/Kuniwak/vint):
diff --git a/VERSION b/VERSION
index 3679fe1f..937617a4 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v11.19.0
-Thu, 21 Apr 2022 08:42:31 +0000
+tejr dotfiles v11.20.0
+Wed, 27 Apr 2022 09:50:29 +0000
diff --git a/X/xinitrc b/X/xsession
index b5041f8c..b8fdcce6 100644
--- a/X/xinitrc
+++ b/X/xsession
@@ -2,17 +2,14 @@
# shellcheck disable=SC1091
[ -e "$HOME"/.xrandrrc ] && . "$HOME"/.xrandrrc
-# Read X resources
-xrdb "$HOME"/.Xresources
-
# Faster mouse acceleration with a natural threshold
xset mouse 5/2 0
-# Load all supplementary scripts in ~/.xinitrc.d
-for sh in "$HOME"/.xinitrc.d/*.sh ; do
+# Load all supplementary scripts in ~/.xsession.d
+for sh in "$HOME"/.xsession.d/*.sh ; do
[ -e "$sh" ] && . "$sh"
done
unset -v sh
-# Start window manager
+# Start i3 window manager
exec i3
diff --git a/X/xinitrc.d/background.sh b/X/xsession.d/background.sh
index 85a40889..85a40889 100644
--- a/X/xinitrc.d/background.sh
+++ b/X/xsession.d/background.sh
diff --git a/X/xinitrc.d/browser.sh b/X/xsession.d/browser.sh
index b88724bf..024075d6 100644
--- a/X/xinitrc.d/browser.sh
+++ b/X/xsession.d/browser.sh
@@ -1,8 +1,10 @@
# Choose a GUI browser with some rough heuristics
-# If LibreWolf is available, start by assuming that
+# If LibreWolf or failing that Firefox is available, start by assuming that
if command -v librewolf >/dev/null 2>&1 ; then
BROWSER=librewolf
+elif command -v firefox >/dev/null 2>&1 ; then
+ BROWSER=firefox
fi
# Consider a switch to Dillo...
@@ -10,10 +12,10 @@ if (
# No output, please
exec >/dev/null 2>&1
# Don't switch if it's not there
- command -v dillo || exit
- # Switch if LibreWolf isn't there
- command -v librewolf || exit 0
- # Switch if procfs says we have less than 2GB of RAM
+ command -v dillo || exit 1
+ # Do switch if neither LibreWolf nor Firefox are there
+ command -v librewolf || command -v firefox || exit 0
+ # Do switch if procfs says we have less than 2GB of RAM
awk '$1=="MemTotal:"&&$2<2^20{m++}END{exit!m}' < /proc/meminfo
) ; then
BROWSER=dillo
diff --git a/X/xinitrc.d/dunst.sh b/X/xsession.d/dunst.sh
index bddaa1fe..bddaa1fe 100644
--- a/X/xinitrc.d/dunst.sh
+++ b/X/xsession.d/dunst.sh
diff --git a/X/xinitrc.d/redshift.sh b/X/xsession.d/redshift.sh
index d5d58d8a..d5d58d8a 100644
--- a/X/xinitrc.d/redshift.sh
+++ b/X/xsession.d/redshift.sh
diff --git a/X/xinitrc.d/ssh.sh b/X/xsession.d/ssh.sh
index 005743fe..005743fe 100644
--- a/X/xinitrc.d/ssh.sh
+++ b/X/xsession.d/ssh.sh
diff --git a/X/xinitrc.d/sxhkd.sh b/X/xsession.d/sxhkd.sh
index 132d8f8a..132d8f8a 100644
--- a/X/xinitrc.d/sxhkd.sh
+++ b/X/xsession.d/sxhkd.sh
diff --git a/X/xinitrc.d/urxvt.sh b/X/xsession.d/urxvt.sh
index a5eb0940..a5eb0940 100644
--- a/X/xinitrc.d/urxvt.sh
+++ b/X/xsession.d/urxvt.sh
diff --git a/X/xinitrc.d/xkb.sh b/X/xsession.d/xkb.sh
index a5142398..a5142398 100644
--- a/X/xinitrc.d/xkb.sh
+++ b/X/xsession.d/xkb.sh
diff --git a/bin/td.sh b/bin/td.sh
index a5a4ab30..6dfbebc0 100644
--- a/bin/td.sh
+++ b/bin/td.sh
@@ -1,7 +1,7 @@
# Manage to-do files with just $EDITOR and git(1)
# Specify the path and file
-dir=${TODO_DIR:-"$HOME"/Todo}
+dir=${TODO_DIR:-"$HOME"/todo}
# If the directory doesn't exist, create it
[ -d "$dir" ] || mkdir -p -- "$dir" || exit
diff --git a/check/xinit.sh b/check/xinit.sh
deleted file mode 100644
index a354422a..00000000
--- a/check/xinit.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-set \
- X/xinitrc \
- X/xinitrc.d/*.sh
-for xinit do
- sh -n -- "$xinit" || exit
-done
diff --git a/check/xsession.sh b/check/xsession.sh
new file mode 100644
index 00000000..0e8db668
--- /dev/null
+++ b/check/xsession.sh
@@ -0,0 +1,6 @@
+set \
+ X/xsession \
+ X/xsession.d/*.sh
+for xsession do
+ sh -n -- "$xsession" || exit
+done
diff --git a/lint/xinit.sh b/lint/xsession.sh
index 0fab84d2..fd60c864 100644
--- a/lint/xinit.sh
+++ b/lint/xsession.sh
@@ -1,4 +1,4 @@
set \
- X/xinitrc \
- X/xinitrc.d/*.sh
+ X/xsession \
+ X/xsession.d/*.sh
shellcheck -e SC1090 -s sh -- "$@"
diff --git a/man/man1/xrbg.1df b/man/man1/xrbg.1df
index 14bfbc7d..9c067ff9 100644
--- a/man/man1/xrbg.1df
+++ b/man/man1/xrbg.1df
@@ -11,8 +11,8 @@ XBACKGROUNDS=/path/to/images
.B xrbg
searches for images in the directory named in the XBACKGROUNDS environment
variable (defaults to ~/.xbackgrounds), chooses a random one with rndf(1df),
-and applies it with feh(1). It's designed for use in ~/.xinitrc, but it seems
-to work when called manually from within an X session too.
+and applies it with feh(1). It's designed for use in X startup files, but it
+seems to work when called manually from within an X session too.
.SH SEE ALSO
feh(1), rndf(1df)
.SH AUTHOR
diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df
index ea6d3080..0a612b2f 100644
--- a/man/man7/dotfiles.7df
+++ b/man/man7/dotfiles.7df
@@ -144,6 +144,9 @@ Mutt (http://www.mutt.org/)\[em]Terminal mail user agent
\f[C]mysql(1)\f[R] (https://linux.die.net/man/1/mysql)\[em]Command-line
MySQL client
.IP \[bu] 2
+ncmpcpp (https://rybczak.net/ncmpcpp/)\[em]ncurses based MPD client
+inspired by ncmpc
+.IP \[bu] 2
Newsboat (https://newsboat.org/)\[em]Terminal RSS/Atom feed reader
.IP \[bu] 2
\f[C]psql(1)\f[R] (https://linux.die.net/man/1/psql)\[em]Command-line
@@ -1043,7 +1046,7 @@ ShellCheck (https://www.shellcheck.net/):
.IP \[bu] 2
\f[C]lint-sh\f[R]
.IP \[bu] 2
-\f[C]lint-xinit\f[R]
+\f[C]lint-xsession\f[R]
.RE
.IP \[bu] 2
Perl::Critic:
diff --git a/ncmpcpp/config b/ncmpcpp/config
new file mode 100644
index 00000000..48f5137a
--- /dev/null
+++ b/ncmpcpp/config
@@ -0,0 +1 @@
+enable_window_title = no
diff --git a/sh/profile.d/browser.sh b/sh/profile.d/browser.sh
index 2c724505..ee94857c 100644
--- a/sh/profile.d/browser.sh
+++ b/sh/profile.d/browser.sh
@@ -1,4 +1,4 @@
-# Set command-line browser to lynx; ~/.xinitrc will change this to something
-# graphical instead
+# Set command-line browser to lynx; ~/.xsession will change this to something
+# graphical instead if invoked
BROWSER=lynx
export BROWSER
diff --git a/vim/filetype.vim b/vim/filetype.vim
index 91cc1ec5..c461e503 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -363,12 +363,16 @@ augroup filetypedetect
\,.shinit
\,.shrc
\,.xinitrc
+ \,.xsession
+ \,.xsessionrc
\,/etc/default/*
\,configure
\,profile
\,shinit
\,shrc
- \,xinitrc
+ \,/etc/X11/xinit
+ \,/etc/X11/Xreset
+ \,/etc/X11/Xsession
\ let b:is_posix = 1
\|setfiletype sh
" SQL
diff --git a/vim/vimrc b/vim/vimrc
index 9b916564..13d73764 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -811,6 +811,12 @@ set shortmess+=I
"
set splitbelow splitright
+" I don’t like the titles of my terminal windows being changed, especially
+" when changing them back doesn’t actually work. Just leave them alone, Vim,
+" even if you think you can handle it.
+"
+set notitle
+
" Vim has an internal list of terminal types that support using smoother
" terminal redrawing, and for which 'ttyfast' is normally set, described in
" `:help 'ttyfast'`. That list includes most of the terminals I use, but