Written on 2024-08-14 by Adam Drake - 5 min read
I have discovered a powerful little tool to aid me in my quest to fully grasp the benefits of the Tmux world. I discovered it through Typecraft in one of his excellent Youtube videos. It’s a tool that helps you open a dev environment for any project in Tmux with all the right windows ready so you can get cracking on those code tweaks as soon as possible. It’s also been around for a while so has stood the test of time (which is saying something in this day and age!).
According to the Tmuxifier Github page, Tmuxifier helps you Create, edit, manage and load complex Tmux session, window and pane configurations with ease.
This basically means if you have one Tmux window open where is your terminal, another Tmux window open which are you tests and another Tmux window which is your editor and all of these are for a specific project you can create a Tmuxifier window layout to define these. With one command in the terminal you can be up and running and get cracking on your work.
This might be clearer with an actual example…
Before using Tmuxifier you do need to git clone it onto your computer.
You also need Tmux. (If you don’t know what Tmux is then check out my other post about Tmux). On the Tmuxifier Github page, there are pretty clear instructions about how to install it and get it up and running. Make sure you follow all the instructions as it’s not just a case of git clone and thats it. You also have to update your .zshrc file.
In Tmuxifier you can basically create and edit Window Layouts or Session Layouts. The meaning of Window and Session here are the same as the Tmux definitions.
I created a Session Layout for my blog that I develop locally on my computer. I was feeling particularly creative that day so I called it blog. To create this Session Layout I ran the following command:
This created a bash file blog.session.sh in which you can write the script for setting up your session. What I have set up is very basic for my blog as it’s a simple application but hopefully it will give you an idea and inspiration to get started:
So what’s going on here:
Honestly, it’s all pretty straightforward and easy to get going with this. In this particular instance I am just opening two windows in Tmux and getting my frontend and backend code bases running for my blog.
I’ve been using Tmuxifier for a few weeks now and these are the most common commands I am using:
This command allows you to edit the Session Layout you created.
This command allows you to actually load the Session Layout you created.
This allows you to create a new Session Layout.
Is this tool going to totally change your life? Probably not. But it will help you get up and running on projects that you are consistently working on. Half the battle sometimes can just be getting up and running so by running one command to be able to get going is a win.
Plus I have found I now keep my desktop more tidy. I used to leave my terminal windows open at the end of the day so I didn’t have to set up everything the next day. Now I can quite happily close everything when I have finished working on a project knowing I can come back the next day and get my setup up and running quickly.
I am a Frontend Developer working mainly with React and Typescript in my day-to-day professional life. I love exploring new tools and libraries and love the Javascript Ecosystem.
Loading...
Adam Drake is a Frontend React Developer who is very passionate about the quality of the web. He lives with his wife and three children in Prague in the Czech Republic.
Adam Drakes Site © 2024