from Hacker News

Zellij: A terminal workspace with batteries included

by bruh2 on 2/5/24, 8:52 AM with 121 comments

  • by cracoucax on 2/5/24, 11:22 AM

    I've switched from tmux to zellij about 2 monthes, ago, it may have less features than tmux for now but it certainly does all i need, in most case better than tmux. It is much more user friendly and usable imo.

    Frankly i've spent too much time in the past fiddling with complex confs and tools which expect the user to spent days figuring out a conf which work for them. Then if you don't use the tool for 1 month, or simply don't edit the conf for a big while you've forgotten half of it.

    Zellij has a conf file, it took me a bit of time to tweak it at first, but i know I can understand it in a pinch. Same thing for actually using it, it's mostly discoverable.

    And most importantly, it is very clear that simplicity and predictability are big priorities. It shows everywhere in the project, I totally vouch this approach and tend to do the same thing on my work projects. I know from experience than understanding your user's needs and getting out of your way to make their life easy by not having to think about how the implementation is done is really much harder that just making a tool configurable and extensible...

    So, big kudos to you Zellij devs !

  • by keiferski on 2/5/24, 1:18 PM

    In case you were curious where the name comes from:

    Zellij (Arabic: الزليج, romanized: zillīj; also spelled zillij or zellige) is a style of mosaic tilework made from individually hand-chiseled tile pieces.

    https://en.wikipedia.org/wiki/Zellij

  • by INTPenis on 2/5/24, 12:30 PM

    Happy to see it, but unlike others in this thread I have no issue at all with Tmux.

    The way people are reacting to zellij is how I reacted going from screen to tmux. It was so much easier to understand and quickly get started doing advanced things in, compared to screen.

  • by eigenvalue on 2/5/24, 11:12 AM

    I’m always surprised to see that there are so many professional developers who never tried tmux and don’t really understand why a terminal multiplexer would be useful. I’m in tmux all day and it’s one of the first things I install on any box. I’ll check out Zellij, but it’s a high bar for me to switch.
  • by ayoisaiah on 2/5/24, 10:54 AM

    I switched from Tmux to Zellij ~2 months ago. What I like most about it is the floating panes feature that makes it really easy to create terminals for running stuff in the background without taking up space in the main window.
  • by frankjr on 2/5/24, 1:18 PM

    A killer feature for me is combining floating windows with "zellij run". It allows you to run a command but also re-run the command by pressing enter.

      zellij run --floating -- date
    
    This will open a new floating window with the result of the command (`date` in this case) and pressing enter will run it again. I use it for running tests (make some changes, show floating windows, press enter). Depending on your OS you might already have shell aliases such as zrf (run floating) or zr.

    https://zellij.dev/documentation/zellij-run

  • by dist1ll on 2/5/24, 10:56 AM

    Last time me and a coworker tried out Zellij (a few weeks ago), there was noticeable input lag compared to tmux. Used the most recent macOS release, running in alacritty w/ zsh. Anyone else had an experience like that? I think for terminal-based tooling like multiplexers, low latency should be a hard requirement.
  • by elashri on 2/5/24, 11:09 AM

    I like the name. It is related with one of the most beautiful art styles in my opinion [1]

    [1] https://en.m.wikipedia.org/wiki/Zellij

  • by jwr on 2/5/24, 1:15 PM

    I checked out Zellij a while ago, because it looked all shiny, but then realized that tmux (that I've been using for years) does everything that zellij does, except it is more widespread (runs on remote systems which are not the most recent versions) and better debugged. So I went back to using tmux. But at least I got motivated to learn more about tmux :-)
  • by weinzierl on 2/5/24, 1:14 PM

    No one said it so far:

    I find sandboxed plugins the killer feature.

    I trust the Debian maintainers and couple of teams and individuals (including Aram), but there is no way I can remotely build trust for the number of people needed to build a convenient tmux/nvim development environment. I really, really wish neovim would have a sandboxed plugin environment like this.

    [Goes without saying that the sandbox is not a replacement for trust and vice versa, but it would be a big step forward. What we are doing right now with plugins in this space is terribly dangerous.]

  • by imiric on 2/5/24, 11:59 AM

    This looks very interesting! It's great to see innovation in the terminal multiplexer space. tmux has held the crown for too long, and it's worth revisiting this space with modern approaches.

    I really like the concept of quickly hiding and showing a pane, and spawning it for a single command that can be easily repeated with Enter. Quick scrollback editing is great as well. I often do this manually in tmux with copy/paste, or re-running the command with `tee`, which is a bit cumbersome.

    One nitpick would be to have an option to minimize or remove the borders around panes. It's nice to have extra metadata around a pane, such as the CWD, but space is precious in terminals, and showing borders around every pane feels wasteful. Maybe this is already possible, I haven't looked at the docs yet. Will definitely give this a try soon.

    EDIT: Ah, kudos for the nice roadmap[1]! It seems this might already be planned as part of [2].

    [1]: https://zellij.dev/roadmap/

    [2]: https://github.com/zellij-org/zellij/issues/1400

  • by 0x1ceb00da on 2/5/24, 1:58 PM

    Unusable for me because of memory consumption. This ticket was closed but people on that thread are still complaining about memory leaks. https://github.com/zellij-org/zellij/issues/1625
  • by visysl on 2/5/24, 11:16 AM

    The main drawback for me is that its UI is not so much compact.
  • by 20after4 on 2/6/24, 4:35 AM

    So, I understand the value of tmux for detaching and restoring sessions. What I don't really understand is why I'd want to use something like this instead of tiling and managing sessions / windows / panes within my terminal emulator. Kitty has tremendous support for all kinds of features, including capturing and processing the output from commands, piping scrollback buffers to external commands, scrolling to previous command prompts, searching and highlighting output dynamically, and much more besides. The overlap is significant between tools like this and tools like kitty or iTerm. Am I missing some advantage in putting this functionality on the server rather than the client?
  • by epage on 2/5/24, 12:42 PM

    I switched when I added hyperlink support to cargo so I could use the feature. I am not a tmux power user.

    - Much easer to discover and use features

    - The default bindings made vim unbearable so I make tmux-like bindings.

    - The default color scheme is not great in light mode

    - Session restore is helpful though still has issues to be worked out

  • by csdvrx on 2/5/24, 1:41 PM

    After having spent too much time trying to get the simple https://github.com/csdvrx/sixel-tmux/ features into mainline tmux (last November https://github.com/tmux/tmux/issues/3753), maybe it'd be easier to jump ship as use zellij?

    Could anyone offer recommendations on "riced" zellij configuations, or just a demo where it shows doing with (say charts of disk usage per folder), watching a movie with mpv + keeping a vim to type on?

  • by tmerse on 2/5/24, 12:06 PM

    I like how easy zellij was to set up and it's capabilities to define new layouts as well as the default way of displaying contextual shortcuts that one can disable after one memorized the most important shortcuts.

    What I would still like to see is support for kitty image protocol [1] so I could use e.g. image.nvim [2] which currently works in tmux (which I migrated away from in favor of zellij).

    [1] https://github.com/zellij-org/zellij/issues/2814

    [2] https://github.com/3rd/image.nvim

  • by gloosx on 2/6/24, 7:45 AM

    Never in my life understood the people who invented terminal multiplexer to launch several copies of vim in different terminals. As much as you want, you can create tabs, terminals, floating windows, split panes and even recursively nested vims within a single instance of vim itself, like this: https://imgur.com/a/vUd9OOU

    Can someone explain why this is needed and how it's better that of vim's splits tabs and panes?

  • by p3t3 on 2/5/24, 1:53 PM

    In my opinion tmux has two shortcomings. The built in session manager is very limited(so I am using my own script instead). And the ability to save and restore sessions is achieved using two plugins that can take some time to wrap your head around and make them work.

    Zellij on the other started with the goal to be as user friendly as possible and basic tmux features(such as detach) were implemented very recently. There are too many elements on the screen, and each actions requires you to go into a "mode" which feels like unnecessary overhead after getting used to the way the modifier/prefix approach works in tmux. And I am more then fine with modes(I use neovim and emacs with evil keybindings) but when it comes to terminal multiplexer or window manger I feel a modifier provides less friction.

    When its all said and done and tmux is configured I feel I am getting a more fluent experience. Unlike vim and emacs I don't see a lot of distinction between tmux and Zellij and I don't see a many reasons to switch at the moment.

  • by dmd on 2/5/24, 2:21 PM

    I want to love Zellij, but it eats up way too many keybindings. Yes, I know about mode lock, but then it's an extra two or four keypresses for everything I want to do.

    I'd love Zellij with true tmux style keybindings - a single prefix key followed by a non-modified letter.

    With zellij, you have to unlock, do your zellij command, then lock again.

  • by fsniper on 2/5/24, 10:19 AM

    This looks cool. I will check this in a system admin perspective.
  • by mhd on 2/5/24, 11:28 AM

    Last time I tried it, it didn't add features I really felt would change my workflow, and the memory consumption was rather high.

    In general I notice a lot more resources used for terminal multiplexing, starting with GPU-focused terminal emulators (or even ones using Electron).

    Maybe I missed something, I probably could run screen + xterm and barely notice any difference. Almost getting a bit of FOMO here, but have yet to see e.g. a screencast that would make me envious.

  • by novagameco on 2/5/24, 11:19 AM

    It's always interesting to me to see CLI users who are so invested in their development environment that they end up recreating the GUI IDEs they so disdain. Like vim users who insist that Jetbrains or VS Code is unnecessary after they configure vim with syntax highlighting, code completion, and gdb support with breakpoints
  • by ahurmazda on 2/5/24, 2:00 PM

    I use terminal … a lot. Alas! These days it’s the terminal bundled with my IDE (intellij). I have multiple projects open and never really found a good workflow around terminals and IDE because I absolutely must use both.
  • by djaouen on 2/5/24, 12:18 PM

    This looks cool, but it looks like it’s geared towards vim users as it overrides some Emacs/readline keybindings. If I ever switch to vim, I will give it a try.
  • by yewenjie on 2/5/24, 12:21 PM

    I have been using Zellij since pretty much when they announced it, but it still lacks good plugins and a stronger ecosystem.
  • by totetsu on 2/5/24, 12:28 PM

    Am I a dinosaur for still using gnuscreen?
  • by dcchambers on 2/5/24, 3:04 PM

    Okay, okay. I've been a diehard tmux user for a decade, but I'll finally give this a try.
  • by daswerth on 2/5/24, 2:58 PM

    Can anyone compare Zellij with Byobu? Seems like it was the previous "new hotness".
  • by lchen_hn on 2/5/24, 5:31 PM

    I feel its memory leak issue should get more attention
  • by sesm on 2/5/24, 11:08 AM

    Reminds me of TempleOS window manager.