Skip to content

Commit

Permalink
Merge pull request #728 from kachick/zellij-workspace
Browse files Browse the repository at this point in the history
Add zellij layouts
  • Loading branch information
kachick authored Aug 10, 2024
2 parents f1f3546 + 0c2e2f3 commit 01aecfb
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 634 deletions.
4 changes: 4 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,7 @@ command = './containers/sandbox-with-ghcr.bash'
args = [
'latest',
]

[tasks.workspace]
command = 'zellij'
args = ['--layout', './config/zellij/layouts/dotfiles.kdl']
39 changes: 39 additions & 0 deletions config/zellij/layouts/bps.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
layout {
tab_template name="BPS" {
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
// BPS - even used 7-3, call binary here :)
pane split_direction="vertical" {
pane size="70%" {

}
pane split_direction="horizontal" size="30%" {
pane
pane
}
}
}
tab_template name="wide" {
// compact looks beautiful, but not enough for beginners like me!
//
// pane size=1 borderless=true {
// plugin location="zellij:compact-bar"
// }
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane
}
BPS focus=true name="BPS1"
BPS name="BPS2"
BPS name="BPS3"
wide name="wide1"
wide name="wide2"
}
36 changes: 36 additions & 0 deletions config/zellij/layouts/dotfiles.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
layout {
tab focus=true name="common" {
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
// BPS
pane split_direction="vertical" {
pane size="70%" {

}
pane split_direction="horizontal" size="30%" {
pane
pane
}
}
}
tab name="dconf" {
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane name="edit" edit="home-manager/gnome.nix" size="70%"
pane split_direction="vertical" size="30%" {
pane name="watch" start_suspended=true command="dconf" {
args "watch" "/"
start_suspended true
}
pane name="blank"
}
}
}
3 changes: 2 additions & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"https://plugins.dprint.dev/json-0.19.3.wasm",
"https://plugins.dprint.dev/markdown-0.17.2.wasm",
"https://plugins.dprint.dev/toml-0.6.2.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.4.0.wasm"
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.4.0.wasm",
"https://github.com/kachick/dprint-plugin-kdl/releases/download/0.1.0/plugin.wasm"
]
}
57 changes: 30 additions & 27 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,40 +67,43 @@
let
pkgs = nixpkgs.legacyPackages.${system};
edge-pkgs = edge-nixpkgs.legacyPackages.${system};
homemade-pkgs = homemade-packages.${system};
in
{
default =
with pkgs;
mkShellNoCC {
buildInputs = [
# https://github.com/NixOS/nix/issues/730#issuecomment-162323824
bashInteractive
nixfmt-rfc-style
# TODO: Consider to replace nil with nixd: https://github.com/oxalica/nil/issues/111
nil # Used in vscode Nix extension
nixd # Used in zed Nix extension
nixpkgs-lint-community
# To get sha256 around pkgs.fetchFromGitHub in CLI
nix-prefetch-git
jq
buildInputs =
[
# https://github.com/NixOS/nix/issues/730#issuecomment-162323824
bashInteractive
nixfmt-rfc-style
# TODO: Consider to replace nil with nixd: https://github.com/oxalica/nil/issues/111
nil # Used in vscode Nix extension
nixd # Used in zed Nix extension
nixpkgs-lint-community
# To get sha256 around pkgs.fetchFromGitHub in CLI
nix-prefetch-git
jq

shellcheck
shfmt
gitleaks
cargo-make
shellcheck
shfmt
gitleaks
cargo-make

# Don't use treefmt(treefmt1) that does not have crucial feature to cover hidden files
# https://github.com/numtide/treefmt/pull/250
treefmt2
dprint
stylua
typos
typos-lsp
go_1_22
goreleaser
trivy
] ++ (with edge-pkgs; [ markdownlint-cli2 ]) ++ (with homemade-pkgs; [ kdlfmt ]);
dprint
stylua
typos
typos-lsp
go_1_22
goreleaser
trivy
]
++ (with edge-pkgs; [
# Don't use treefmt(treefmt1) that does not have crucial feature to cover hidden files
# https://github.com/numtide/treefmt/pull/250
treefmt2
markdownlint-cli2
]);
};
}
);
Expand Down
2 changes: 0 additions & 2 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
beedii = pkgs.callPackage ./beedii { };
cozette = pkgs.callPackage ./cozette { };

kdlfmt = pkgs.callPackage ./kdlfmt { };

posix_shared_functions = pkgs.callPackage ./posix_shared_functions { };

get-rclone-config-password = import ./get-rclone-config-password { inherit pkgs edge-pkgs; };
Expand Down
Loading

0 comments on commit 01aecfb

Please sign in to comment.