Hidden Tmux POWER: The Missing 50%

  Рет қаралды 20,800

DevOps Toolbox

DevOps Toolbox

Күн бұрын

There's no really good way to control sessions in Tmux and that's a shame! Such a powerful concept without a proper interface. So I created one! Introducing - Tmux-SessionX.
github.com/omerxx/tmux-sessionx
Ways to support this channel:
🎓 My course: learn.omerxx.com/courses/seco...
📰 Become a better engineer in just 3 minutes a week: signup.omerxx.com
⌨️ Tech I use: kit.co/omerxx/my-battle-station
LINKS
▶ • #VimConf2021: Writing,...
▶ github.com/omerxx/dotfiles
⏱ Timestamps
00:00 - Intro
01:37 - SessionX
03:18 - Getting started
05:07 - Power features
08:05 - Building a 2nd Brain with Neovim
#productivity #tmux #sessions #neovim #terminal #vim #dev #devops #linux #console

Пікірлер: 61
@devopstoolbox
@devopstoolbox 4 ай бұрын
Join 1000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com
@JoshMedeski
@JoshMedeski 4 ай бұрын
Thanks for the shoutout! It’s always cool to see how people make tmux work for them.
@0xchilli
@0xchilli 4 ай бұрын
quality content no joke , just needed to watch two vids and I was sold
@devopstoolbox
@devopstoolbox 4 ай бұрын
🙏🏽😉
@NoLoginIdea
@NoLoginIdea 4 ай бұрын
I'm on Debian based distor, 2 years is cutting edge.
@AhmadMughal1
@AhmadMughal1 4 ай бұрын
At this point all this feels like is over engineering something that is straightforward as it is. I have used tmuxifier for a lot of time for projects which you are actually working on and it takes less than a minute to create a session file. Also i don't understand how people find w not enough for their usage it is as straightforward as it is and provides all the necessary previews as well. Could just be me but at this point it is just too much obsession.
@devopstoolbox
@devopstoolbox 4 ай бұрын
Well, on one hand, yes, you're right. On the other, I tried everything and this is the one thing that made me start using sessions. I'll give you an example - I find myself reaching over to my config at least once a day (lately to change the espanso config). I also have a few windows for my work project, some other group of windows for one of my open source, and another for notes. Managing all these in either panes or windows would be a nightmare. And it was. So I'd pop random windows + go to the path + open vim, and naturally 50% I'd find a swapfile bc the same thing is already open in one of my other 10 windows. Sessions eliminated this problem altogether, and sessionx is the quickest way for me to manage them.
@AhmadMughal1
@AhmadMughal1 4 ай бұрын
@@devopstoolbox I can relate to the fact of constantly feeling the need to change your config file even if it is a single edit. I tend to have 3 windows for each project too where 1 runs vim the other has usually servers running and the 3rd for notes but i tend to organize projects per session instead of creating too much windows in a single so maybe that is where it differentiates in our methods.
@adityams1659
@adityams1659 4 ай бұрын
I agree, I just use sesh, and tmux ressurect. I have never bothered to meddle with too many sessions, and honestly it does not make sense.
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@AhmadMughal1 I get it, but still, I’d want a nicer way to view and change sessions
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@adityams1659 Depends on the workflow I guess. Since creating it, this is how I work, I’m used to a structure of sessions always opened in front of me, pretty much with consistent names that I already know and can turn to when I need (work, configs, sessionx, other open source I’m working on, etc)
@G1esas
@G1esas 4 ай бұрын
I'm really struggling to understand things you're showing in your video, but i already love the way your tmux overall looks. I'm pretty newbie on linux, and only able to somewhat use default tmux with panes (i keep forgetting bind for window's, so i'm not bothered with them for now, and i dont even have any work to do in terminal). I hope future me would understand all the things you're showed up in here with ease. If you have any guide videos, i'll be glad to check them out, cuz i love to learn linux for myself
@devopstoolbox
@devopstoolbox 4 ай бұрын
kzbin.info/www/bejne/fXmWnKOpl8d4iNEsi=938CtwA_1yqY8F7q Check this one out it should clear things for you and feel free to come back and comment here or on the other video with questions!
@JustMyTwoCentz
@JustMyTwoCentz 4 ай бұрын
Please make a video about using wezterm and tmux as default setup ❤
@Richetechguy
@Richetechguy 3 ай бұрын
Nice just started trying out SessionX pretty cool
@michaelns9887
@michaelns9887 3 ай бұрын
how do you integrate it with git worktrees? I have ~/projects and inside, some folders are regular git repos, some are worktrees with nested folders with actual worktrees inside. I want to list only nested ones, not the dir with bare repo.
@devopstoolbox
@devopstoolbox 3 ай бұрын
Hey, are you suggesting showing git worktrees inside sessionx? It's do-able but kind of an anti-pattern IMO. I use a session per project many times and then use other plugins like the worktrees nvim to deal with switching between them. That said, I'm happy to explore the idea, you're welcome to open an issue / PR :)
@hesperauxyo
@hesperauxyo 4 ай бұрын
I've got an odd request: more often than I like, I have to login to a session from the console. I attach to tmux and I am met with the worlds most disgusting color scheme. You like dark blue on black, right? It's super easy to read. :D Is there a solution to that? I use the rose-pine colorscheme everywhere I can - my personal favorite. In alacritty on a regular desktop setup, it looks wonderful - nerd font deliciousness, and all that. But when I break my rig and have to drop to a console, all of that goes away and the color scheme breaks too. I am ok with missing out on the nerd font icons (although if that's doable in the console that would be great). But I can't stand trying to edit a config file with nvim and seeing blue on black lol. I realize this is unrelated to your session manager. I tried to install it a few weeks ago but I couldn't get it to activate from the keybinding. I have tmux-sessionizer installed and it's become a simple and effective part of my workflow. I use 3-5 sessions typically and save/restore them automatically, etc. I do like the way you integrated zoxide into the session creation - very clean. Maybe it didn't work because I was using tmux-sessionizer at the same time? I'm not sure. Lastly, ssh. I have a few VMs and each of those has a tmux server running. It's kind of a pain for me to load my sesh, then ssh into those servers in each window of my session, and then attach individually to each server's tmux server... Do you have this problem, and have you found any clean ways around it? Btw, I'm using ssh keys that are password protected (MFA ftw) which makes it harder to autoconnect to ssh. Maybe an ssh-agent integration?
@Peter1215
@Peter1215 4 ай бұрын
Cool setup. For sessions management, I use tmuxinator (if sessions need to have predefined windows and panes etc). If the session is simply starting a new session from a folder, I use my own script, which is similar to yours but with way less features.
@iceke18
@iceke18 4 ай бұрын
Share?
@SajidAliSoftwareEngineer
@SajidAliSoftwareEngineer 4 ай бұрын
TUMX is a super utility for managing multiple pans. what terminal are using in the video
@devopstoolbox
@devopstoolbox 4 ай бұрын
Definitely! I’m running Wezterm, which BTW has its own multiplexing capabilities. But Tmux is portable and can do anything :)
@SajidAliSoftwareEngineer
@SajidAliSoftwareEngineer 4 ай бұрын
@@devopstoolbox can you please share your wezterm config file
@vencler
@vencler 4 ай бұрын
Have you tried Zellij, how does it compare to tmux?
@maxisqt
@maxisqt 4 ай бұрын
He actually has a video on ZelliJ already, but seems like it’s not replaced tmux for him
@LKamii
@LKamii 4 ай бұрын
For tmux old timers like me, Zellij is just to different. It's great, but keybinds and everything is difficult to configure like tmux. I also have access to tmux remotely in my work so it's nice to know tmux with default key binds and just use that everywhere.
@mrcvry
@mrcvry 4 ай бұрын
The tmux commands also work in zellij. I love it so far. Probably good to know both.
@anasouardini
@anasouardini 4 ай бұрын
Aren't sessions like having multiple virtual desktops?
@devopstoolbox
@devopstoolbox 4 ай бұрын
Hmm, I suppose you can look at it this way. At the end of the day it's just a bunch of shells contained in another box
@emilnordgard5228
@emilnordgard5228 4 ай бұрын
Will you eventually make a discord or something?
@devopstoolbox
@devopstoolbox 4 ай бұрын
At some point I will :) Too much on my plate right now. I’m always available on Telegram or Twitter though (@devopstoolbox). When I’m ready for a community server I’ll create one!
@farzadmf
@farzadmf 4 ай бұрын
Wait, no mention of the repo URL in the description? 😆
@devopstoolbox
@devopstoolbox 4 ай бұрын
I don’t know what’s more worrying - me literally forgetting the one important link in the description, or you being the first one to notice after 6 hours LOL. Thanks BTW :)
@farzadmf
@farzadmf 4 ай бұрын
Yeah, I was like "interesting; let me check the github", and then "am I blind?? it should be here somewhere" 😅
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@farzadmf 🤦‍♂️🤣🤦‍♀️
@dillysluvu
@dillysluvu 4 ай бұрын
add which-key nvim on your nvim repo pls
@devopstoolbox
@devopstoolbox 4 ай бұрын
WDYM? To my dotfiles or something to do with this plugin?
@dillysluvu
@dillysluvu 4 ай бұрын
​@@devopstoolbox Lol! I'd be happy to use your Vim configuration, but it's a bit difficult for me since I'm not familiar with the commands. I was wondering if you could recommend adding a plugin to your dotfiles that might be helpful for beginners like myself?
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@dillysluvu ah, I don’t use which key but you can easily add it yourself :) My approach is learning the motions myself rather than relying on something to back me up
@darksinge
@darksinge 4 ай бұрын
The "native" session picker is pretty underwhelming. Love your simple approach of a small plugin that lives in your tmux config alongside other tmux plugins. Not sure what the comment about over-engineering is about, unless their definition of "over engineering" is coming up with a solution to a problem that involves writing code (heaven forbid). What I'm seeing is an excellent combination of popular, well maintained tools (fzf, zoxide, charm/glow, bat, tpm) that are neatly tied together with a few bash scripts.
@devopstoolbox
@devopstoolbox 4 ай бұрын
❤️🙏🏽
@74Bagas
@74Bagas 4 ай бұрын
i love sessions, separate my brain well
@shyampadia
@shyampadia 4 ай бұрын
i feel like josh's sesh does all of this and more. Also it exists outside of tmux which gives it the advantage of being fast and can run outside tmux
@devopstoolbox
@devopstoolbox 4 ай бұрын
Yeah the chain of events was Josh creating the t smart manager, which I took inspiration from to build this, and then he created sesh! Sesh is amazing, but an overkill for my requirements here. I like having it as a small plugin that runs inside my tmux server and lives there
@theIbraDev
@theIbraDev 3 ай бұрын
I only use tmux for sessions heh
@nickmills8476
@nickmills8476 4 ай бұрын
There’s already a session picker in tmux, prefix s. I use a simple fzf script for this with bat preview, which is marginally nicer than the built in picker. Your one looks marginally nicer than the script. However, I really don’t like visual clutter. The best way to reduce visual clutter is to keep the information in your brain. You really should know that session A is for project A’ etc, this eliminates the need for the preview. Of course, the ultimate session switcher would probably involve just hitting some keys and switching immediately without any fzf picker intermediate step. More reliance on memory leads to less reliance on visuals.
@dandogamer
@dandogamer 4 ай бұрын
Interesting thoughts, I have a similar view with using things like AI
@devopstoolbox
@devopstoolbox 4 ай бұрын
I get what you’re saying but there’s a bit of a conflict there for me - I’m relying on memory only once I figure a structure I like, the way there is with something I can work with to manage the structure for a while. Moreover, mostly people don’t think like you and I and this is partially for them. I know about the native session picket it’s mentioned in the video, but like you, I didn’t like it or the native bindings to cycle through sessions not to mention the lack of lifecycle basic management
@nickmills8476
@nickmills8476 4 ай бұрын
@@devopstoolbox I hear what you’re saying. Plug-in looks super cool by the way. Unfortunately, I couldn’t get the fzf-tmux pop up to work. I left an issue report. I also liked your idea of having permanent sessions for things like configuration. These type of permanent settings can be very useful. Keep up the good work ;-)
@nickmills8476
@nickmills8476 4 ай бұрын
I had fzf version 0.37.0, after upgrading to 0.46.1, it works. I'm going to give your plugin a try, gotta say, even after my talk of visual clutter, it's still better than what I currently have, by a long way. Now, to configure a session for configuring...
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@nickmills8476 thanks mate! I’ll get to all issues this week and updare
@74Bagas
@74Bagas 4 ай бұрын
come back here to comment. my man, thank you very much, i couldn't asking more. it is great, really great!!!
@joaomendoncayt
@joaomendoncayt 4 ай бұрын
zellij
@devopstoolbox
@devopstoolbox 4 ай бұрын
Haha. Zellij has a warm spot in my heart!
@kriscpg
@kriscpg 4 ай бұрын
I usually really like the things you showcase, but this one just feels really weird. I honestly can't think of a single usecase for using this over tmux-sessionizer. The whole idea is to have a way to get where you want to go as fast as possible, with as little overhead as possible in terms of cognitive load. What is the point of having a pretty window to show your sessions/windows instead of just fuzzy searching the name of a directory and pressing enter? Maybe it's just not my use case, but in general this feels extremely unnecessary. And about having to add a script to create sessions for you, I agree it would be better if this was a native feature, but I still think that a small 10-line script I can modify myself is WAY better than adding 7 different dependencies to my tmux configs.
@devopstoolbox
@devopstoolbox 4 ай бұрын
Ok so, yes not everyone going to like everything that’s ok 😎 The plugin is made by, and for, lots of different use cases. My process was starting by using the preview a lot until O got to a point where I know the names by heart and now it’s just about switching. So in a way, the plugin lets you grow the workflow with it, you start with learning wheels and over time you adjust (which is why you can configure the views and hide the preview by default). But also, other users don’t care about friction as much and do use the preview daily and that’s for them as well. Beyond everything, from time to time O actually do use it with a randomly created session that I can control from my plugin. Hope this explains things. Theres a reason why there are lots of tools, IDEs and hardware…
@RazoBeckett.
@RazoBeckett. 4 ай бұрын
I am always on up to date packages , #IUseArchBtw
Tmux From Scratch To BEAST MODE
12:44
DevOps Toolbox
Рет қаралды 101 М.
Tmux - что это и зачем? Обзор и урок tmux
9:51
Диджитализируй!
Рет қаралды 128 М.
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 38 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 55 МЛН
The Holy Grail of Neovim Git Integrations
13:28
DevOps Toolbox
Рет қаралды 32 М.
Настройка Tmux - использование, установка, плагины
18:37
Which PLUGIN IS THE BEST for Neovim/Git? (PRACTICAL EXAMPLES included)
8:32
Tech FUN-dementals
Рет қаралды 1,1 М.
My Neovim & Tmux Terminal Dev Workflow As A Principal Engineer
9:22
DevOps Toolbox
Рет қаралды 40 М.
I ignored this incredible Neovim plugin for years!
9:03
Tom on the Internet
Рет қаралды 8 М.
What the hell is Zellij?
8:00
typecraft
Рет қаралды 64 М.
Is Tmux DEAD? Zellij is the new multiplexer written in Rust
32:38
Mischa van den Burg
Рет қаралды 10 М.
Is Zellij the PERFECT Multiplexer? // Tmux Getting Dethroned!
13:06
DevOps Toolbox
Рет қаралды 35 М.
Everything Starts with a Note-taking System
21:23
Mischa van den Burg
Рет қаралды 194 М.
Save and Restore Tmux Sessions across Reboots with Tmux Resurrect
9:28
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 58 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 551 М.
EXEED VX 2024: Не өзгерді?
9:06
Oljas Oqas
Рет қаралды 47 М.
СТРАШНЫЙ ВИРУС НА МАКБУК
0:39
Кринжовый чел
Рет қаралды 1,5 МЛН
iPhone, Galaxy или Pixel? 😎
0:16
serg1us
Рет қаралды 825 М.