tmux: misc changes again
- fixed an issue with mfact and environment variables - redid all the dwm-like binds yet again
This commit is contained in:
parent
b1afd39a86
commit
517baa16d1
@ -14,7 +14,7 @@ set escape-time 20
|
|||||||
# dwm-like binds for tmux
|
# dwm-like binds for tmux
|
||||||
setenv -g tmuxdwm_version 0.1.0
|
setenv -g tmuxdwm_version 0.1.0
|
||||||
setenv -g killlast 0 # Toggle killing last pane
|
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[100] newpane='run-shell "dwm.tmux newpane"'
|
||||||
set -g command-alias[101] newpanecurdir='run-shell "dwm.tmux newpanecurdir"'
|
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"'
|
set-hook -g pane-exited 'run-shell "dwm.tmux layouttile"'
|
||||||
|
|
||||||
# these keybinds are odd because vim already has ctrl-hjkl for buffers
|
# these keybinds are odd because vim already has ctrl-hjkl for buffers
|
||||||
bind -n C-e newpane
|
bind e newpane
|
||||||
bind -n C-w newpanecurdir
|
bind w newpanecurdir
|
||||||
bind -n C-c killpane
|
bind c killpane
|
||||||
bind -n C-u nextpane
|
bind -n C-n nextpane
|
||||||
bind -n C-i prevpane
|
bind -n C-o prevpane
|
||||||
bind -n C-b zoom
|
bind -n C-b zoom
|
||||||
bind h decmfact
|
bind h decmfact
|
||||||
bind l incmfact
|
bind l incmfact
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# https://github.com/saysjonathan/dwm.tmux
|
# https://github.com/saysjonathan/dwm.tmux
|
||||||
|
|
||||||
window_panes=
|
|
||||||
killlast=
|
|
||||||
mfact=
|
|
||||||
|
|
||||||
newpane() {
|
newpane() {
|
||||||
tmux \
|
tmux \
|
||||||
split-window -t :.0\; \
|
split-window -t :.0\; \
|
||||||
@ -94,7 +90,6 @@ args=$*
|
|||||||
set -- $(echo $(tmux display -p "#{window_panes}\n#{killlast}\n#{mfact}"))
|
set -- $(echo $(tmux display -p "#{window_panes}\n#{killlast}\n#{mfact}"))
|
||||||
window_panes=$1
|
window_panes=$1
|
||||||
killlast=$2
|
killlast=$2
|
||||||
mfact=$3
|
|
||||||
|
|
||||||
case $command in
|
case $command in
|
||||||
newpane) newpane;;
|
newpane) newpane;;
|
||||||
@ -112,7 +107,3 @@ case $command in
|
|||||||
window) window $args;;
|
window) window $args;;
|
||||||
*) echo "unknown command"; exit 1;;
|
*) echo "unknown command"; exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# hacky fix to prevent tmux from displaying a "returned 1" prompt
|
|
||||||
# probably ignoring something but can't matter that much
|
|
||||||
exit 0
|
|
||||||
|
Loading…
Reference in New Issue
Block a user