Compare commits

..

4 Commits

Author SHA1 Message Date
efd2771d8c fix: remove tmux hooks 2026-04-26 14:33:19 +02:00
94331531e2 chore: disable 'lutris' temporarily (failed openldap test) 2026-04-26 14:32:20 +02:00
5b1e7efcd2 chore: update lockfile 2026-04-26 14:32:20 +02:00
730dd23967 fix: centralize and nixifiy in 'zk' module 2026-04-26 14:32:20 +02:00
4 changed files with 3 additions and 14 deletions

View File

@@ -1 +0,0 @@
set -g status-style bg=colour12,fg=colour0

View File

@@ -70,8 +70,6 @@ set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S
set -g default-terminal "tmux-256color"
set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.ssh.conf" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.regular.conf"'
# Vi copypaste mode
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'

View File

@@ -11,9 +11,5 @@
enable = true;
extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf");
};
home.file = {
".config/tmux/hooks/tmux.ssh.conf".source = dotsPath + "/.config/tmux/hooks/tmux.ssh.conf";
};
};
}

View File

@@ -1,6 +1,6 @@
current_zettel_path="$ZK_PATH/$(cat "$ZK_PATH/current-zettel.txt")"
if [ -n "$TMUX" ]; then
if [ -n "${TMUX:-}" ]; then
cd "$ZK_PATH" && $EDITOR "$current_zettel_path"
else
echo 'Not in tmux'
@@ -10,13 +10,9 @@ else
read -r -p 'Enter your choice: ' choice
case $choice in
1)
# Check if a tmux session is running with a window named zk
if tmux list-windows -F '#{window_name}' | grep -q zk; then
# Attach to the session containing the 'zk' window
session="$(tmux list-windows -F '#{window_name} #{session_name}' | grep zk | head -n 1 | awk '{ print $2 }')"
tmux attach -t "$session"
if tmux has-session -t zk 2>/dev/null; then
tmux attach -t zk
else
# Create session with a window named 'zk' and start nvim
tmux new-session -s zk -n zk -d
tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter
tmux attach -t zk