Last active
June 15, 2024 22:15
-
-
Save sinux-l5d/f695d5c31377616d091be2044977b936 to your computer and use it in GitHub Desktop.
Zellij setup for rustlings exercises
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
zellij action new-tab --layout rustlings_layout.kdl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layout { | |
tab name="Rustlings" { | |
pane size=1 borderless=true { | |
plugin location="tab-bar" | |
} | |
pane split_direction="vertical" { | |
pane { | |
name "Editor" | |
focus true | |
command "zsh" | |
args "-c" r#"while true; do file=$(~/.cargo/bin/rustlings list | grep Pending | awk '{print $2}' | head -1); if [[ -n $file ]]; then vim "$file"; else break; fi; done"# | |
} | |
pane split_direction="horizontal" { | |
pane { | |
name "Exercise" | |
command "~/.cargo/bin/rustlings" | |
args "watch" | |
} | |
pane { | |
name "Hint" | |
size 15 | |
command "zsh" | |
start_suspended true | |
args "-c" r#"~/.cargo/bin/rustlings list | grep Pending | awk '{print $1}' | head -1 | xargs ~/.cargo/bin/rustlings hint"# | |
} | |
} | |
} | |
pane size=2 borderless=true { | |
plugin location="status-bar" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment