<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tmux on Janusworx</title><link>https://janusworx.com/tags/tmux/</link><description>Recent content in Tmux on Janusworx</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>feedback@janusworx.com (Mario Jason Braganza)</managingEditor><webMaster>feedback@janusworx.com (Mario Jason Braganza)</webMaster><copyright>© 2026, Mario Jason Braganza</copyright><lastBuildDate>Sat, 01 Feb 2025 09:27:25 +0530</lastBuildDate><atom:link href="https://janusworx.com/tags/tmux/index.xml" rel="self" type="application/rss+xml"/><item><title>Tmux Start Session Maximized With Three Panes</title><link>https://janusworx.com/work/tmux-start-session-maximized-with-three-panes/</link><pubDate>Sat, 01 Feb 2025 09:27:25 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/tmux-start-session-maximized-with-three-panes/</guid><description>&lt;p&gt;So I got tired of starting up a dedicated tmux session to manage all the work related to my writing sessions. Over the past few months, I’ve boiled it down to three.&lt;br&gt;
And it still irks me that I have to …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Launch Terminal&lt;/li&gt;
&lt;li&gt;Launch Tmux&lt;/li&gt;
&lt;li&gt;Split it into three windows err … panes.&lt;/li&gt;
&lt;li&gt;Go to the top left pane and launch Hugo server&lt;/li&gt;
&lt;li&gt;Switch to the right pane and then launch Emacs with whatever new post I want to write today.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So &lt;em&gt;of course&lt;/em&gt;, a &lt;a href="https://en.wikipedia.org/wiki/Rube_Goldberg" target="_blank" rel="noreferrer"&gt;Rube Goldberg-esque&lt;/a&gt;, tiny bash-pipey monster took form.
It now resides, chained to an alias, &lt;code&gt;hssx&lt;/code&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; in my &lt;code&gt;.bash_aliases&lt;/code&gt; file&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; &lt;span class="nv"&gt;hssx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cd /path/to/my/hugo/folder &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;xdotool windowsize $(xdotool getactivewindow) 100% 100% &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;tmux new-session \; split-window -h \; select-pane -l \; split-window -v \; select-pane -U \; send-keys &amp;#34;hugo serve&amp;#34; C-m \; select-pane -R&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;The first line switches to my hugo folder&lt;/li&gt;
&lt;li&gt;The second calls &lt;code&gt;xdotool&lt;/code&gt; and maximises the terminal window&lt;/li&gt;
&lt;li&gt;And the last line is a series of instructions to the tmux command. I’ve split it below for readability.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux new-session \; #Tmux start a new session
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;split-window -h \; # Split the window into two vertical panes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -l \; # Switch to the left pane
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;split-window -v \; # Split that into two horizontal panes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -U \; # Select the upper pane
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;send-keys &amp;#34;hugo serve&amp;#34; C-m \; # Type in `hugo serve` followed by Enter
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -R # Select the right pane&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;And boom!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2025/tmux-layout.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2025/tmux-layout.png" alt="bash terminal showing a tmux window split into three panes" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click pic for a larger version&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: Tmux Start Session Maximized With Three Panes
%22" &gt;feedback at this domain&lt;/a&gt; &lt;em&gt;or&lt;/em&gt; [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;code&gt;hugo start session&lt;/code&gt; and x just because all my aliases have ended with x for years and years&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item></channel></rss>