aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ISSUES.md4
-rw-r--r--Makefile6
-rw-r--r--README.md2
-rw-r--r--less/lesskey16
-rw-r--r--less/profile.d/less.sh5
-rw-r--r--man/man7/dotfiles.7df4
6 files changed, 37 insertions, 0 deletions
diff --git a/ISSUES.md b/ISSUES.md
index 45813510..0a4abd4d 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -32,3 +32,7 @@ Known issues
highlighting, but not with `sh` highlighting
- The Markdown underline functions should count screen columns, not characters
or bytes
+- > $ lesskey --output less/less less/lesskey
+ > NOTE: lesskey is deprecated.
+ > It is no longer necessary to run lesskey, when using less version 582 and
+ > later.
diff --git a/Makefile b/Makefile
index 41586ce6..78846fe2 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@
install-i3 \
install-init \
install-ksh \
+ install-less \
install-login-shell \
install-mail \
install-man \
@@ -361,6 +362,7 @@ install: install-bin \
install-git \
install-gnupg \
install-init \
+ install-less \
install-login-shell \
install-man \
install-readline \
@@ -455,6 +457,10 @@ install-i3: install-x
install-init:
if test -d /run/systemd/system ; then make install-systemd ; fi
+install-less:
+ cp -p -- less/profile.d/less.sh $(HOME)/.profile.d
+ cp -p -- less/lesskey $(XDG_CONFIG_HOME)/lesskey
+
install-logrotate: install-systemd
mkdir -p -- $(XDG_CONFIG_HOME)/logrotate \
$(XDG_CONFIG_HOME)/logrotate/config.d
diff --git a/README.md b/README.md
index 4a64e792..6861776a 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,7 @@ dependencies:
- `install-ex`
- `install-git`
- `install-gnupg`
+- `install-less`
- `install-login-shell`
- `install-man`
- `install-readline`
@@ -87,6 +88,7 @@ Configuration is included for:
- [GnuPG](https://www.gnupg.org/)---GNU Privacy Guard, for private
communication and file encryption
- [i3](https://i3wm.org/)---Tiling window manager
+- [less](https://www.gnu.org/software/less/)---Terminal pager
- [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
diff --git a/less/lesskey b/less/lesskey
new file mode 100644
index 00000000..239df7b8
--- /dev/null
+++ b/less/lesskey
@@ -0,0 +1,16 @@
+#env
+
+# Search case-insensitively
+LESS += --ignore-case
+
+# Don't ring terminal bells
+LESS += --QUIET
+
+# Support mouse scrolling
+LESS += --mouse
+
+# Show ANSI colors
+LESS += --RAW-CONTROL-CHARS
+
+# Don't keep history
+LESSHISTFILE = -
diff --git a/less/profile.d/less.sh b/less/profile.d/less.sh
new file mode 100644
index 00000000..91367cc3
--- /dev/null
+++ b/less/profile.d/less.sh
@@ -0,0 +1,5 @@
+# Prompt less(1) to actually look for its config file in the paths the manual
+# says it will, as v590 on Debian v12.7 doesn't.
+#
+LESSKEYIN=${XDG_CONFIG_HOME:-$HOME/.config}/lesskey
+export LESSKEYIN
diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df
index e538bf06..2c0aa654 100644
--- a/man/man7/dotfiles.7df
+++ b/man/man7/dotfiles.7df
@@ -72,6 +72,8 @@ their dependencies:
.IP \[bu] 2
\f[V]install-gnupg\f[R]
.IP \[bu] 2
+\f[V]install-less\f[R]
+.IP \[bu] 2
\f[V]install-login-shell\f[R]
.IP \[bu] 2
\f[V]install-man\f[R]
@@ -141,6 +143,8 @@ communication and file encryption
.IP \[bu] 2
i3 (https://i3wm.org/)\[em]Tiling window manager
.IP \[bu] 2
+less (https://www.gnu.org/software/less/)\[em]Terminal pager
+.IP \[bu] 2
mpv (https://mpv.io/)\[em]Media player
.IP \[bu] 2
Mutt (http://www.mutt.org/)\[em]Terminal mail user agent