Update pi
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
let
|
||||
cfg = config.dot.tmux;
|
||||
|
||||
# tmuxp from nixpkgs-unstable (provided by modules/overlays/unstable.nix)
|
||||
tmuxp = pkgs.unstable.tmuxp;
|
||||
|
||||
projectSelector = pkgs.writeScriptBin "projectSelector" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
# Configuration
|
||||
@@ -48,7 +51,7 @@ let
|
||||
# Background load all but the last selection
|
||||
if [[ $i -lt $total ]]; then
|
||||
if [[ -f "$target/.tmuxp.yaml" || -f "$target/.tmuxp.yml" ]]; then
|
||||
${pkgs.tmuxp}/bin/tmuxp load --yes -d "$target"
|
||||
${tmuxp}/bin/tmuxp load --yes -d "$target"
|
||||
else
|
||||
if ! ${pkgs.tmux}/bin/tmux has-session -t "$s_name" 2>/dev/null; then
|
||||
${pkgs.tmux}/bin/tmux new-session -d -s "$s_name" -c "$target"
|
||||
@@ -57,7 +60,7 @@ let
|
||||
else
|
||||
# Last item: Foreground switch/attach
|
||||
if [[ -f "$target/.tmuxp.yaml" || -f "$target/.tmuxp.yml" ]]; then
|
||||
${pkgs.tmuxp}/bin/tmuxp load --yes "$target"
|
||||
${tmuxp}/bin/tmuxp load --yes "$target"
|
||||
else
|
||||
if ! ${pkgs.tmux}/bin/tmux has-session -t "$s_name" 2>/dev/null; then
|
||||
${pkgs.tmux}/bin/tmux new-session -d -s "$s_name" -c "$target"
|
||||
@@ -116,8 +119,10 @@ in
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
escapeTime = 10;
|
||||
terminal = "screen-256color";
|
||||
tmuxp.enable = true;
|
||||
terminal = "xterm-256color";
|
||||
# tmuxp is installed manually below to pin it to unstable
|
||||
# (programs.tmux.tmuxp has no package option)
|
||||
tmuxp.enable = false;
|
||||
extraConfig = ''
|
||||
set -g display-time 1500
|
||||
set -s set-clipboard on
|
||||
@@ -281,6 +286,7 @@ in
|
||||
|
||||
home.packages = [
|
||||
tmuxKiller
|
||||
tmuxp
|
||||
] ++ lib.optional cfg.workMode projectSelector;
|
||||
|
||||
home.shellAliases = {
|
||||
|
||||
Reference in New Issue
Block a user