Is Tmux DEAD? Zellij is the new multiplexer written in Rust

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there one of my friends in my school Community asked me about zelich a terminal multiplexer based on Rust and um I I said here based on the title I think I might have some reactions so I'll make a video about it so I'm going to go through this video and see uh as mola here is already saying give me at least one reason why I should change my perfect t-x so I I I might have some some thoughts about this I'm U going but I'm going to go into this with an open mind I'm going to try not to have too many hot takes um we'll see maybe I will be pleasantly surprised I don't know so let's open the video about a tool that and I'm going to go to YouTube for that and um for that all the this this like already just appreciate how how nice this setting is like look up with the light and the quality like typecraft is such an amazing YouTuber if you haven't subscribed to him yet in fact I haven't subscribed to him yet oh my god I've been watching a few videos and I haven't even subscribed if you haven't subscribe yet subscribe to him now and let's go into the video cool kids are kind of using these days it's called zeage it is a terminal multiplexer that is set to rival t-o it has okay all righty that is that is a that is a very bold claim to make like I'm not saying he he's not making the claim he's saying it is said that it's to rival t-x and that's bold that's bold I you have my attention has awesome key bindings out of the box for creating a new pain creating another new pain moving amongst these pains talking about sessions managing your sessions searching through stuff on your pains it's amazing but how does it stack up with t-u we'll go over it this episode's about zeage or zel Z hold on a second how to pronounce zel zela ziga this episode's about ziga that's so funny zela stick around it'll be fun I like I like uh zeage zel J I like zel J better zal J it's called Z J now before we get into zeage and how it Stacks up against t-u I want to go over really quickly what zeage is you see zelig much like t-mo is a terminal multiplexer but what is a terminal multiplexer and why is it useful well let me demonstrate at least from a high level how this works so any user in a Unix like environment so let's create a user here really quick just a little stick figure this person has very little legs any user in a Unix environment when they open up a terminal they essentially have what's called a pseudo login to that terminal and in Unix environment you only have one pseudo login per terminal window so we can call this pseudo login now with a well is anybody else confused about the word pseudo here like pseudo in super user do s Udo pseudo and pseudo a terminal multiplexer like zeage or t-mo you can do some more interesting things so much like a regular terminal you have a single terminal pseudo login session but if you're using a terminal multiplexer from that terminal you can spawn multiple pseudo logins from one controlling terminal window this gives you some amazing stuff like the ability to run long running processes and then switch back to another window the ability to run like servers and then look in the same pain and the same window at your code there's a lot of cool stuff you can do here and so this yeah that's right I I use this when for example when I used to make um database dumps U for like multiple terabytes I would log into the VM start a t-m mark session and then I could detach from that session and just let it run in the background and then occasionally attach to the session and see how how the progress was it's it's super useful this is what's called a terminal multiplexer or for short TM and that is where the name tmu comes from this is also what zeage does except it claims to be a little bit more modern and userfriendly than t-mo so let's get into zeage now downloading zeage is really easy um it's available in home brew for Maco okay so the that's interesting that t-o is apparently regarded as not us user friendly that that's an interesting thought I'm going to keep in the back of my mind here go it's available in multiple distributions for Linux it's also available in Arch and I use Arch by the way so for me I would install this using my favorite package manager gigachad spotted Arch yay Arch Linux which is yay and I would install zeage and that's how it works pretty simple pretty straightforward now if we launch zeage we can see that we're presented with what looks like a pretty noisy screen but there's actually some really helpful information here you see at the bottom we have this sort of row of key bindings and if I hit one of these key bindings let's say contrl plus P for pain it puts me into a new mode you see that at the very bottom the key bindings have changed so now if I hit n which should give me a new pain that's exactly what it does contrl p to go into pain mode hit end to get a new Paine it's awesome this is a great way to have some awesome key binding discovery for your first time using zeage and what's really great is zeage comes with a t-x mode baked in so contrl B will get you into t-o mode which is great because that's the default key binding for t-o so if I do contrl B percent that'll give me a vertical split and if I do contrl B Double quote that'll give me a horizontal split excellent and if I hold okay so I'm happy to see it I was about to pause the video and go off on the key bindings because you don't want to unlearn the t-o key bindings like seriously you don't want to do that um even in t-o itself uh many people they reconfigure their tmox key bindings for example to resemble Vim navigation and one of the best advice I got when I got started out was to always stick with the default key bindings because when you find yourself on a system that does not have your configuration fell you're screwed you're really screwed you might as well not have learned t-x because you're completely useless and if you need to look up the key bindings uh every time you're going to lose a lot of time I hold down alt I can go left and right to switch between my panes control b c will create a new Pane and a new window which is exactly what it would do in t-o this is really really nice and it's a very easy way to sort of dip your toes into zeage the discovery of all the key bindings is really straightforward very simple and I like it a lot now let's talk about zeage and configuration you see on the documentation site for zage configuration is listed right off the bat and it's very easy to get started there's a simple command that will dump a pre-baked configuration that has all the configuration values into a configuration file and if you run that command you're left with a configuration that looks like this and you can see it's really easy where you want to change some values to get the right actions and the right feel that you want out of zeage this is really nice as well the configuration setup is I would say straightforward the second thing that I really love about zage is buil-in layouts layouts are something that I think are amazing for me when I start up a new project I want to be able to have a pain and then another pain on the side that has my server running maybe another paint up top just to run nerd fetch to show everyone I run Arch Linux by the way either way I love layouts and I love that zeage has these as a first class citizen they're built in you can create a layout the layout files are pretty self-explanatory as well and there's a lot of great documentation for layouts on the zeage website so okay that that's cool I I like I like that idea having being able to Define layouts in files where you define the the panes and what size they should open in so check that out if you're interested now to open up zeage with a predefined layout all you have to do is is pass the layout option to the zeage command and the layout option takes an argument which is the path of the layout file so mine is in config zelig layout. KDL and as you can see this opens up a new zeage instance with the layout that I laid out in my configuration file very straightforward very easy to use this is very promising one more thing that I absolutely love about zeage is session resurrection and okay well before we go into the next one I think that's actually an interesting an interesting thing about zelich um let me see so the thing is though like what I'm used to is that what I start up my PC I always start up a browser in my desktop number one I have my obsidian in number two and then when I switch to desktop number three I have my terminal open so I have always I have this terminal open and then on the top here you can see there's one uh one open and then I have I will just create new windows as I go along so it it doesn't happen often that I actually spawn a new tmok session I I always just have one tmok session open here at all times so if I close that now here here you see this tmok session has been open for 24 hours I have now closed it but I when I like when I start when I reboot my PC I switch to desktop number three I open up ality I press T and then my terminal is set up so I don't I don't really spawn sessions that often so I'm not sure how how useful a layout would be for me like I also don't need much more elaborate configuration than let let's say I go to my lab repo and here I am uh working on a deployment and then I would usually open up maybe Cube CTL here and um yeah have something watching but that's not necessarily something that I need to have configured out of the box like as a command like he was doing this zelich and then passing a flag but it it's really interesting that you would be able to just create an alias and as a matter of fact I do have an alias for NB so here I have a an alias this will this actually spawns a new t- Mar session it it splits it and then um it is uh opens a Newsfeed reader and now I can open up these and I can read it and I like it like this because then the content is centered in my screen instead of just opening it in this one so there is some one use case that I might have for it but it's definitely something interesting to consider and session management you can see in the documentation it lays it all out here for you but essentially if you run zeage and pass the list sessions argument you will have a list of all the sessions that you recently created even the ones that you exited it's great that this comes built in with t-o you need to use a Plugin or maybe even a couple of plugins to get this kind of functionality it's pretty great also you can manage your sessions from within zeage by looking at okay so I'm not sure if I'm really understanding that correctly like in in in the first my first impression is okay t-mo does this and it's not inefficient at all it's it's very user friendly like if I go here tmox LS here is my my current session and if I press contrl b d i detach from that and if I create a new one by just typing t-x I now have two sessions open so t-x LS you see now that I have one session here with two windows and there's one session here with zero windows and if I just do I just print something here and I can also just K Watch N1 Cube CTL get pods like now I have I have a process running in this here and you can see the counter that's gr and if I then control b d I'm detaching from that again tmox LS TMX attach session and then t0 now I'm back to this session again LS tmox LS there is this session here and just to make sure to that I'm not messing up so figlet cek w this is my cek w session contr b d TMax attach session T and then2 and now I'm back to the hello world session with the counter that's still going up so I'm not sure am I am I understanding this wrong let's see this kind of functionality it's pretty great also argument you will have a list of all the sessions that you recently created even the ones that you exited it's great that this comes built in with team out here for you but essentially if you run zeage and pass the list sessions argument you will have a list of all the sessions that you recently created even the ones that you exited it's great oh even the ones that you exit it so it will save the session even when you close it great that this comes built in with t-o you need to use a Plugin or maybe even a couple of plugins to get this kind of functionality it's pretty great also you can manage your sessions from within zeage by looking at the bottom line here and typing control o for session now if you hit W you can go into session manager and here are all the sessions that are currently running then you hit Tab and it'll go over to your exited sessions so you can resurrect any of these sessions whenever you want just like that pretty great now zeage is truly amazing it has really great features the mode system for hitting control and a button to go into a new mode is really interesting and I can see how it allows for a lot of powerful built-in features but for me I'm not sure if I'm ready to switch over to zeage okay okay I I think um me and Mr typecraft are on the same uh same page but but before I do that I I just wanted to yeah get clear on this then so then the difference is these are the actual just t-o sessions and and um I can attach to them it's very easy t0 but that's not what that's not the selling point of zel the the zel J is that you can resurrect sessions that you have exited and I think that's a very interesting interesting fact here um like I I don't I don't currently need that in my workflow because I'm very disciplined in like every day I I close my pains and I reopen them and I have a sort of a system that I always have my second brain in pain number one for easy reference and yes I at this moment I don't really have a use case of resurrecting sessions because like it's not never really that complicated it's basically my second brain it will be a coding project and a kubernetes cluster I have open that's it and I don't I don't I I currently don't need to resurrect them but let's let's keep all of the conclusions towards the end and see I'm interested in hearing his his take on switching over to zeage and that's mostly because I have an amazing setup with t-mo right now here's how it works if I open t-mo I can run a program like neovim I can then create a new Pane and with my t-mo key bindings and with a couple of plugins one for neovim one for t-mo I can easily navigate in between all of my panes with just one keystroke I'll make one more pane just to let you know how it looks by holding control I can hit k h and then L to go right and J to go this is what I was saying right right about unlearning t-mo key bindings oh oh oh typ craft go down these are the same key bindings for Vim if I have a Vim Paine I would go J and K to go down and up and then I can go L to go right into t-o t-o has seamlessly Blended in with neovim in terms of its paines and windows and for me this is the most powerful feature that I can use in t-o it's so ingrained in my muscle memory it's perfect for me I use it in my workflow every single day the problem with zeage is that you can't really do that because zeage has a system where hidden control goes into another mode it makes it really difficult to have seamless keybinds that go left to right now of course you can hold alt and go left and right but that's not really the same thing I like to have my neovim and my t-u perfectly configured together in harmony if you know how to do this in zeage please let me know because I'd be very interested but for now I think I'm going to use t-mo now if you like the t-mo setup that you saw here please subscribe because I got a whole entire course on t-o and hey thanks nerds all right awesome video like Mr typecraft much respect the the the quality of his image and how everything is set up it's just oh wonderful it's just a pleasure to watch however I am uh somewhat fiercely um how do I say this um I'm I'm against his like everybody needs to do what they feel is best for their workflow I'm not saying he should do do things differently but I would never um what what he was showing here buil-in features but for with with a couple of one more pain just to let you know how it looks by holding control I can hit k h and then L to go right and J to go down yeah so this is amazing in terms of local development workflow like I I I love what he is saying about seamlessly integrating t-o and neovim I think that's a really cool um way of approaching it and thinking about it like in in my mind it's just learning t-x well it it doesn't necessarily have to do anything to do with Vim with neovim you you could also have Nano open to the left one as long as you are able to navigate the pain smoothly that is the only thing that is um happening here so what he's describing is that he these are the same key bindings for is that you in in Vim you can have like uh let's see if I go I've just just open up a bicep file here and close this window so in Vim you can also do vsit like this you can you can have them here and then so for now when I have to switch to my Vim up here I have to do control b o and then neovim is configured to uh be able to switch between these by pressing contrl H and contrl L and what he has done is that he also switches between t-x with the same key bindings so fair enough I can see how that can um be smooth it it it saves a key binding but the big thing here is what if you are on a system that does not have these control HJ key pings configured and you might say like when when when are you when when do you encounter yourself in that situation well I recently did my ckss exam for example there are no Vim key bindings in your t-x over there it's just plain vanilla t-x that you have there and this is a super intense 2hour exam where you have to I passed by the way but where you have to solve tasks like extremely difficult tasks and many of them in two hours and speed is of the essence speed is of the is is extremely important in these kinds of exams so you need to be able to do Cube uh create role binding and then help and then have that open here and then be able to have this you see this here you have that for quick reference okay create Ro binding sa cluster roll and then you quickly write it like this and then oh you have to check if it was right so okay get roll bindings like this is really how this this exam is this this pace okay get roll binding okay next question the next question is to create a uh to create a service account K create sa how was that again sa do I need to uh have a name space with that I check it out no okay well let's I can't see it here K create sa and then grab for namespace and no it does no matches so then I know I have to search somewhere else like it's really this kind of pace in this situation you see how I'm switching between t-o Windows I'm splitting them I am opening them up I uh I I do it seamlessly and all with the the normal tmox key bindings and like this is of course a very extraordinary situation but if you are a kubernetes engineer if you are a serious operations person if you want to do these exams you need to know these key bindings you need to be able to be fast with t-x and you are not going to be memorizing how to configure this on your session I'm not even sure if you can configure this in these kinds of exams so I I love it that he has a a workflow like this that works for him and when you are only interested in in local development workflows do your thing go go ahead it's awesome but if you're a serious operations devops engineer who needs who will either need to do these exams or can find himself in very intense situations where you fixing problems on three clusters at a time then from several different jump hosts you might have to log into a VM from where you are managing your cluster well those VMS are just going to have the vanilla t-mo config so there is a very strong case in my opinion to have the vanilla t-mo key bindings down in the muscle memory without needing to think there is a huge case for this if you are a serious devops operations person in the cloud native world or in the the Linux Administration world for that matter now back to zeel zel J this is all related right like from what I see here I don't necessarily have a problem with using zelich because what what what he showed was that um the t-o key bindings work out of the box and um I am like at this point I'm I I am really not getting why I would why I would use zelich like if I'm using zelich and I'm using the default key tmox key bindings what do I get out of it first of all I thought this was his own configuration but apparently he said that um this it came like this out of the box this is way way too much noise for me way too much and I am not going to be learning a completely new set of key bindings and having modes in in your terminal multiplexer with pain mode and tab mode I I'm I'm never going to do that I'm I'm never going to do that I why would I ever want to learn something else than t-x but that's not a problem because he says it it's completely supported with the TMO scheme bindings okay great next then there is this resurrections uh um these layouts and this session uh Resurrection management those are some features that I I I would be interested in trying out I am definitely keeping those uh in the back of my mind um I'm going to evaluate my workflow and I'm going to see if I can have a genuine use case for myself like out of curiosity where I would want to be yeah if I have like my several sessions open if I want to have a command that I can run which will uh if I would say do zeage and then have my client name for example one one use case I would have is that I do zeage client name and then a new session opens I don't know if this would be nested in this terminal uh session or not I I I don't know but if then it would open the repo for that client that I'm working on and then loads an SSH key for example and it would it would U yeah open documentation that is relevant to that client then I I can see how this could be interesting to play around with again the way I do it now I like here I would have here I would have my second brain open and that's also my main entry point and from here I would go to here I have a shortcut for my my repost and then I'm I'm I'm already here so from here I can just open the code that I'm working on and if I need something else I can open my cluster so it literally takes me two seconds to get set up I I I don't think I would actually win a lot of using the layouts but I'm I'm certainly going to consider that and then there is the the session Resurrection stuff I don't know it's cool it's cool but I have never had the the thought of oh I wish I could respawn my my previous tmok session I'm always very careful on saving my my um my files and and knowing exactly what I'm doing there is at most going to be maybe a or vertical horizontal split here and then another vertical split like that so I'm I might be working on uh yeah say I'm working in my home lab here I have my my code and then I'm I'm pushing an update to one of my my apps here for example like I'm opening my my Ingress here and then down here I might have like um here FL flux And1 get customizations I would have this up here I would have this running and then maybe I I would split that with some maybe I would split that with just being able to describe some pots okay describe pod and then I would have my sle cast tracker pod for example or my my my DB production V one I I could do some things in here but this is at most what I would be running like I I don't have much more complex things than this and then I would have my o windows open like that and if I lose this if I detach from this and I forget about it and I can't attach to it boohoo it it really doesn't uh bother me as much but it is an interesting feature that I might consider sessions arum and then yeah you will have it is an interesting thing it is definitely interesting but I I really don't understand uh I really don't get why I would switch to this from t-o I know some very respectable people that actually use salich so yeah it's um apparently it does something good for them but I am um I'm sticking with my my good old uh trusty t-o mostly because when I find myself in intense situations I know what to do and like I described with this recent situation where the cks exam then this gos for cka ckad d and cks and probably more exams in the future are going to be of this practical nature where you're doing stuff in the terminal in t-o and um that is my number one reason for not for sticking with t-mo sticking with the basics if it works why change it so all right that was my my take on this and uh I'm going to keep it in the back of my mind but I don't it will it will take a lot for me to move away from my trusted loving t-mo thank you so much for watching and see you in the next one
Info
Channel: Mischa van den Burg
Views: 4,524
Rating: undefined out of 5
Keywords: command line, linux, macos, terminal, alacritty, productivity, focus, distraction-free, workflow, terminal workflow, coder, hacker, efficiency, second brain, devops engineer, devops, bash, scripts, unix, unix philosophy, vim, neovim, automation, automate everything, coding, programming, hugo, blog, content creation, writing, share your work, zettelkasten, writer, markdown, self hosted, git, github, telescope, rust, zellij, tmux
Id: wB2Q5qHdcbc
Channel Id: undefined
Length: 32min 38sec (1958 seconds)
Published: Sat Apr 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.