News for hackers. Stuff that matters.
Re:WTF: A personal information dashboard for your terminal by theshrike79 on Friday June 01, 2018 @09:51AM (#17205271)
Can you share how you create a certain window/buffer setup on tmux automatically?
Re:WTF: A personal information dashboard for your terminal by Jtsummers on Friday June 01, 2018 @01:33PM (#17207834)
tmuxinator

Someone mentioned it a few months back and it greatly simplified my life. You specify your layouts (and tmux will give you the information to copy a current layout). You can then tell it what programs to run in each window of the layout.

So I have a window broken into 5 panes (as an example). The top left runs emacs (via emacsclient) and opens my ledger.org file. The other 4 show various reports I want to see: Current cleared balance, current uncleared balance, current uncleared transactions, future transactions (out to a month), and a running balance sheet across the past several months.

In another two windows I just have a shell and an emacsclient instance (because I live in emacs). Then as I come up with other things I want to see (weather information, summaries of my todos, email inbox (tally at least) I can add new window and pane configurations to my tmuxinator configuration. When I restart it, everything is back as I had it (if I put them in the config).

I haven't done as much coding at home as I'd like lately (and it's all Windows at the office). But I have a couple other tmuxinator configs that will layout several windows and panes for development. Like launch an editor, and have spaces laid out like I want for debuggers and test monitoring scripts. As appropriate to the language and task.

https://github.com/tmuxinator/tmuxinator

For the constantly refreshed display, it's mostly `watch -t <some commands>` (modifying the refresh rate if necessary. `-t` removes the title text from the top of watch so it only shows the command outputs. Which is something it took me way too many years to realize.