From b09f844d9fc00ffd9be6bf5efed4714e646c6073 Mon Sep 17 00:00:00 2001 From: Mark Silva Date: Mon, 19 Aug 2024 18:07:20 -0400 Subject: [PATCH] tmux-ipk: Add tmux configuration file to tmux IPK * Create a directory for tmux configuration files in /usr/share/tmux/conf.d * Add a /etc/tmux.conf file with default lock command * Add a line to source all files in /usr/share/tmux/conf.d in /etc/tmux.conf * -q is to ignore errors if the directory is empty * This allows snac mode to add a conf file to this location without modifying the main tmux.conf file Signed-off-by: Mark Silva tmux-bbappend: Add conf.d directory --- recipes-extended/tmux/files/tmux.conf | 3 +++ recipes-extended/tmux/tmux_3.%.bbappend | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 recipes-extended/tmux/files/tmux.conf create mode 100644 recipes-extended/tmux/tmux_3.%.bbappend diff --git a/recipes-extended/tmux/files/tmux.conf b/recipes-extended/tmux/files/tmux.conf new file mode 100644 index 00000000..76fa6318 --- /dev/null +++ b/recipes-extended/tmux/files/tmux.conf @@ -0,0 +1,3 @@ +set -g lock-command vlock +bind X lock-session +source-file -q /usr/share/tmux/conf.d/* diff --git a/recipes-extended/tmux/tmux_3.%.bbappend b/recipes-extended/tmux/tmux_3.%.bbappend new file mode 100644 index 00000000..bb808ea1 --- /dev/null +++ b/recipes-extended/tmux/tmux_3.%.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI += "\ + file://tmux.conf \ +" + +do_install:append() { + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/tmux.conf ${D}${sysconfdir}/tmux.conf + install -d ${D}/usr/share/tmux/conf.d +} + +FILES:${PN} += "${sysconfdir}/tmux.conf" +CONFFILES:${PN} += "${sysconfdir}/tmux.conf" +RDEPENDS:${PN}:append = " vlock"