codex tips

This commit is contained in:
Henrik Bakken
2026-03-10 21:38:08 +01:00
parent e2e5716f80
commit 5310712394
4 changed files with 136 additions and 46 deletions
+11 -13
View File
@@ -12,12 +12,11 @@ set -g allow-passthrough
set -g history-limit 100000
set -g focus-events on
# Set the default terminal terminfo
set -g default-terminal "foot"
# Advertise tmux correctly to programs running inside it.
set -g default-terminal "tmux-256color"
# True color support (Tc) and undercurl support (Smol)
set -as terminal-overrides ',foot:Tc'
set -as terminal-overrides ',foot:Smol'
# Tell tmux which features the outer Foot client supports.
set -as terminal-features ',foot*:RGB,clipboard,focus,title'
# Start with index 1
set -g base-index 1
@@ -31,11 +30,8 @@ bg_active_window="color252"
bg_highlight="red"
# pane title
ps_pid='#(pgrep -P "#{pane_pid}" | tr "\n" " ")'
cmd='#(ps --no-headers -o args $(pgrep -P "#{pane_pid}"))'
# cmd='#(ps --no-headers -t #{pane_tty} -o args -O-c | tr "\n" " ")'
setw -g pane-border-status top
setw -g pane-border-format " #{pane_current_path} #{=/-20/…:pane_current_command} ${ps_pid}[${cmd}] #{?alternate_on,<Alt Mode> ,}"
setw -g pane-border-format " #{pane_current_path} #{=/-40/…:pane_current_command} #{?alternate_on,<Alt Mode> ,}"
set -g pane-border-style "fg=${fg_inactive_pane}"
set -g pane-active-border-style "fg=${fg_active_pane}"
@@ -68,11 +64,12 @@ set -g set-titles on
# Note : you can press super key by set M.
# (tested with tty only)
set -g prefix M-a
bind M-a send-prefix
# First remove *all* keybindings
unbind -a
bind M-a send-prefix
# Basic bindings
bind ? list-keys
bind d detach-client
@@ -90,12 +87,13 @@ bind c copy-mode
# clipboard control
bind p paste-buffer
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
bind -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi r send-keys -X rectangle-toggle
bind -T copy-mode-vi Escape send-keys -X cancel
bind -T copy-mode-vi q send-keys -X clear-selection
bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection primary -filter | xclip -selection clipboard"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection primary -filter | xclip -selection clipboard"
bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy"
# Rename window
bind , command-prompt "rename-window %%"