Skip to content

Commit

Permalink
feat: add support to zellij layout
Browse files Browse the repository at this point in the history
  • Loading branch information
waldirborbajr committed Feb 28, 2024
1 parent 9db7865 commit d4742fe
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"

[build]
args_bin = []
bin = "./bin/glink"
# cmd = "go build -o ./bin/glink ."
cmd = "make build-dev"
delay = 2000
exclude_dir = ["assets", "tmp", "vendor", "testdata", "testarea"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = "make build install"
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
kill_delay = "1s"
log = "build-errors.log"
send_interrupt = false
stop_on_error = true

[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"

[log]
time = true

[misc]
clean_on_exit = false

[screen]
clear_on_rebuild = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ dist/

**bin/
**testarea/
**tmp/

10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
build-dev:
go build -o bin/glink -debug-trace=tmp/trace.json main.go

build:
go build -o bin/ .
go build -o bin/glink -ldflags="-s -w" main.go

install:
go install ./...

test:
go test ./...

layout:
zellij --layout go-layout.kdl
29 changes: 29 additions & 0 deletions go-layout.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
children
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
// tab name="GO Dev" {
pane split_direction="vertical" {
pane command="nvim" close_on_exit=true
pane split_direction="horizontal" {
pane command="air"
pane {
cwd "testarea/"
}
pane command="tail" {
args "-f" "tmp/build-errors.log"
}
}
}
pane size=1 borderless=true {
// plugin location="zellij:compact-bar"
plugin location="zellij:status-bar"
}
// }
}

0 comments on commit d4742fe

Please sign in to comment.