aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-07-29 08:46:43 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-07-29 08:46:43 +1200
commit973377bf0780af7754d830946c64b48b7dff636a (patch)
tree430fb9bf2faa567452857a02e617623c822c36e4
parentMerge branch 'release/v12.12.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-973377bf0780af7754d830946c64b48b7dff636a.tar.gz
dotfiles-973377bf0780af7754d830946c64b48b7dff636a.zip
Merge branch 'release/v12.13.0'v12.13.0
* release/v12.13.0: Add language and locale settings to profile Add tmux server systemd server method
-rw-r--r--.gitignore1
-rw-r--r--Makefile10
-rw-r--r--VERSION4
-rw-r--r--sh/profile4
-rw-r--r--tmux/bin/tmux.sh11
-rw-r--r--tmux/profile.d/tmux.sh3
-rw-r--r--tmux/systemd/user/tmux.service11
7 files changed, 40 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index d5431855..107c89da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -186,5 +186,6 @@
/include/mktd.m4
/less/less
/mutt/filters/markdown-to-html
+/tmux/bin/tmux
/urxvt/ext/select
/x/xsession
diff --git a/Makefile b/Makefile
index 1f6ccd12..f5f24446 100644
--- a/Makefile
+++ b/Makefile
@@ -280,6 +280,7 @@ all: $(BINS) \
git/config \
gnupg/profile.d/gnupg.sh \
less/less \
+ tmux/bin/tmux \
x/xsession
clean distclean:
@@ -298,6 +299,7 @@ clean distclean:
include/mktd.m4 \
less/less \
mutt/filters/markdown-to-html \
+ tmux/bin/tmux \
urxvt/ext/select \
x/xsession
@@ -624,8 +626,14 @@ install-tidy: install-sh
mkdir -p -- $(XDG_CONFIG_HOME)/tidy
cp -p -- tidy/tidyrc $(XDG_CONFIG_HOME)/tidy/tidyrc
-install-tmux: tmux/tmux.conf install-terminfo
+install-tmux: tmux/bin/tmux tmux/tmux.conf install-systemd install-terminfo
+ cp -p -- tmux/bin/tmux $(HOME)/.local/bin
+ cp -p -- tmux/profile.d/tmux.sh $(HOME)/.profile.d
cp -p -- tmux/tmux.conf $(HOME)/.tmux.conf
+ cp -p -- tmux/systemd/user/tmux.service \
+ $(XDG_DATA_HOME)/systemd/user
+ -systemctl --user enable tmux.service
+ -systemctl --user start tmux.service
install-urxvt: urxvt/ext/select install-x
mkdir -p -- $(HOME)/.urxvt/ext
diff --git a/VERSION b/VERSION
index 8b980950..28561606 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v12.12.0
-Thu, 28 Jul 2022 13:33:57 +0000
+tejr dotfiles v12.13.0
+Thu, 28 Jul 2022 20:46:38 +0000
diff --git a/sh/profile b/sh/profile
index 0926a250..61122076 100644
--- a/sh/profile
+++ b/sh/profile
@@ -8,7 +8,9 @@ export VISUAL=vi
# Set the POSIX interactive startup file to ~/.shinit
export ENV=$HOME/.shinit
-# Always use bytewise sorting
+# Use NZ English, but bytewise sorting
+export LANG=en_NZ.UTF-8
+export LANGUAGE=en_NZ:en
export LC_COLLATE=C
# Use less as my pager
diff --git a/tmux/bin/tmux.sh b/tmux/bin/tmux.sh
new file mode 100644
index 00000000..bbe11636
--- /dev/null
+++ b/tmux/bin/tmux.sh
@@ -0,0 +1,11 @@
+#
+# Simple wrapper to force acting only as client; can't do anything if the
+# server isn't actually running. The correct way to do this is of course
+# socket activation, but Debian's version doesn't have --enable-systemd yet.
+# This will do fine in the meantime.
+#
+if ! systemctl --user is-active --quiet tmux.service ; then
+ printf >&2 'tmux: server not running\n'
+ exit
+fi
+exec /usr/bin/tmux "$@"
diff --git a/tmux/profile.d/tmux.sh b/tmux/profile.d/tmux.sh
new file mode 100644
index 00000000..2a936da5
--- /dev/null
+++ b/tmux/profile.d/tmux.sh
@@ -0,0 +1,3 @@
+# Encourage tmux to put its sockets into XDG_RUNTIME_DIR rather than /tmp
+[ -n "$XDG_RUNTIME_DIR" ] || return
+export TMUX_TMPDIR=$XDG_RUNTIME_DIR
diff --git a/tmux/systemd/user/tmux.service b/tmux/systemd/user/tmux.service
new file mode 100644
index 00000000..404f1888
--- /dev/null
+++ b/tmux/systemd/user/tmux.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=tmux server
+Documentation=man:tmux(1)
+
+[Service]
+ExecStart=/bin/sh -lc 'exec /usr/bin/tmux start-server \\; set-option -s exit-empty off'
+KillMode=mixed
+Type=forking
+
+[Install]
+WantedBy=default.target