Skip to content

Commit

Permalink
Merge pull request #230 from zellij-org/version-0.40.0-docs-and-post
Browse files Browse the repository at this point in the history
docs and blog post for the new version
  • Loading branch information
imsnif authored Apr 16, 2024
2 parents bcc7a9c + 0f8307a commit b1deefb
Show file tree
Hide file tree
Showing 147 changed files with 10,686 additions and 2,198 deletions.
104 changes: 104 additions & 0 deletions content/news/welcome-screen-pipes-filepicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
author: "Aram Drevekenin"
authorlink: "https://hachyderm.io/@imsnif"
date: 2024-16-04
linktitle: "Zellij 0.40.0: Welcome Screen, Filepicker, Pipes, Plugin Aliases"
type:
- post
- posts
title: "Zellij 0.40.0: Welcome Screen, Filepicker, Pipes, Plugin Aliases"
type:
images: ["/img/welcome-screen-preview.png"]
description: "A new welcome screen to facilitate session management, a new filepicker, a powerful new concept called pipes and lots of long awaited features"
alttext: "An image of the Zellij welcome screen with the Zellij filepicker opened to select the location of the session"
weight: 10
---
{{<figure src="/img/welcome-screen-preview.png" width="800px;" alt="An image of the Zellij welcome screen with the Zellij filepicker opened to select the location of the session">}}
Zellij 0.40.0 has just been released! [Grab it while it's hot!](https://github.com/zellij-org/zellij/releases/tag/v0.40.0)

Some highlights:
- [Welcome Screen](#welcome-screen)
- [New Filepicker](#new-strider--filepicker)
- [Pipes](#pipes)
- [Open Floating Panes at Specific Coordinates](#open-floating-panes-at-specific-coordinates)
- [Rearrange Tabs](#rearrange-tabs)
- [Disconnect other Clients](#disconnect-other-clients)
- [Plugin Aliases](#plugin-aliases)
- [New Possible Keys to Bind](#new-possible-keys-to-bind)
- [Start session in the background](#start-session-in-the-background)
- [Performance Improvements](#performance-improvements)
- [Do you like Zellij?](#do-you-like-zellij-) ❤️

## Welcome Screen
{{<figure src="/img/welcome-screen.gif" width="800px;" alt="A demo of the Zellij welcome screen">}}
This new release introduces the "welcome screen". The welcome screen is a friendly menu, intended to be run on terminal startup and allow users to either:
1. Start a new session (optionally with a specific name or in a chosen folder)
2. Attach to a running session
3. Resurrect an exited session

Learn more about [session management](/tutorials/session-management).

## New Strider / Filepicker
{{<figure src="/img/filepicker-demo.gif" width="800px;" alt="A demo of the Zellij filepicker fuzzy finding files and opening them in vim, then finding folders and opening a terminal in their location.">}}
This release includes a complete rework of Zellij's built-in filepicker, Strider. The filepicker allows users to quickly browse through their filesystem, opening files in their default editor in new Zellij panes or opening a terminal in a specific location.

With the help of [pipes](#pipes), one can use this filepicker to interactively choose a file or folder in the filesystem and pipe the result to another command through a traditional shell pipe. For example:

```bash
zpipe filepicker | xargs -i cp {} my-chosen-file
```

The filepicker can also be used from within other plugins to offload filepicking functionality rather than have the plugin implement it on its own. In fact, this is exactly what the welcome screen does in the example at the top of this post.

Learn more about [the filepicker](/tutorials/filepicker).

## Pipes
Zellij pipes are a new way to send messages to plugins and allow plugins to communicate with each other.

Messages can be sent to plugins through the CLI: (eg. `zpipe my-plugin hi!`), from a keybinding or indeed from another plugin. A destination plugin that does not exist will be loaded on the first pipe message.

Pipes also integrate seamlessly with existing shell pipes, providing flow control and giving plugin authors the ability to visualize data from the command line, allow users to pause a command line pipe mid-stream on certain messages or on a keystroke. We believe this functionality will help utilize the full 2 dimensions of the terminal window as never before, popping up floating panes in certain conditions and creating a many-to-many windowed pipeline. We look forward to seeing what plugin authors come up with!

[Learn more about Pipes](/documentation/plugin-pipes.html)

## Open Floating Panes at Specific Coordinates
A much requested feature after the introduction of floating panes, was to be able to open floating panes at specific coordinates and at specific sizes. Ths is now possible from the CLI, from plugins or from a keybinding (either with fixed numbers or percentage of the viewport):

```sh
zellij run --floating --width 50 --height 20% -x 10% -y 50% -- htop
```

## Rearrange Tabs
Thanks to a community contribution, it's now possible to change the position of tabs. One can move the active tab left or right, by default with `Alt i` or `Alt o`.

## Disconnect other Clients
Zellij, as a true multiplayer application, allows more than one user to attach to a running session. When this happens, each user gets their own cursor and the UI indicates in which pane or tab they are focused.

Since by necessity the smallest screen width/height is used in such cases, it is sometimes desirable to log out other users from the session.

This is now possible through the `session-manager`: `Ctrl o` to open the session manager, and then `Ctrl x` to disconnect other users.

## Plugin Aliases
This version introduces "Plugin Aliases" which are a way to shorten the long plugin URLs (eg. `https://example.com/my-plugin.wasm`, or `file:/home/aram/code/plugin/my-plugin.wasm`) to something more memorable (eg. `filter` or `filepicker`). These aliases can be defined in the [configuration file](/documentation/configuration.html), and used wherever plugin URLs can be used: to launch plugins from the CLI, from layouts or from other plugins.

Aliases can also be a convenient way to swap in the built-in plugins for a custom implementation (eg. using the excellent [zjstatus](https://github.com/dj95/zjstatus), instead of the built-in `compact` bar). Indeed, the `filepicker` described above is an internal alias for the built-in `Strider` plugin, and can be swapped out for a custom implementation of the filepicker using the same [contract](/documentation/filepicker-alias.html).

Read more about [Plugin Aliases](/documentation/plugin-aliases.html).

## New Possible Keys to Bind
Thanks to some community contributions, it is now possible to bind `Ctrl`/`Alt` + Function keys (eg. `Ctrl F1`), as well as `Ctrl Space`. We as Zellij maintainers are aware that colliding keybindings are a big problem for many users and intend to fully and finally address this issue in the next version after this one.

## Start session in the background
nother much requested feature was added in this release: it's now possible to start a new Zellij session in the background with the new `zellij attach --create-background` flag.

## Performance Improvements
This version introduces two major performance improvements:
* Line wrapping of extremely long (10M+) lines is now significantly faster thanks to a community contribution.
* Rendering of full-screen terminal applications is now much smoother thanks to the implementation of CSI 2026 (synchronized renders) in those terminals that support it.

## Do you like Zellij? ❤️
Me too! So much so that I spend 100% of my time developing and maintaining it and have no other income.

Zellij will always be free and open-source. Zellij will never contain ads or collect your data.

So if the tool gives you value and you are able, please consider [a recurring monthly donation](https://github.com/sponsors/imsnif) of 5-10$ to help me pay my bills. There are Zellij stickers in it for you!
12 changes: 12 additions & 0 deletions content/screencasts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ Finally, we'll talk about editing a pane's scrollback with our own `$EDITOR`
This tutorial walks you through creating Zellij [layouts](/documentation/creating-a-layout.html) to automate tasks and workflows.

Layouts describe a pre-defined set of panes and tabs with different terminals, commands and plugins. They can be great to automate and formalize workflows and tasks.

### [Session Management](/tutorials/session-management)
[{{<figure src="/img/tutorial-3-preview.png" style="max-width 995px;">}}](/tutorials/session-management)
Do you find yourself jumping between tasks a lot?

When using the terminal, we often open new terminal windows for different tasks, ending up with a mess of open terminals. This can lead to difficulty and overhead when switching contexts: we often end up searching for commands through our shell history, keeping complex notes and having to rebuild our environment every time we return to a task. Zellij can solve these problems and more for us with the `session-manager` and `welcome-screen`.

### [Filepicker](/tutorials/filepicker)
[{{<figure src="/img/tutorial-4-preview.png" style="max-width 995px;">}}](/tutorials/filepicker)
Stop wasting time traversing through your filesystem manually!

Use the Zellij filepicker to get a dynamic file exploration experience, complete with fuzzy-finding and autocompletion right in your terminal.
8 changes: 7 additions & 1 deletion content/tutorials/basic-functionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ You need not be a terminal developer to benefit from this tutorial.
- [Using Floating Panes](#using-floating-panes)
- [Starting Command Panes from the CLI](#starting-command-panes-from-the-cli)
- [Editing Pane Scrollback with your own $EDITOR](#editing-the-scrollback-with-your-own-editor)
- [Do you like Zellij?](#do-you-like-zellij-)

## Getting Started
{{<figure src="/img/tutorial-1-getting-started.png" class="center" style="max-width 995px;" alt="An image of Zellij running inside a terminal with vim open to the main.rs file of the project.">}}
Expand Down Expand Up @@ -77,4 +78,9 @@ Then, let's save the resulting lines to a different file (in vim: `:s /tmp/my-ot
## Finally
Here we learned the very basics of Zellij usage. Be they classic multiplexer features such as splitting panes or slightly more advanced workspace features such as managing Command Panes and editing scrollback.

If you liked this tutorial, consider starring us on [*Github*](https://github.com/zellij-org/zellij) or following us [*Twitter*](https://twitter.com/Zellij_dev).
## Do you like Zellij? ❤️
Me too. So much so that I spend 100% of my time developing and maintaining it and have no other income.

Zellij will always be free and open-source. Zellij will never contain ads or collect your data.

If the tool gives you value and you are able, please consider [a recurring monthly donation](https://github.com/sponsors/imsnif) of 5-10$ to help me pay my bills. There are Zellij stickers in it for you!
94 changes: 94 additions & 0 deletions content/tutorials/filepicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: "The Zellij Filepicker"
images: ["/img/tutorial-4-preview.png"]
description: "How to use Zellij to manage your sessions in the terminal"
linktitle: "How to use Zellij to manage your sessions in the terminal"
---
{{<video-left-aligned "/video/filepicker.mp4">}}

This tutorial shows how to use the Zellij filepicker, also known as Strider.

*The video screencast and the tutorial contain the same content, with the video screencast also containing some concrete examples of the subject material for inspiration.*

## Why use the Zellij filepicker?
The Zellij filepicker is a built-in plugin that will allow you to dynamically traverse your filesystem, optionally using fuzzy finding to look for files or folders in a deterministic way. It's much faster than doing the usual cycle of "cd", "ls", look for folder, "cd" and "ls" again.

It's also versatile: you can launch the filepicker directly and close it once you've chosen a file, you can keep it open to open multiple files and you can even insert it into traditional shell pipelines to pipe your chosen path into a different command.

## What we'll cover
- [Basic usage of the filepicker](#basic-usage-of-the-filepicker)
- [How to launch the filepicker through a keybinding](#how-to-launch-the-filepicker-through-a-keybinding)
- [How to launch the filepicker from the command line](#how-to-launch-the-filepicker-from-the-command-line)
- [How to get an IDE-like experience with the filepicker](#how-to-get-an-ide-like-experience-with-the-filepicker)
- [How to pipe the filepicker's output to another command](#how-to-pipe-the-filepickers-output-to-another-command)
- [Do you like Zellij?](#do-you-like-zellij-)

## Basic usage of the filepicker
{{<figure src="/img/tutorial-4-preview.png" style="max-width 995px;" alt="An image of Zellij filepicker.">}}
When launching the filepicker, it will start in the working directory of the focused pane. We are presented with a list of the files and folders, allowing us to traverse through them with the arrow keys, backspace and tab.

When we select a file or folder (either with the right arrow or with `<TAB>`), it will be added to our `PATH:`. When we press `<ENTER>`, the filepicker will open whatever is in the `PATH:` either in our default editor if it's a file or open a terminal to this location if it's a folder.

We can toggle hidden files on and off with `Ctrl e`.

## How to launch the filepicker through a keybinding
To launch the filepicker through a keyboard shortcut, we'll need to add the following lines (starting from `bind`) to the `shared_except "locked"` section of our `keybindings` in the [configuration file](/documentation/configuration.html).

For more info, please see [configuring keybindings](/documentation/keybindings.html).

```javascript
shared_except "locked" {
// ...
bind "Alt f" {
LaunchPlugin "filepicker" {
// floating true // uncomment this to have the filepicker opened in a floating window
close_on_selection true // comment this out to have the filepicker remain open even after selecting a file
};
}
}
```

## How to launch the filepicker from the command line
To launch the filepicker from the command line:
```bash
zellij plugin -- filepicker
```

## How to get an IDE-like experience with the filepicker
{{<figure src="/img/tutorial-4-ide-like.png" style="max-width 995px;" alt="An image of Zellij filepicker opened on the side, similar to an IDE.">}}
We can get an "IDE-like" experience of having the filepicker always open on the side by using the "strider" built in layout.

We can either start a session with it from the command line:
```bash
zellij -l strider
```

Start a session with it through the [welcome screen](/tutorials/session-management).

Or, we could open a new tab with it in an existing session:
```bash
zellij action new-tab -l strider
```

## How to pipe the filepicker's output to another command
We can also pipe the output of the filepicker - our chosen file or folder - into another command with a traditional CLI pipeline.

To do this, we launch the filepicker through the `zpipe` alias (or using `zellij pipe`):
```bash
zpipe filepicker
zellij pipe -p filepicker
```
This will open the filepicker, allowing us to choose a file or folder. Once we press `<ENTER>`, the filepicker will close and print our chosen path to `STDOUT`. This means that we can use it to select paths dynamically and send them to other commands, for example:

```bash
zpipe filepicker | xargs -i cp {} my-chosen-file
```
This will open the filepicker so that we can select a file and then copy this file to `my-chosen-file` in our local directory.


## Do you like Zellij? ❤️
Me too. So much so that I spend 100% of my time developing and maintaining it and have no other income.

Zellij will always be free and open-source. Zellij will never contain ads or collect your data.

If the tool gives you value and you are able, please consider [a recurring monthly donation](https://github.com/sponsors/imsnif) of 5-10$ to help me pay my bills. There are Zellij stickers in it for you!
8 changes: 8 additions & 0 deletions content/tutorials/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The layout we're creating is for a default Rust project. Rust is used as an exam
- [Edit and Command Panes](#edit-and-command-panes)
- [Changing Pane Orientation](#changing-pane-orientation)
- [Avoiding Repetition with Pane Templates](#avoiding-repetition-with-pane-templates)
- [Do you like Zellij?](#do-you-like-zellij-)

## Getting Started
To follow along, you can clone [the repository](https://github.com/imsnif/zellij-screencast-2).
Expand Down Expand Up @@ -221,3 +222,10 @@ layout {

## Conclusion and Further Reading
Here we learned how to create a basic layout to facilitate working with a Rust project through the terminal. There are plenty additional layout features to explore, such as tabs, tab_templates and cwd composition. Check out more in the [official docs](/documentation/creating-a-layout.html).

## Do you like Zellij? ❤️
Me too. So much so that I spend 100% of my time developing and maintaining it and have no other income.

Zellij will always be free and open-source. Zellij will never contain ads or collect your data.

If the tool gives you value and you are able, please consider [a recurring monthly donation](https://github.com/sponsors/imsnif) of 5-10$ to help me pay my bills. There are Zellij stickers in it for you!
Loading

0 comments on commit b1deefb

Please sign in to comment.