mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
Update layout
This commit is contained in:
parent
fe2c22214e
commit
c859f074e5
5 changed files with 56 additions and 17 deletions
|
|
@ -4,7 +4,11 @@
|
|||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
zellij-muon = pkgs.zellij.overrideAttrs (previousAttrs: {
|
||||
patches = previousAttrs.patches ++ [./zellij/floating_fix.patch];
|
||||
});
|
||||
in {
|
||||
options.mods.terminal.development.enable =
|
||||
lib.mkEnableOption "enables cli editor";
|
||||
|
||||
|
|
@ -40,7 +44,7 @@
|
|||
show_release_notes._args = [false];
|
||||
};
|
||||
|
||||
extraConfig = builtins.readFile ./zellij.kdl;
|
||||
extraConfig = builtins.readFile ./zellij/config.kdl;
|
||||
|
||||
layouts = {
|
||||
dev = {
|
||||
|
|
@ -61,7 +65,7 @@
|
|||
{"children" = {};}
|
||||
{
|
||||
pane = {
|
||||
size = 2;
|
||||
size = 1;
|
||||
borderless = true;
|
||||
plugin = {
|
||||
location = "zellij:status-bar";
|
||||
|
|
@ -74,13 +78,14 @@
|
|||
{
|
||||
tab = {
|
||||
_props = {
|
||||
name = "Project";
|
||||
name = "project";
|
||||
focus = true;
|
||||
};
|
||||
_children = [
|
||||
{
|
||||
pane = {
|
||||
command = "nvim";
|
||||
command = "zsh";
|
||||
args = ["-c" "nvim"];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
@ -89,7 +94,7 @@
|
|||
{
|
||||
tab = {
|
||||
_props = {
|
||||
name = "Run";
|
||||
name = "test";
|
||||
};
|
||||
_children = [
|
||||
{
|
||||
|
|
@ -103,12 +108,12 @@
|
|||
{
|
||||
tab = {
|
||||
_props = {
|
||||
name = "Test";
|
||||
name = "git";
|
||||
};
|
||||
_children = [
|
||||
{
|
||||
pane = {
|
||||
command = "zsh";
|
||||
command = "lazygit";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
|||
32
modules/home/terminal/zellij/floating_fix.patch
Normal file
32
modules/home/terminal/zellij/floating_fix.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/zellij-utils/src/kdl/kdl_layout_parser.rs b/zellij-utils/src/kdl/kdl_layout_parser.rs
|
||||
index c38c0146..d44440a7 100644
|
||||
--- a/zellij-utils/src/kdl/kdl_layout_parser.rs
|
||||
+++ b/zellij-utils/src/kdl/kdl_layout_parser.rs
|
||||
@@ -1607,6 +1607,10 @@ impl<'a> KdlLayoutParser<'a> {
|
||||
floating_pane.add_cwd_to_layout(&cwd_prefix);
|
||||
}
|
||||
}
|
||||
+ // hide_floating_panes on the tab_layout takes precedence over the hide_floating_panes on the tab_template
|
||||
+ tab_layout.hide_floating_panes =
|
||||
+ kdl_get_bool_property_or_child_value!(kdl_node, "hide_floating_panes")
|
||||
+ .unwrap_or(tab_layout.hide_floating_panes);
|
||||
tab_layout.external_children_index = None;
|
||||
Ok((
|
||||
is_focused,
|
||||
@@ -1671,6 +1675,8 @@ impl<'a> KdlLayoutParser<'a> {
|
||||
let mut tab_floating_children = vec![];
|
||||
let mut external_children_index = None;
|
||||
let mut children_index_offset = 0;
|
||||
+ let hide_floating_panes =
|
||||
+ kdl_get_bool_property_or_child_value!(kdl_node, "hide_floating_panes").unwrap_or(false);
|
||||
let is_part_of_stack = false;
|
||||
if let Some(children) = kdl_children_nodes!(kdl_node) {
|
||||
for (i, child) in children.iter().enumerate() {
|
||||
@@ -1721,6 +1727,7 @@ impl<'a> KdlLayoutParser<'a> {
|
||||
children_split_direction,
|
||||
children: tab_children,
|
||||
external_children_index,
|
||||
+ hide_floating_panes,
|
||||
..Default::default()
|
||||
},
|
||||
tab_floating_children,
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
"https://nixpkgs-unfree.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://devenv.cachix.org"
|
||||
"https://muon.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
|
|
@ -44,6 +45,7 @@
|
|||
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
|
||||
"muon.cachix.org-1:tHFazVc8JsSeeLa2WLi50DHpJZKYy4V+oKlbhnbecXE="
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue