From 517baa16d1f39ca093c281e5a96a0d2eedaaddf0 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Fri, 12 May 2023 20:49:40 -0400 Subject: [PATCH] tmux: misc changes again - fixed an issue with mfact and environment variables - redid all the dwm-like binds yet again --- src/.config/tmux/tmux.conf | 12 ++++++------ src/.local/bin/dwm.tmux | 9 --------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/.config/tmux/tmux.conf b/src/.config/tmux/tmux.conf index 480dd6e..50858cd 100644 --- a/src/.config/tmux/tmux.conf +++ b/src/.config/tmux/tmux.conf @@ -14,7 +14,7 @@ set escape-time 20 # dwm-like binds for tmux setenv -g tmuxdwm_version 0.1.0 setenv -g killlast 0 # Toggle killing last pane -setenv -g mfact 50 # Main pane area factor +setenv -g mfact 45 # Main pane area factor set -g command-alias[100] newpane='run-shell "dwm.tmux newpane"' set -g command-alias[101] newpanecurdir='run-shell "dwm.tmux newpanecurdir"' @@ -42,11 +42,11 @@ set -g command-alias[121] window9='run-shell "dwm.tmux window 9"' set-hook -g pane-exited 'run-shell "dwm.tmux layouttile"' # these keybinds are odd because vim already has ctrl-hjkl for buffers -bind -n C-e newpane -bind -n C-w newpanecurdir -bind -n C-c killpane -bind -n C-u nextpane -bind -n C-i prevpane +bind e newpane +bind w newpanecurdir +bind c killpane +bind -n C-n nextpane +bind -n C-o prevpane bind -n C-b zoom bind h decmfact bind l incmfact diff --git a/src/.local/bin/dwm.tmux b/src/.local/bin/dwm.tmux index de9c0f2..b980b23 100755 --- a/src/.local/bin/dwm.tmux +++ b/src/.local/bin/dwm.tmux @@ -1,10 +1,6 @@ #!/bin/sh # https://github.com/saysjonathan/dwm.tmux -window_panes= -killlast= -mfact= - newpane() { tmux \ split-window -t :.0\; \ @@ -94,7 +90,6 @@ args=$* set -- $(echo $(tmux display -p "#{window_panes}\n#{killlast}\n#{mfact}")) window_panes=$1 killlast=$2 -mfact=$3 case $command in newpane) newpane;; @@ -112,7 +107,3 @@ case $command in window) window $args;; *) echo "unknown command"; exit 1;; esac - -# hacky fix to prevent tmux from displaying a "returned 1" prompt -# probably ignoring something but can't matter that much -exit 0