working zellij
This commit is contained in:
parent
5ec00a83b5
commit
449de3f702
11 changed files with 242 additions and 12 deletions
|
@ -96,10 +96,10 @@
|
|||
beets.enable = true;
|
||||
};
|
||||
editors = {
|
||||
emacs.enable = true;
|
||||
emacs.enable = false;
|
||||
helix.enable = true;
|
||||
kakoune.enable = true;
|
||||
neovim.enable = true;
|
||||
kakoune.enable = false;
|
||||
neovim.enable = false;
|
||||
};
|
||||
services = {
|
||||
pipewire.enable = true;
|
||||
|
|
|
@ -30,14 +30,15 @@
|
|||
system = {
|
||||
programs = {
|
||||
editors = {
|
||||
emacs.enable = true;
|
||||
neovim.enable = true;
|
||||
emacs.enable = false;
|
||||
neovim.enable = false;
|
||||
helix.enable = true;
|
||||
kakoune.enable = true;
|
||||
kakoune.enable = false;
|
||||
};
|
||||
discord.enable = true;
|
||||
firefox.enable = true;
|
||||
zathura.enable = true;
|
||||
zellij.enable = true;
|
||||
terminals = {
|
||||
foot.enable = true;
|
||||
kitty.enable = true;
|
||||
|
|
|
@ -73,6 +73,7 @@ in {
|
|||
playerctl
|
||||
polkit
|
||||
prismlauncher
|
||||
pulsemixer
|
||||
python3
|
||||
qbittorrent
|
||||
r2modman
|
||||
|
@ -104,6 +105,7 @@ in {
|
|||
wl-clipboard
|
||||
xdg-utils
|
||||
xournalpp
|
||||
yazi
|
||||
zapzap
|
||||
zip
|
||||
];
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
_: {imports = [./fish.nix ./nh.nix ./starship.nix ./beets.nix];}
|
||||
_: {
|
||||
imports = [
|
||||
./fish.nix
|
||||
./nh.nix
|
||||
./starship.nix
|
||||
./beets.nix
|
||||
./zellij
|
||||
];
|
||||
}
|
||||
|
|
44
modules/cli/zellij.nix
Normal file
44
modules/cli/zellij.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules.other.system) username;
|
||||
cfg = config.modules.system.programs.zellij;
|
||||
inherit (lib) mkIf;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
on_force_close = "quit";
|
||||
layout_dir = "${./layouts}";
|
||||
settings = {
|
||||
pane_frames = false;
|
||||
default_layout = "compact";
|
||||
ui = {
|
||||
pane_frames = {
|
||||
hide_session_name = true;
|
||||
rounded.corners = true;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
tab-bar.path = "tab-bar";
|
||||
status-bar.path = "status-bar";
|
||||
strider.path = "strider";
|
||||
compact-bar.path = "compact-bar";
|
||||
};
|
||||
|
||||
keybinds = {
|
||||
unbind = "Ctrl n";
|
||||
# resize = {
|
||||
# bind = "Ctrl n";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
47
modules/cli/zellij/default.nix
Normal file
47
modules/cli/zellij/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules.other.system) username;
|
||||
cfg = config.modules.system.programs.zellij;
|
||||
inherit (lib) mkIf;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
|
||||
enableFishIntegration = true;
|
||||
|
||||
settings = {
|
||||
layout_dir = "${./layouts}";
|
||||
on_force_close = "quit";
|
||||
pane_frames = false;
|
||||
default_layout = "compact";
|
||||
|
||||
ui = {
|
||||
pane_frames = {
|
||||
hide_session_name = true;
|
||||
rounded_corners = true;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
tab-bar.path = "tab-bar";
|
||||
status-bar.path = "status-bar";
|
||||
strider.path = "strider";
|
||||
compact-bar.path = "compact-bar";
|
||||
};
|
||||
|
||||
keybinds = {
|
||||
unbind = "Ctrl n";
|
||||
# resize = {
|
||||
# bind = "Ctrl n";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
127
modules/cli/zellij/layouts/system.kdl
Normal file
127
modules/cli/zellij/layouts/system.kdl
Normal file
|
@ -0,0 +1,127 @@
|
|||
// this is my custom "system" layout, loosely based on the official
|
||||
// zellij development layout - it's simplified for desktop use
|
||||
// and allows me to remain in a single workspace even when I'm
|
||||
// using a tiling window manager and am constrained to a single
|
||||
// workspace. It provides default tabs for media, file browsing
|
||||
// which should be everything that I need, but I may add more
|
||||
// in the future
|
||||
|
||||
layout {
|
||||
// define default tab layout
|
||||
default_tab_template {
|
||||
// tab bar on the top
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
|
||||
// child tabs and panes
|
||||
children
|
||||
|
||||
// status bar on the bottom
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
|
||||
// strider tab uses the strider plugin of zellij
|
||||
// which is similar to neovim's nvimtree
|
||||
// ...but slower and much less configurable
|
||||
tab_template name="strider_tab" {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
|
||||
// use the strider plugin on the left side of the screen
|
||||
// to achieve a nvim-tree like layout on the left 15% of
|
||||
// the terminal window - looks cool but is not flexible
|
||||
pane split_direction="Vertical" {
|
||||
pane size="15%" name="Filetree" {
|
||||
plugin location="zellij:strider"
|
||||
}
|
||||
children
|
||||
}
|
||||
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
|
||||
// define a template pane for the terminal
|
||||
// this once again imitates the neovim layout
|
||||
// by providing a terminal instance on the bottom
|
||||
// 25% of the screen that enters the z shell when
|
||||
// zellij starts - the exec duration for zsh matters
|
||||
// here as it'll repeat for each "tab" that exists
|
||||
pane_template name="term" {
|
||||
// horizontal split to place the terminal
|
||||
// on the bottom half of the screen like the
|
||||
// toggleterm neovim plugin
|
||||
pane split_direction="horizontal" {
|
||||
children
|
||||
pane command="fish" size="25%" name="Shell"
|
||||
}
|
||||
}
|
||||
|
||||
// create a "strider tab" for my system configuration
|
||||
// which is a tab that utilizes the strider tab template
|
||||
// that we have defined earlier, provides a file-tree
|
||||
// view in my system config directory, and opens flake.nix
|
||||
// with the $EDITOR variable - has focus, is the first tab
|
||||
strider_tab name="nichts" cwd="~/projects/nichts" focus=true {
|
||||
term split_direction="vertical" {
|
||||
// FIXME: edit does not open the file from cwd
|
||||
// instead opens a buffer named flake.nix in cwd
|
||||
// which should be the original flake.nix
|
||||
// but is not
|
||||
pane edit="./flake.nix" name="Flake"
|
||||
}
|
||||
}
|
||||
|
||||
// regular vertical tab that will open btop automatically for
|
||||
// viewing active processes in a standalone tab
|
||||
// more utilities can go here if seen necessary
|
||||
tab name="Processes" split_direction="vertical" {
|
||||
pane {
|
||||
// open btop in the home directory
|
||||
// doesn't really matter where you open it
|
||||
cwd "$HOME"
|
||||
command "btop"
|
||||
}
|
||||
}
|
||||
|
||||
// the media tab opens musikcube, the TUI music player
|
||||
// and pulsemixer for volume control across different
|
||||
// audio devices - this is split horizontally so that
|
||||
// the mixer covers less space on the screen, at the
|
||||
// bottom 35% of the active tab
|
||||
tab name="Media" split_direction="vertical" {
|
||||
// run musikcube in the Music directory
|
||||
// the CWD doesn't really matter as musikcube
|
||||
// is capable of binding to mpd daemon but
|
||||
// the music directory seemed suitable as
|
||||
// the working directory for the player
|
||||
pane split_direction="horizontal" name="Player" {
|
||||
pane {
|
||||
cwd "$HOME/Nextcloud/Media/Music"
|
||||
command "ncmpcpp"
|
||||
}
|
||||
}
|
||||
|
||||
// standalone pane for pulsemixer
|
||||
pane split_direction="horizontal" name="Mixer" {
|
||||
pane size="35%" {
|
||||
command "pulsemixer"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The last tab is a file browser that opens in the home directory
|
||||
// so that I may freely browse my files and open them using the XDG
|
||||
// specs when yazi can handle the file type.
|
||||
tab name="Files" split_direction="horizontal" name="Files" {
|
||||
pane {
|
||||
cwd "$HOME"
|
||||
command "yazi"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,12 +31,12 @@ in {
|
|||
];
|
||||
});
|
||||
settings = {
|
||||
theme = "catppuccin_mocha";
|
||||
# theme = "catppuccin_mocha";
|
||||
editor = {
|
||||
indent-guides.render = true;
|
||||
lsp.display-inlay-hints = true;
|
||||
line-number = "relative";
|
||||
mouse = false;
|
||||
mouse = true;
|
||||
bufferline = "multiple";
|
||||
soft-wrap.enable = true;
|
||||
lsp.display-messages = true;
|
||||
|
|
|
@ -14,6 +14,7 @@ in {
|
|||
zathura.enable = mkEnableOption "Zathura pdf viewer";
|
||||
nextcloud.enable = mkEnableOption "Nextcloud sync client";
|
||||
firefox.enable = mkEnableOption "Firefox web browser";
|
||||
zellij.enable = mkEnableOption "Zellij terminal multiplexer";
|
||||
|
||||
terminals = {
|
||||
foot.enable = mkEnableOption "Foot terminal emulator";
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
file_manager = "nautilus.desktop";
|
||||
media_player = "mpv.desktop";
|
||||
image_viewer = "imv.desktop";
|
||||
text_editor = "nvim.desktop";
|
||||
text_editor = "helix.desktop";
|
||||
terminal = "foot.desktop";
|
||||
in {
|
||||
environment.sessionVariables = {TERMINAL = "${terminal}";};
|
||||
|
|
|
@ -14,7 +14,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
autoEnable = false;
|
||||
homeManagerIntegration = {
|
||||
followSystem = true;
|
||||
autoImport = true;
|
||||
|
@ -77,7 +77,7 @@ in {
|
|||
home-manager.users.${username} = {
|
||||
stylix.targets = {
|
||||
btop.enable = true;
|
||||
helix.enable = false;
|
||||
helix.enable = true;
|
||||
dunst.enable = true;
|
||||
firefox.enable = true;
|
||||
foot.enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue