grace/dots
dotfiles/nix configs
git clone https://git.gae.moe/grace/dots
b70d9f9
main
1{ pkgs , ...} : 2 3let 4seshPicker = pkgs . writeShellScript "sesh-picker" '' 5export PATH = ${ pkgs . lib . makeBinPath [ pkgs . sesh pkgs . fzf pkgs . tmux pkgs . zoxide pkgs . fd ]} : " $ PATH " 6selection = $( sesh list --icons | fzf-tmux -p 80%,70% \ 7--no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \ 8--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \ 9--bind 'tab:down,btab:up' \ 10--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \ 11--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \ 12--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \ 13--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \ 14--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \ 15--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \ 16--preview-window 'right:55%' \ 17--preview 'sesh preview {}' ) || exit 0 18[ -n " $ selection " ] || exit 0 19sesh connect " $ selection " 20'' ; 21in 22{ 23programs . tmux = { 24enable = true ; 25mouse = true ; 26keyMode = "vi" ; 27baseIndex = 1 ; 28prefix = "C-b" ; 29terminal = "xterm-ghostty" ; 30plugins = with pkgs . tmuxPlugins ; [ 31sensible 32yank 33resurrect 34continuum 35{ 36plugin = rose-pine ; 37extraConfig = '' 38set -g @rose_pine_variant 'main' 39set -g @rose_pine_left_separator ' > ' 40set -g @rose_pine_right_separator ' ' 41set -g @rose_pine_field_separator ' | ' 42set -g @rose_pine_window_separator ':' 43set -g @rose_pine_window_status_separator ' ' 44'' ; 45} 46]; 47extraConfig = '' 48set -g status-position top 49set -s set-clipboard on 50set -s get-clipboard both 51set -g set-titles on 52set -g set-titles-string "#{session_name}" 53setw -g pane-base-index 1 54set -g allow-passthrough all 55set -as terminal-features ",xterm-ghostty:hyperlinks" 56set -ga terminal-overrides ",xterm-ghostty:Tc" 57 58unbind C-b 59set -g prefix C-\\ 60bind -N "Send the prefix key through to the application" C-\\ send-prefix 61bind -N "Refresh system clipboard via OSC 52" Y refresh-client -l 62bind -N "Pick a sesh session" T run-shell " ${ seshPicker } " 63 64bind v split-window -h -c "#{pane_current_path}" 65bind b split-window -v -c "#{pane_current_path}" 66bind c new-window -c "#{pane_current_path}" 67bind -n M-h select-pane -L 68bind -n M-j select-pane -D 69bind -n M-k select-pane -U 70bind -n M-l select-pane -R 71'' ; 72}; 73 74}