summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--aports/caddy-conf/APKBUILD2
-rw-r--r--aports/caddy-conf/caddy-conf.post-install1
-rw-r--r--aports/freya-base/APKBUILD4
-rw-r--r--aports/tmux-conf/APKBUILD28
-rw-r--r--aports/tmux-conf/tmux-conf.post-install3
-rwxr-xr-xaports/tmux-conf/tmux-window.sh7
-rw-r--r--aports/tmux-conf/tmux.conf105
8 files changed, 150 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0518b88..86ce723 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ ALPINE_VERSION := 3.22
APORTS := apk-conf \
caddy-conf \
openssh-conf \
+ tmux-conf \
zsh-conf \
freya-certs \
freya-keys \
@@ -69,4 +70,4 @@ realclean: clean
all: aports publish
publish:
- scp -r $(OUT)/aports/ $(REPO)
+ rsync -avz --delete $(OUT)/aports/* $(REPO)/aports/
diff --git a/aports/caddy-conf/APKBUILD b/aports/caddy-conf/APKBUILD
index 6eb87f2..60257d2 100644
--- a/aports/caddy-conf/APKBUILD
+++ b/aports/caddy-conf/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Freya Murphy <freya@freyacat.org>
pkgname=caddy-conf
pkgver=0.0.1
-pkgrel=0
+pkgrel=1
pkgdesc="Managed caddy configuration"
url="https://g.freya.cat/freya/aports/"
arch="noarch"
diff --git a/aports/caddy-conf/caddy-conf.post-install b/aports/caddy-conf/caddy-conf.post-install
index 492bbc7..47bf3ed 100644
--- a/aports/caddy-conf/caddy-conf.post-install
+++ b/aports/caddy-conf/caddy-conf.post-install
@@ -1,4 +1,5 @@
#!/bin/sh
+rm -f /etc/caddy/Caddyfile.apk-new
rm -f /etc/caddy/Caddyfile
ln -sf /usr/share/conf/Caddyfile /etc/caddy/Caddyfile
touch /var/log/caddy
diff --git a/aports/freya-base/APKBUILD b/aports/freya-base/APKBUILD
index 521a76e..af90b23 100644
--- a/aports/freya-base/APKBUILD
+++ b/aports/freya-base/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Freya Murphy <freya@freyacat.org>
pkgname=freya-base
pkgver=0.0.1
-pkgrel=0
+pkgrel=1
pkgdesc="Custom baseline for alpine linux vms"
url="https://g.freya.cat/freya/aports/"
arch="noarch"
@@ -11,6 +11,7 @@ depends="
apk-conf
caddy-conf
openssh-conf
+tmux-conf
zsh-conf
freya-certs
@@ -25,6 +26,7 @@ coreutils
curl
git
htop
+jq
linux-firmware-none
linux-virt
lsblk
diff --git a/aports/tmux-conf/APKBUILD b/aports/tmux-conf/APKBUILD
new file mode 100644
index 0000000..9586398
--- /dev/null
+++ b/aports/tmux-conf/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Freya Murphy <freya@freyacat.org>
+# Maintainer: Freya Murphy <freya@freyacat.org>
+pkgname=tmux-conf
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="Managed tmux configuration"
+url="https://g.freya.cat/freya/aports/"
+arch="noarch"
+license="MIT"
+depends="tmux"
+options="!check !strip"
+makedepends=
+checkdepends=
+install="$pkgname.post-install"
+source="
+tmux.conf
+tmux-window.sh
+"
+
+package() {
+ install -Dm644 "$srcdir"/tmux.conf "$pkgdir"/usr/share/conf/tmux.conf
+ install -Dm755 "$srcdir"/tmux-window.sh "$pkgdir"/usr/share/conf/tmux-window.sh
+}
+
+sha512sums="
+1ccec88589d69e30df77baf80472df873656af927c2ff69ea82c2a0a94f08f427a88513bdc6236812b2bebcd2c28bbdd716a3507f7fb1e021705803c41488a3f tmux.conf
+06c7d41d8316b49b26574622df00777eea925657a9fcb887c2d0639739e136a9213b4e3873caba4a6ded9c322fa3f30063bb2fab59c43329585d54ad3c2841f9 tmux-window.sh
+"
diff --git a/aports/tmux-conf/tmux-conf.post-install b/aports/tmux-conf/tmux-conf.post-install
new file mode 100644
index 0000000..674be50
--- /dev/null
+++ b/aports/tmux-conf/tmux-conf.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+rm -f /root/.tmux.conf
+ln -sf /usr/share/conf/tmux.conf /root/.tmux.conf
diff --git a/aports/tmux-conf/tmux-window.sh b/aports/tmux-conf/tmux-window.sh
new file mode 100755
index 0000000..1cdacf0
--- /dev/null
+++ b/aports/tmux-conf/tmux-window.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if tmux list-windows | grep -q "^$1:"; then
+ tmux select-window -t "$1"
+else
+ tmux new-window -t "$1"
+fi
diff --git a/aports/tmux-conf/tmux.conf b/aports/tmux-conf/tmux.conf
new file mode 100644
index 0000000..292fcdd
--- /dev/null
+++ b/aports/tmux-conf/tmux.conf
@@ -0,0 +1,105 @@
+
+# change prefix
+set -g prefix C-a
+unbind C-b
+bind C-a send-prefix
+
+# split windows like vim
+# vim's definition of a horizontal/vertical split is reversed from tmux's
+bind s split-window -v
+bind v split-window -h
+
+# split panes using | and -
+bind - split-window -v
+bind | split-window -h
+unbind '"'
+unbind %
+
+# reload config file
+bind r source-file ~/.tmux.conf
+
+# large history
+set -g history-limit 10000
+
+# start windows and panes at 1, not 0
+set -g base-index 1
+setw -g pane-base-index 1
+
+# switch term
+bind 1 run-shell "/usr/share/conf/tmux-window.sh 1"
+bind 2 run-shell "/usr/share/conf/tmux-window.sh 2"
+bind 3 run-shell "/usr/share/conf/tmux-window.sh 3"
+bind 4 run-shell "/usr/share/conf/tmux-window.sh 4"
+bind 5 run-shell "/usr/share/conf/tmux-window.sh 5"
+bind 6 run-shell "/usr/share/conf/tmux-window.sh 6"
+bind 7 run-shell "/usr/share/conf/tmux-window.sh 7"
+bind 8 run-shell "/usr/share/conf/tmux-window.sh 8"
+bind 9 run-shell "/usr/share/conf/tmux-window.sh 9"
+bind 0 run-shell "/usr/share/conf/tmux-window.sh 10"
+bind S choose-tree
+
+# terminal style
+set -g default-terminal "tmux-256color"
+set -g terminal-overrides "*:colors=256"
+set -a terminal-features "xterm-256color:RGB"
+
+# focus events
+set -g focus-events on
+
+# move around panes with hjkl, as one would in vim after pressing ctrl-w
+bind -n M-Left select-pane -L
+bind -n M-Right select-pane -R
+bind -n M-Up select-pane -U
+bind -n M-Down select-pane -D
+
+# enable mouse control
+set -g mouse on
+
+# don't rename windows automatically
+set-option -g allow-rename off
+
+# don't do anything when a 'bell' rings
+set -g visual-activity off
+set -g visual-bell off
+set -g visual-silence off
+setw -g monitor-activity off
+set -g bell-action none
+
+# clock mode
+setw -g clock-mode-colour yellow
+
+# copy mode
+setw -g mode-style 'fg=black bg=red bold'
+setw -g mode-keys vi
+
+# panes
+set -g pane-border-style 'fg=red'
+set -g pane-active-border-style 'fg=yellow'
+
+# statusbar
+set -g status-position bottom
+set -g status-justify left
+set -g status-style 'fg=blue'
+set -g status-interval 1
+
+set -g status-left ''
+set -g status-left-length 10
+
+set -g status-right-style 'fg=black bg=blue'
+set -g status-right '%Y-%m-%d %H:%M:%S '
+set -g status-right-length 50
+
+setw -g window-status-current-style 'fg=black bg=blue'
+setw -g window-status-current-format ' #I #W #F '
+
+setw -g window-status-style 'fg=blue bg=black'
+setw -g window-status-format ' #I #[fg=white]#W #[fg=blue]#F '
+
+setw -g window-status-bell-style 'fg=blue bg=red bold'
+
+# messages
+set -g message-style 'fg=yellow bg=red bold'
+
+# bind : to command-prompt like vim
+# this is the default in tmux already
+bind : command-prompt