diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-07-29 08:46:43 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-07-29 08:46:43 +1200 |
commit | 973377bf0780af7754d830946c64b48b7dff636a (patch) | |
tree | 430fb9bf2faa567452857a02e617623c822c36e4 | |
parent | Merge branch 'release/v12.12.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-12.13.0.tar.gz (sig) dotfiles-12.13.0.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-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | sh/profile | 4 | ||||
-rw-r--r-- | tmux/bin/tmux.sh | 11 | ||||
-rw-r--r-- | tmux/profile.d/tmux.sh | 3 | ||||
-rw-r--r-- | tmux/systemd/user/tmux.service | 11 |
7 files changed, 40 insertions, 4 deletions
@@ -186,5 +186,6 @@ /include/mktd.m4 /less/less /mutt/filters/markdown-to-html +/tmux/bin/tmux /urxvt/ext/select /x/xsession @@ -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 @@ -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 @@ -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 |