Live data from Hacker News

Getting Started with Tmux

ittavern.com

31–40 of 160 posts

Re: Getting Started with Tmux

#32
post #14
post #5

I've only used tmux for about One of my favorite scripts to run is a tmux script that creates a new session with about 7 windows of running my company's project (one window for notes, 3 windows for the backend (runner, code, tests), and 3 windows for the client (runner, code, tests). It's even tweaked further to open up the code in vim, and when used in conjunction with something like harpoon.nvim I have access to my…

Did you check out tmuxinator? Sounds like you reinvented it, cool, but maybe there’s some inspiration to be had.

I have not! I'll have to investigate more, because my little shell script is pretty basic (like 20 lines total, most of which was done for readability).

https://github.com/tmuxinator/tmuxinator

Re: Getting Started with Tmux

#34

Tmux becomes more awesome when you use something like Alacritty or Kitty [EDIT: scratch Kitty, this mainly applies to Alacritty] and map your system's key (Apple's command key or... whatever it would be on Linux or Windows) and use that as your "tmux key". That way you can make single-chord bindings for all things tmux and life becomes better. If you use Vim, adding VimTmuxNavigator[0] improves things so much. For ex…

Can you elaborate on Kitty or Alacritty? I couldn't find anything. In fact, the documentation is hostile again tmux [0]. [0] https://sw.kovidgoyal.net/kitty/faq/#i-am-using-tmux-and-hav...

Oh my—I actually just mentioned Kitty for diplomatic reasons as some folks feel it's a friendlier alternative to Alacritty. I've personally never used it myself. Alacritty has recommended using tmux from the beginning (originally it planned to never even implementing scrollback and recommended tmux instead, but they caved and now there is native scrollback).

I believe I used this article when I switched over from iTerm to Alacritty: https://arslan.io/2018/02/05/gpu-accelerated-terminal-alacri...

Otherwise, here's my alacritty config: https://github.com/sodapopcan/dotfiles/blob/f9eba86bf292aa3b.... Line 57 is where the keybindings start (They are annoying to read since they use escape sequences). I make my tmux prefix `ctrl-space` (because `ctrl-b` is useful), then in Alacritty pressing `cmd` sends `ctrl-space` to tmux.

Re: Getting Started with Tmux

#35

One of the best software I've ever used, it's addictive. Did anyone manage to get it set up on windows? And if you did is it buggy or does it run smooth?

I use TMUX all the time inside Gitbash for Windows. Some panes are SSH sessions into Linux servers etc. While other panes I use vim to edit local Windows txt files or just run other local Windows things. (This mightn't be what you were looking for)

Re: Getting Started with Tmux

#36
post #8
post #5

I've only used tmux for about One of my favorite scripts to run is a tmux script that creates a new session with about 7 windows of running my company's project (one window for notes, 3 windows for the backend (runner, code, tests), and 3 windows for the client (runner, code, tests). It's even tweaked further to open up the code in vim, and when used in conjunction with something like harpoon.nvim I have access to my…

And just like learn your tools, also “make your tools”. This is what we do all the time. This is why we compare ourselves with craftspeople. We have in common that working on the craft includes improving and making your own tools to get the best result.

Yes! I'm slowly moving towards these steps, it's my excuse for learning go and rust. There are some CLTs that don't exist for my need and I'm working towards creating them.

I don't know if you've heard of charmbracelet [1] but they are a company that makes a lot of cool go libraries to assist creating CLTs and TUIs. One of which was on HN recently, VHS [2].

[1] https://github.com/charmbracelet

[2] https://github.com/charmbracelet/vhs

Re: Getting Started with Tmux

#37
I recently decided to give terminal multiplexer a try. I first used tmux for a couple of weeks and then discovered zellij. It felt much more user-friendly, but I don't know how much I am missing out in terms of useful features compared to tmux.

Re: Getting Started with Tmux

#38
My favourite tmux trick only works on an apple gb keyboard:

    set -g prefix `
    bind-key e send-prefix
Then, all your tmux controls are one left pinky press away (` is beside z on uk Mac keyboards).

(`e sends a ` for when you need it, rare though, $() is better for sub shells :})

Re: Getting Started with Tmux

#39

Tmux becomes more awesome when you use something like Alacritty or Kitty [EDIT: scratch Kitty, this mainly applies to Alacritty] and map your system's key (Apple's command key or... whatever it would be on Linux or Windows) and use that as your "tmux key". That way you can make single-chord bindings for all things tmux and life becomes better. If you use Vim, adding VimTmuxNavigator[0] improves things so much. For ex…

Interestingly enough, one of the stated goals of kitty is to make the usage of tmux unnecessary.

Considering your comment (and many others like it), I don't think that has quite worked out.

Still, kitty is one of my favorite terminal emulators and I'd urge anyone who hasn't tried it to give it a shot.

Re: Getting Started with Tmux

#40
post #5

I've only used tmux for about One of my favorite scripts to run is a tmux script that creates a new session with about 7 windows of running my company's project (one window for notes, 3 windows for the backend (runner, code, tests), and 3 windows for the client (runner, code, tests). It's even tweaked further to open up the code in vim, and when used in conjunction with something like harpoon.nvim I have access to my…

Could you please share your script?
Post reply on HN