Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to kdl #1759

Merged
merged 60 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
2c09b23
chore(config): default kdl keybindings config
imsnif Jul 15, 2022
db49c30
tests
imsnif Aug 5, 2022
179adaf
work
imsnif Aug 7, 2022
9d88282
refactor(config): move stuff around
imsnif Aug 8, 2022
256005d
work
imsnif Aug 11, 2022
921dfcc
tab merge layout
imsnif Aug 15, 2022
44976ca
done merge, still not working
imsnif Aug 15, 2022
d3cf00e
work
imsnif Aug 15, 2022
9818934
work
imsnif Aug 17, 2022
444c73a
layouts working
imsnif Aug 17, 2022
5ff4dda
Merge branch 'main' into switch-to-kdl
imsnif Aug 17, 2022
6a4d7cf
work
imsnif Aug 17, 2022
3372f24
layout tests
imsnif Aug 18, 2022
cd4bb8d
work
imsnif Aug 19, 2022
f4f3a37
work
imsnif Aug 20, 2022
838f5a7
feat(parsing): kdl layouts without config
imsnif Aug 30, 2022
c26356e
refactor(kdl): move stuff around
imsnif Sep 1, 2022
d139c69
work
imsnif Sep 2, 2022
8237223
tests(layout): add cases and fix bugs
imsnif Sep 6, 2022
d8c23e0
Merge branch 'main' into switch-to-kdl
imsnif Sep 6, 2022
44467ad
work
imsnif Sep 7, 2022
98c95ad
fix(kdl): various bugs
imsnif Sep 7, 2022
29e2abf
chore(layouts): move all layouts to kdl
imsnif Sep 7, 2022
c763d19
feat(kdl): shared keybidns
imsnif Sep 7, 2022
dbaa7ae
fix(layout): do not count fixed panes toward percentile
imsnif Sep 7, 2022
047e75f
fix(keybinds): missing keybinds and actions
imsnif Sep 8, 2022
789dec3
fix(config): adjust default tips
imsnif Sep 8, 2022
847b9ec
refactor(config): move stuff around
imsnif Sep 8, 2022
0223871
fix(tests): make e2e tests pass
imsnif Sep 8, 2022
6aa9882
fix(kdl): add verbose parsing errors
imsnif Sep 8, 2022
1aaefa0
fix(kdl): focused tab
imsnif Sep 9, 2022
0e1e774
fix(layout): corret default_tab_template behavior
imsnif Sep 9, 2022
3a13ea9
style(code): fix compile warnings
imsnif Sep 9, 2022
07d6f7f
feat(cli): send actions through the cli
imsnif Sep 15, 2022
b6e082c
fix(cli): exit only when action is done
imsnif Sep 15, 2022
c559fb9
fix(cli): open embedded pane from floating pane
imsnif Sep 15, 2022
4c751a0
fix(cli): send actions to other sessions
imsnif Sep 15, 2022
02a8b9d
feat(cli): command alias
imsnif Sep 16, 2022
a4e9ee0
feat(converter): convert old config
imsnif Sep 20, 2022
725ec70
feat(converter): convert old layout and theme files
imsnif Sep 22, 2022
eb63018
feat(kdl): pretty errors
imsnif Sep 26, 2022
1b83911
feat(client): convert old YAML files on startup
imsnif Sep 29, 2022
d4a6971
fix: various bugs and styling issues
imsnif Sep 30, 2022
8f42392
fix: e2e tests
imsnif Sep 30, 2022
e4fb8d8
Merge branch 'main' into switch-to-kdl
imsnif Oct 2, 2022
d9624d8
fix(screen): propagate errors after merge
imsnif Oct 2, 2022
05a6a99
style(clippy): lower clippy level
imsnif Oct 2, 2022
c3fd53c
fix(tests): own session_name variable
imsnif Oct 2, 2022
0a9937f
style(fmt): rustfmt
imsnif Oct 2, 2022
f1c400f
fix(cli): various action fixes
imsnif Oct 3, 2022
6e42d7a
style(fmt): rustfmt
imsnif Oct 3, 2022
e9ad50d
fix(themes): loading of theme files
imsnif Oct 3, 2022
a1d7853
style(fmt): rustfmt
imsnif Oct 3, 2022
03c1333
fix(tests): theme fixtures
imsnif Oct 3, 2022
699d058
fix(layouts): better errors on unknown nodes
imsnif Oct 3, 2022
35d5612
fix(kdl): clarify valid node terminator error
imsnif Oct 3, 2022
9d0b773
fix(e2e): adjust close tab test
imsnif Oct 3, 2022
094ff21
fix(e2e): adjust close tab test again
imsnif Oct 3, 2022
52eec6c
style(code): cleanup some comments
imsnif Oct 4, 2022
c7ee9d0
Merge branch 'main' into switch-to-kdl
imsnif Oct 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 60 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.59"

[dependencies]
anyhow = "1.0"
thiserror = "1.0.30"
names = { version = "0.13.0", default-features = false }
miette = { version = "3.3.0", features = ["fancy"] }
zellij-client = { path = "zellij-client/", version = "0.32.0" }
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ args = [

# Simple clippy tweak
[tasks.clippy]
args = ["clippy", "--all-targets","--all-features","--","--deny","warnings", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
args = ["clippy", "--all-targets", "--all-features", "@@split(CARGO_MAKE_TASK_ARGS,;)"]

# Release building and installing Zellij
[tasks.install]
Expand Down
10 changes: 5 additions & 5 deletions default-plugins/status-bar/src/second_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn get_keys_and_hints(mi: &ModeInfo) -> Vec<(String, String, Vec<Key>)> {
(s("Embed pane"), s("Embed"), action_key(&km, &[A::TogglePaneEmbedOrFloating, TO_NORMAL])),
(s("Next"), s("Next"), action_key(&km, &[A::SwitchFocus])),
(s("Select pane"), s("Select"), to_normal_key),
]} else if mi.mode == IM::Tab {
]} else if mi.mode == IM::Tab {
// With the default bindings, "Move focus" for tabs is tricky: It binds all the arrow keys
// to moving tabs focus (left/up go left, right/down go right). Since we sort the keys
// above and then dedpulicate based on the actions, we will end up with LeftArrow for
Expand All @@ -180,9 +180,9 @@ fn get_keys_and_hints(mi: &ModeInfo) -> Vec<(String, String, Vec<Key>)> {

vec![
(s("Move focus"), s("Move"), focus_keys),
(s("New"), s("New"), action_key(&km, &[A::NewTab(None), TO_NORMAL])),
(s("New"), s("New"), action_key(&km, &[A::NewTab(None, None), TO_NORMAL])),
(s("Close"), s("Close"), action_key(&km, &[A::CloseTab, TO_NORMAL])),
(s("Rename"), s("Rename"),
(s("Rename"), s("Rename"),
action_key(&km, &[A::SwitchToMode(IM::RenameTab), A::TabNameInput(vec![0])])),
(s("Sync"), s("Sync"), action_key(&km, &[A::ToggleActiveSyncTab, TO_NORMAL])),
(s("Toggle"), s("Toggle"), action_key(&km, &[A::ToggleTab])),
Expand All @@ -192,7 +192,7 @@ fn get_keys_and_hints(mi: &ModeInfo) -> Vec<(String, String, Vec<Key>)> {
&[A::Resize(RDir::Left)], &[A::Resize(RDir::Down)],
&[A::Resize(RDir::Up)], &[A::Resize(RDir::Right)]])),
(s("Increase/Decrease size"), s("Increase/Decrease"),
action_key_group(&km, &[&[A::Resize(RDir::Increase)], &[A::Resize(RDir::Decrease)]])),
action_key_group(&km, &[&[A::Resize(RDir::Increase)], &[A::Resize(RDir::Decrease)]])),
(s("Select pane"), s("Select"), to_normal_key),
]} else if mi.mode == IM::Move { vec![
(s("Move"), s("Move"), action_key_group(&km, &[
Expand Down Expand Up @@ -242,7 +242,7 @@ fn get_keys_and_hints(mi: &ModeInfo) -> Vec<(String, String, Vec<Key>)> {
(s("Split down"), s("Down"), action_key(&km, &[A::NewPane(Some(Dir::Down)), TO_NORMAL])),
(s("Split right"), s("Right"), action_key(&km, &[A::NewPane(Some(Dir::Right)), TO_NORMAL])),
(s("Fullscreen"), s("Fullscreen"), action_key(&km, &[A::ToggleFocusFullscreen, TO_NORMAL])),
(s("New tab"), s("New"), action_key(&km, &[A::NewTab(None), TO_NORMAL])),
(s("New tab"), s("New"), action_key(&km, &[A::NewTab(None, None), TO_NORMAL])),
(s("Rename tab"), s("Rename"),
action_key(&km, &[A::SwitchToMode(IM::RenameTab), A::TabNameInput(vec![0])])),
(s("Previous Tab"), s("Previous"), action_key(&km, &[A::GoToPreviousTab, TO_NORMAL])),
Expand Down
7 changes: 6 additions & 1 deletion default-plugins/status-bar/src/tip/data/quicknav.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ fn add_keybinds(help: &ModeInfo) -> Keygroups {
style_key_with_modifier(&new_pane_keys, &help.style.colors)
};

let resize_keys = action_key_group(
let mut resize_keys = action_key_group(
&normal_keymap,
&[
&[Action::Resize(ResizeDirection::Increase)],
&[Action::Resize(ResizeDirection::Decrease)],
],
);
if resize_keys.contains(&Key::Alt(CharOrArrow::Char('=')))
&& resize_keys.contains(&Key::Alt(CharOrArrow::Char('+')))
{
resize_keys.retain(|k| k != &Key::Alt(CharOrArrow::Char('=')));
}
let resize = if resize_keys.is_empty() {
vec![Style::new().bold().paint("UNBOUND")]
} else {
Expand Down
4 changes: 2 additions & 2 deletions example/themes/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Themes
Please make sure that the theme name and the file name are the same (+`.yaml`).
Please make sure that the theme name and the file name are the same (+`.kdl`).

Example:

- theme: gruvbox
- filename: `gruvbox.yaml`
- filename: `gruvbox.kdl`
17 changes: 17 additions & 0 deletions example/themes/dracula.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// From https://github.com/dracula/zellij

themes {
dracula {
fg 248 248 242
bg 40 42 54
black 0 0 0
red 255 85 85
green 80 250 123
yellow 241 250 140
blue 98 114 164
magenta 255 121 198
cyan 139 233 253
white 255 255 255
orange 255 184 108
}
}
16 changes: 0 additions & 16 deletions example/themes/dracula.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions example/themes/gruvbox-dark.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
themes {
gruvbox-dark {
fg 213 196 161
bg 40 40 40
black 60 56 54
red 204 36 29
green 152 151 26
yellow 215 153 33
blue 69 133 136
magenta 177 98 134
cyan 104 157 106
white 251 241 199
orange 214 93 14
}
}

15 changes: 0 additions & 15 deletions example/themes/gruvbox-dark.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions example/themes/gruvbox-light.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
themes {
gruvbox-light {
fg 60 56 54
bg 251 82 75
black 40 40 40
red 205 75 69
green 152 151 26
yellow 215 153 33
blue 69 133 136
magenta 177 98 134
cyan 104 157 106
white 213 196 161
orange 214 93 14
}
}

15 changes: 0 additions & 15 deletions example/themes/gruvbox-light.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions example/themes/molokai-dark.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
themes {
molokai-dark {
fg 248 248 240
bg 27 29 30
black 0 0 0
red 255 0 0
green 0 140 0
yellow 255 255 0
blue 102 217 239
magenta 174 129 255
cyan 0 255 255
white 255 255 255
orange 253 151 31
}
}

15 changes: 0 additions & 15 deletions example/themes/molokai-dark.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions example/themes/nord.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
themes {
nord {
fg 216 222 233 // #D8DEE9
bg 46 52 64 // #2E3440
black 59 66 82 // #3B4252
red 191 97 106 // #BF616A
green 163 190 140 // #A3BE8C
yellow 235 203 139 // #EBCB8B
blue 129 161 193 // #81A1C1
magenta 180 142 173 // #B48EAD
cyan 136 192 208 // #88C0D0
white 229 233 240 // #E5E9F0
orange 208 135 112 // #D08770
}
}
16 changes: 0 additions & 16 deletions example/themes/nord.yaml

This file was deleted.

Loading