Re:Show HN: Cockpit – create tmux panes and windows with ease
by catern on Monday October 09, 2017 @01:52PM
(#15435937)
It's quite an indictment of the current state of our tooling (not just tmux) that such an application as this is necessary. Why isn't it easy to configure this in tmux itself, and persist the resulting configuration?
[ Parent
| on HN ]
Re:Show HN: Cockpit – create tmux panes and windows with ease
by mileac on Monday October 09, 2017 @04:09PM
(#15437046)
My use case for building Cockpit was to easily generate scripts for my different layouts. These scripts I use with
https://github.com/fitztrev/shuttle so I could load my workspace with a single click.
I am not sure if this application is necessary. However, I think everyone can find their own use cases.
Re:Show HN: Cockpit – create tmux panes and windows with ease
by nicklaf on Monday October 09, 2017 @08:52PM
(#15438551)
I wonder if there is some sort of inverse relationship between having comprehensive features, thereby being self-contained (think Smalltalk), versus having a continuous dialog with the imperfect outside environment (think perl). I'm sure this is implicit in the famous "Worse is Better" essay, if not explicit.
I mean: the author of tmux could have bundled the package with a comprehensive environment. But what really is there, beyond Unix and the browser? If it exists, people haven't heard if it, and even if they had, would just as soon reinvent it. At any rate, the inevitable imperfections and inpedance-mismatch with users' existing workflow / UI would surely invite brutal criticism. (For example, when Plan 9 came up here a few years back, a big chunk of the discussion was about how ugly the GUI seemed to them!)
Re:Show HN: Cockpit – create tmux panes and windows with ease
by pjungwir on Monday October 09, 2017 @02:31PM
(#15436277)
This doesn't let you persist ad hoc setups, but I have a `~/lib/tmux-code` file that I source from `~/.bash_profile` with entries like this:
function ins-code {
env_name=code
long_name=insurance
short_name=ins
tmux_session=${short_name}-${env_name}
if tmux list-sessions | grep ${tmux_session}; then
tmux attach-session -t ${tmux_session}
else
cd ~/src/${long_name}/backend/app/models && \
tmux new-session -d -s ${tmux_session} && \
tmux rename-window -t ${tmux_session}:1 models
cd ~/src/${long_name}/backend/app/controllers && \
tmux new-window -t ${tmux_session}:2 -n controllers
cd ~/src/${long_name}/backend/app/views && \
tmux new-window -t ${tmux_session}:3 -n views
cd ~/src/${long_name}/backend/app/assets/stylesheets && \
tmux new-window -t ${tmux_session}:4 -n css
tmux select-window -t ${tmux_session}:1 && \
tmux -2 attach-session -t ${tmux_session}
fi
}
Then I can just say `ins-code` and it will either launch a new session or attach if it already exists.
Re:Show HN: Cockpit – create tmux panes and windows with ease
by mstipetic on Monday October 09, 2017 @03:58PM
(#15436961)
I highly recommend https://github.com/tmuxinator/tmuxinator if you haven't tried it, I've actually used it to run whole microservice environments locally and works without a hitch
Re:Show HN: Cockpit – create tmux panes and windows with ease
by pavel_lishin on Monday October 09, 2017 @01:55PM
(#15435970)
It's already simple to split panes in tmux, but the ability to persist them sounds like a good Hacktoberfest project.
Re:Show HN: Cockpit – create tmux panes and windows with ease
by unk on Monday October 09, 2017 @02:03PM
(#15436046)
this has already been solved by several plugins. this one works well:
Re:Show HN: Cockpit – create tmux panes and windows with ease
by rhinoceraptor on Monday October 09, 2017 @02:20PM
(#15436171)
The defaults are a little funky but they’re easy enough to change. I have mine so prefix+s splits horizontally and prefix+v splits vertically. And then prefix+(H,J,K,L) resizes.