feat(zellij): add hostname to title bar
This commit is contained in:
parent
1ba47d2e85
commit
497e624db9
2 changed files with 63 additions and 52 deletions
|
@ -1,60 +1,14 @@
|
||||||
{
|
{
|
||||||
|
osConfig,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
config = lib.mkIf (config.cli.multiplexer == "zellij") {
|
config = lib.mkMerge [
|
||||||
home.sessionVariables.MULTIPLEXER = "zellij";
|
(lib.mkIf (config.cli.multiplexer == "zellij") (
|
||||||
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [ "/.cache/zellij" ];
|
import ./zellij.nix { inherit config pkgs osConfig; }
|
||||||
programs.zellij = {
|
))
|
||||||
enable = true;
|
];
|
||||||
enableZshIntegration = true;
|
|
||||||
settings = {
|
|
||||||
pane_frames = false;
|
|
||||||
show_startup_tips = false;
|
|
||||||
show_release_notes = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.configFile."zellij/layouts/default.kdl".text = # kdl
|
|
||||||
''
|
|
||||||
layout {
|
|
||||||
default_tab_template {
|
|
||||||
pane size=1 borderless=true {
|
|
||||||
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
|
||||||
format_left "{mode}"
|
|
||||||
format_center "{tabs}"
|
|
||||||
format_right "{datetime}"
|
|
||||||
format_space ""
|
|
||||||
format_hide_on_overlength "true"
|
|
||||||
format_precedence "lrc"
|
|
||||||
|
|
||||||
border_enabled "false"
|
|
||||||
border_char "─"
|
|
||||||
border_format "#[fg=#6C7086]{char}"
|
|
||||||
border_position "top"
|
|
||||||
|
|
||||||
hide_frame_for_single_pane "false"
|
|
||||||
|
|
||||||
mode_normal "#[bg=#89B4FA] {name} "
|
|
||||||
mode_locked "#[bg=#f55e18] {name} "
|
|
||||||
mode_session "#[bq=#00ff00 {name}]"
|
|
||||||
|
|
||||||
tab_normal "#[fg=#6C7086] {index} "
|
|
||||||
tab_active "#[fg=#9399B2,bold,italic] {index} "
|
|
||||||
tab_display_count "3" // limit to showing 3 tabs
|
|
||||||
tab_truncate_start_format "..."
|
|
||||||
tab_truncate_end_format "..."
|
|
||||||
|
|
||||||
datetime "#[fg=#6C7086,bold] {format}"
|
|
||||||
datetime_format "%H:%M:%S"
|
|
||||||
datetime_timezone "Asia/Singapore"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
children
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
57
modules/home/cli/multiplexer/zellij.nix
Normal file
57
modules/home/cli/multiplexer/zellij.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
osConfig,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.sessionVariables.MULTIPLEXER = "zellij";
|
||||||
|
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [ "/.cache/zellij" ];
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
pane_frames = false;
|
||||||
|
show_startup_tips = false;
|
||||||
|
show_release_notes = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg.configFile."zellij/layouts/default.kdl".text = # kdl
|
||||||
|
''
|
||||||
|
layout {
|
||||||
|
default_tab_template {
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
||||||
|
format_left "{mode} ${osConfig.system.hostname}"
|
||||||
|
format_center "{tabs}"
|
||||||
|
format_right "{datetime}"
|
||||||
|
format_space ""
|
||||||
|
format_hide_on_overlength "true"
|
||||||
|
format_precedence "lrc"
|
||||||
|
|
||||||
|
border_enabled "false"
|
||||||
|
border_char "─"
|
||||||
|
border_format "#[fg=#6C7086]{char}"
|
||||||
|
border_position "top"
|
||||||
|
|
||||||
|
hide_frame_for_single_pane "false"
|
||||||
|
|
||||||
|
mode_normal "#[bg=#89B4FA] {name} "
|
||||||
|
mode_locked "#[bg=#f55e18] {name} "
|
||||||
|
mode_session "#[bq=#00ff00 {name}]"
|
||||||
|
|
||||||
|
tab_normal "#[fg=#6C7086] {index} "
|
||||||
|
tab_active "#[fg=#9399B2,bold,italic] {index} "
|
||||||
|
tab_display_count "3" // limit to showing 3 tabs
|
||||||
|
tab_truncate_start_format "..."
|
||||||
|
tab_truncate_end_format "..."
|
||||||
|
|
||||||
|
datetime "#[fg=#6C7086,bold] {format}"
|
||||||
|
datetime_format "%H:%M:%S"
|
||||||
|
datetime_timezone "Asia/Singapore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue