<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Zellij</id>
	<title>Zellij - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Zellij"/>
	<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Zellij&amp;action=history"/>
	<updated>2026-06-21T03:07:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=Zellij&amp;diff=32614&amp;oldid=prev</id>
		<title>Debtquity: zellij: init</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Zellij&amp;diff=32614&amp;oldid=prev"/>
		<updated>2026-06-09T14:14:41Z</updated>

		<summary type="html">&lt;p&gt;zellij: init&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[https://zellij.dev/ Zellij] is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. Zellij may be detached from a screen and continue running in the background, then later reattached.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
==== Shell ====&lt;br /&gt;
To temporarily use zellij in a shell environment without modifying your system configuration, you can run:&lt;br /&gt;
{{Code|$ nix-shell -p zellij|lang=bash}}&lt;br /&gt;
This makes the zellij available in your current shell. You can then launch zellij by typing &amp;lt;code&amp;gt;zellij&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
{{nixos:package|zellij}} can be configured using [[Home Manager]]:&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
{{File|3=programs.zellij = {&lt;br /&gt;
  enable = true;&lt;br /&gt;
  # automatically start zellij when opening a new terminal&lt;br /&gt;
  enableBashIntegration = true;&lt;br /&gt;
  enableFishIntegration = true;&lt;br /&gt;
  enableZshIntegration = true;&lt;br /&gt;
&lt;br /&gt;
  # zellij uses KDL as its configuration language,&lt;br /&gt;
  # see also https://zellij.dev/documentation/configuration.html&lt;br /&gt;
  settings = {&lt;br /&gt;
    theme = &amp;quot;custom&amp;quot;;&lt;br /&gt;
    themes.custom.fg = &amp;quot;#ffffff&amp;quot;;&lt;br /&gt;
    keybinds._props.clear-defaults = true;&lt;br /&gt;
    keybinds.pane._children = [&lt;br /&gt;
  };&lt;br /&gt;
  # extra settings as a raw string&lt;br /&gt;
  # they are appended to the end of the file&lt;br /&gt;
  extraConfig = &amp;#039;&amp;#039;&lt;br /&gt;
    keybinds {&lt;br /&gt;
        pane {&lt;br /&gt;
            bind &amp;quot;h&amp;quot; &amp;quot;Left&amp;quot; { MoveFocus &amp;quot;Left&amp;quot;; }&lt;br /&gt;
            bind &amp;quot;l&amp;quot; &amp;quot;Right&amp;quot; { MoveFocus &amp;quot;Right&amp;quot;; }&lt;br /&gt;
            bind &amp;quot;j&amp;quot; &amp;quot;Down&amp;quot; { MoveFocus &amp;quot;Down&amp;quot;; }&lt;br /&gt;
            bind &amp;quot;k&amp;quot; &amp;quot;Up&amp;quot; { MoveFocus &amp;quot;Up&amp;quot;; }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
  &amp;#039;&amp;#039;;&lt;br /&gt;
};|name=/etc/nixos/home-configuration.nix|lang=nix}}&lt;br /&gt;
&lt;br /&gt;
==== Using Plugins ====&lt;br /&gt;
&lt;br /&gt;
Zellij offers a WebAssembly / WASI plugin system, allowing plugin developers to develop plugins in many different languages.&lt;br /&gt;
Plugins can be configured using &amp;lt;code&amp;gt;programs.zellij.plugins&amp;lt;/code&amp;gt;. In nixpkgs, they can be found in the [https://search.nixos.org/packages?type=packages&amp;amp;query=zellijPlugins zellijPlugins] namespace.&lt;br /&gt;
&lt;br /&gt;
{{file|/etc/nixos/home-configuration.nix|nix|&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
programs.zellij = {&lt;br /&gt;
  enable = true;&lt;br /&gt;
  plugins = with zellijPlugins; [ vim-zellij-navigator ];&lt;br /&gt;
  settings ={&lt;br /&gt;
    plugins = {&lt;br /&gt;
      vim-zellij-navigator = {&lt;br /&gt;
        vim_commands = &amp;quot;v|nvim|vim|testNvim&amp;quot;;&lt;br /&gt;
      };&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
  extraConfig = &amp;#039;&amp;#039;&lt;br /&gt;
    keybinds {&lt;br /&gt;
        shared_among &amp;quot;normal&amp;quot; &amp;quot;locked&amp;quot; &amp;quot;scroll&amp;quot; {&lt;br /&gt;
            bind &amp;quot;Ctrl j&amp;quot; {&lt;br /&gt;
                MessagePlugin &amp;quot;vim-zellij-navigator&amp;quot; {&lt;br /&gt;
                    name &amp;quot;move_focus&amp;quot;;&lt;br /&gt;
                    payload &amp;quot;down&amp;quot;;&lt;br /&gt;
                };&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
  &amp;#039;&amp;#039;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This will generate &amp;lt;code&amp;gt;~/.config/zellij/config.kdl&amp;lt;/code&amp;gt;, with something like this:&lt;br /&gt;
&lt;br /&gt;
{{file|~/.config/zellij/config.kdl|kdl|&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
load_plugins {&lt;br /&gt;
	vim-zellij-navigator&lt;br /&gt;
}&lt;br /&gt;
plugins {&lt;br /&gt;
	vim-zellij-navigator location=&amp;quot;file:/home/perchun/.config/zellij/plugins/vim-zellij-navigator.wasm&amp;quot; {&lt;br /&gt;
		vim_commands &amp;quot;v|nvim|vim|testNvim&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// extraConfig&lt;br /&gt;
&lt;br /&gt;
keybinds {&lt;br /&gt;
    shared_among &amp;quot;normal&amp;quot; &amp;quot;locked&amp;quot; &amp;quot;scroll&amp;quot; {&lt;br /&gt;
        bind &amp;quot;Ctrl j&amp;quot; {&lt;br /&gt;
            MessagePlugin &amp;quot;vim-zellij-navigator&amp;quot; {&lt;br /&gt;
                name &amp;quot;move_focus&amp;quot;;&lt;br /&gt;
                payload &amp;quot;down&amp;quot;;&lt;br /&gt;
            };&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Packaging Plugins ==&lt;br /&gt;
&lt;br /&gt;
All plugins are packaged in the &amp;lt;code&amp;gt;pkgs/by-name/ze/zellij/plugins/&amp;lt;/code&amp;gt; folder. Currently, only Rust plugins are packaged, but if you figure out how to package other languages, contributions are welcome.&lt;br /&gt;
&lt;br /&gt;
To add a new plugin, you can just use [https://github.com/nix-community/nix-init nix-init] like this:&lt;br /&gt;
&lt;br /&gt;
{{file|||&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ nix-init pkgs/by-name/ze/zellij/plugins/rust/my-plugin-name.nix&lt;br /&gt;
Enter url&lt;br /&gt;
❯ https://github.com/hello/my-plugin-name&lt;br /&gt;
Enter tag or revision (defaults to v0.1.0)&lt;br /&gt;
❯ v0.1.0&lt;br /&gt;
Enter version&lt;br /&gt;
❯ 0.1.0&lt;br /&gt;
Enter pname&lt;br /&gt;
❯ my-plugin-name&lt;br /&gt;
How should this package be built?&lt;br /&gt;
❯ buildRustPackage - cargoHash&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If the repository name starts with &amp;lt;code&amp;gt;zellij&amp;lt;/code&amp;gt;, you should omit it in the actual package name. &amp;lt;code&amp;gt;zellijPlugins.autolock&amp;lt;/code&amp;gt; looks better than &amp;lt;code&amp;gt;zellijPlugins.zellij-autolock&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After you have generated the initial definition file, remove all dependencies that were automatically set by nix-init. They are not needed when compiling a WASM binary. If the plugin depends on something at runtime, read the next section.&lt;br /&gt;
&lt;br /&gt;
==== Specifying runtime dependencies ====&lt;br /&gt;
&lt;br /&gt;
Runtime dependencies are packages that will be used by the plugin inside a Zellij session. Those are specified in &amp;lt;code&amp;gt;passthru.runtimeDeps&amp;lt;/code&amp;gt; attribute from &amp;lt;code&amp;gt;pkgsBuildBuild&amp;lt;/code&amp;gt; attrset.&lt;br /&gt;
&lt;br /&gt;
Since we compile all plugins for WASI, everything that the plugin gets as derivation arguments is also compiled for WASI. Some packages (for example &amp;lt;code&amp;gt;coreutils&amp;lt;/code&amp;gt;) might not be available on WASI, so we need to use &amp;lt;code&amp;gt;pkgsBuildBuild&amp;lt;/code&amp;gt; attrs set (which points to the user&amp;#039;s system).&lt;br /&gt;
&lt;br /&gt;
{{file|pkgs/by-name/ze/zellij/plugins/rust/jbz.nix|nix|&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# assume we build the plugin on an x86_64-linux machine&lt;br /&gt;
{&lt;br /&gt;
  lib,&lt;br /&gt;
  fetchFromGitHub,&lt;br /&gt;
  rustPlatform,&lt;br /&gt;
&lt;br /&gt;
  # these will be compiled for WASI, not x86_64-linux!&lt;br /&gt;
  just,&lt;br /&gt;
  bacon,&lt;br /&gt;
  # but pkgsBuildBuild points to x86_64-linux&lt;br /&gt;
  pkgsBuildBuild,&lt;br /&gt;
}:&lt;br /&gt;
rustPlatform.buildRustPackage (finalAttrs: {&lt;br /&gt;
  pname = &amp;quot;jbz&amp;quot;;&lt;br /&gt;
  version = &amp;quot;0.39.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  src = fetchFromGitHub {&lt;br /&gt;
    owner = &amp;quot;nim65s&amp;quot;;&lt;br /&gt;
    repo = &amp;quot;jbz&amp;quot;;&lt;br /&gt;
    tag = &amp;quot;v${finalAttrs.version}&amp;quot;;&lt;br /&gt;
    hash = &amp;quot;sha256-3n3Bv3YDb1+MYJTTAmMkIgGY7kX9IVUoDNV4c/n0Ydo=&amp;quot;;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  cargoHash = &amp;quot;sha256-U+P2LlhmXwaZy2a2eigrg545HTuV1T01jZfUOEUQ5+w=&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  # specify runtime dependencies here&lt;br /&gt;
  passthru.runtimeDeps = with pkgsBuildBuild; [&lt;br /&gt;
    bacon&lt;br /&gt;
    just&lt;br /&gt;
  ];&lt;br /&gt;
&lt;br /&gt;
  meta = {&lt;br /&gt;
    description = &amp;quot;Display your Just commands wrapped in Bacon&amp;quot;;&lt;br /&gt;
    homepage = &amp;quot;https://github.com/nim65s/jbz&amp;quot;;&lt;br /&gt;
    changelog = &amp;quot;https://github.com/nim65s/jbz/releases/tag/${finalAttrs.src.tag}&amp;quot;;&lt;br /&gt;
    license = lib.licenses.mit;&lt;br /&gt;
    maintainers = with lib.maintainers; [ you ];&lt;br /&gt;
  };&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you are wondering why &amp;lt;code&amp;gt;pkgsBuildBuild&amp;lt;/code&amp;gt; is named like that, refer to [https://nixos.org/manual/nixpkgs/unstable/#possible-dependency-types the docs on cross-compilation].&lt;br /&gt;
&lt;br /&gt;
==== Overriding plugins ====&lt;br /&gt;
&lt;br /&gt;
Plugins use a wrapper for additional post-processing, like stripping unnecessary information from &amp;lt;code&amp;gt;pluginDrv.name&amp;lt;/code&amp;gt;. So naїve override won&amp;#039;t work, as it overrides the wrapper and not the plugin itself. Instead, you should override the unwrapped version and then pass that to the wrapper:&lt;br /&gt;
&lt;br /&gt;
{{file||nix|&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
final: prev: {&lt;br /&gt;
  zellijPlugins = prev.zellijPlugins // {&lt;br /&gt;
    # wrap our overrode package&lt;br /&gt;
    zjstatus = prev.zellijPlugins.wrapper &amp;quot;zjstatus&amp;quot; (&lt;br /&gt;
      # override unwrapped package&lt;br /&gt;
      prev.zellijPlugins.zjstatus.unwrapped.overrideAttrs (&lt;br /&gt;
        oldAttrs:&lt;br /&gt;
        let&lt;br /&gt;
          src = final.fetchFromGitHub {&lt;br /&gt;
            owner = &amp;quot;dj95&amp;quot;;&lt;br /&gt;
            repo = &amp;quot;zjstatus&amp;quot;;&lt;br /&gt;
            rev = &amp;quot;17609e498f88e674b846b844b48ad1dc545fddcf&amp;quot;;&lt;br /&gt;
            hash = &amp;quot;sha256-/LsFGF0BAYdiVVQZ/8vjo6IXuSsYS+ueIWHN47NHEAc=&amp;quot;;&lt;br /&gt;
          };&lt;br /&gt;
        in&lt;br /&gt;
        {&lt;br /&gt;
          version = &amp;quot;0-unstable-2026-06-03&amp;quot;;&lt;br /&gt;
          inherit src;&lt;br /&gt;
&lt;br /&gt;
          # override cargoHash if it is needed&lt;br /&gt;
          cargoDeps = final.rustPlatform.fetchCargoVendor {&lt;br /&gt;
            inherit src;&lt;br /&gt;
            hash = &amp;quot;sha256-+UYNIPrRYUYwxHk227PDo5vdAqho8SMm80o7UqSdZ3g=&amp;quot;;&lt;br /&gt;
          };&lt;br /&gt;
        }&lt;br /&gt;
      )&lt;br /&gt;
    );&lt;br /&gt;
  };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://zellij.dev/documentation/ Zellij documentation]&lt;br /&gt;
&lt;br /&gt;
[[Category:CLI Applications]]&lt;/div&gt;</summary>
		<author><name>Debtquity</name></author>
	</entry>
</feed>