aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/status-bar/src/tip/data
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2023-02-17 12:05:50 +0100
committerGitHub <noreply@github.com>2023-02-17 12:05:50 +0100
commitf1ff272b0b65f6d328fef24531ada67ea585ce85 (patch)
tree0e33aa4a1af21c0785fa30118ee42a21972497cf /default-plugins/status-bar/src/tip/data
parentdocs(changelog): termwiz update (diff)
downloadsl0ppij-f1ff272b0b65f6d328fef24531ada67ea585ce85.tar.gz
sl0ppij-f1ff272b0b65f6d328fef24531ada67ea585ce85.tar.xz
sl0ppij-f1ff272b0b65f6d328fef24531ada67ea585ce85.zip
feat(ui): swap layouts and stacked panes (#2167)
* relayout working with hard coded layout * work * refactor(layout): PaneLayout => TiledPaneLayout * tests passing * tests passing * tests passing * stacked panes and passing tests * tests for stacked panes * refactor(panes): stacked panes * fix: focusing into stacked panes from the left/right * fix(layouts): handle stacked layouts in the middle of the screen * fix(pane-stack): focus correctly when coming to stack from above/below * fix(stacked-panes): resize stack * fix(stacked-panes): focus with mouse * fix(stacked-panes): focus next pane * fix(layout-applier): sane focus order * fix(stacked-panes): better titles for one-liners * fix(stacked-panes): handle moving pane location in stack * fix(relayout): properly calculate display area * fix(relayout): properly calculate rounding errors * fix(stacked-panes): properly handle closing a pane near a stack * fix(swap-layouts): adjust swap layout sort order * feat(swap-layouts): ui + ux * fix(swap-layouts): include base layout * refactor(layout): remove unused method * fix(swap-layouts): respect pane contents and focus * work * fix(swap-layouts): load swap layouts from external file * fix(swap-layouts): properly truncate layout children * fix(stacked-panes): allow stacked panes to become fullscreen * fix(swap-layouts): work with multiple tabs * fix(swap-layouts): embed/eject panes properly with auto-layout * fix(stacked-panes): close last pane in stack * fix(stacked-panes): move focus for all clients in stack * fix(floating-panes): set layout damaged when moving panes * fix(relayout): move out of unfitting layout when resizing whole tab * fix(ui): background color for swap layout indicator * fix(keybinds): add switch next layout in tmux * fix(ui): swap layout indication in compact layout * fix(compact): correct swap constraint * fix(tests): tmux swap config shortcut * fix(resizes): cache resizes so as not to confuse panes (eg. vim) with multiple resizes that it debounces weirdly * feat(cli): dump swap layouts * fix(ui): stacked panes without pane frames * fix(ux): move pane forward/backwards also with floating panes * refactor(lint): remove unused stuff * refactor(tab): move swap layouts to separate file * style(fmt): rustfmt * style(fmt): rustfmt * refactor(panes): various cleanups * chore(deps): upgrade termwiz to get alt left-bracket * fix(assets): merge conflicts of binary files * style(fmt): rustfmt * style(clippy): no thank you! * chore(repo): remove garbage file
Diffstat (limited to 'default-plugins/status-bar/src/tip/data')
-rw-r--r--default-plugins/status-bar/src/tip/data/compact_layout.rs8
-rw-r--r--default-plugins/status-bar/src/tip/data/edit_scrollbuffer.rs8
-rw-r--r--default-plugins/status-bar/src/tip/data/floating_panes_mouse.rs3
-rw-r--r--default-plugins/status-bar/src/tip/data/move_focus_hjkl_tab_switch.rs4
-rw-r--r--default-plugins/status-bar/src/tip/data/quicknav.rs8
-rw-r--r--default-plugins/status-bar/src/tip/data/sync_tab.rs8
6 files changed, 26 insertions, 13 deletions
diff --git a/default-plugins/status-bar/src/tip/data/compact_layout.rs b/default-plugins/status-bar/src/tip/data/compact_layout.rs
index dd67ab8f..77dec8a6 100644
--- a/default-plugins/status-bar/src/tip/data/compact_layout.rs
+++ b/default-plugins/status-bar/src/tip/data/compact_layout.rs
@@ -93,8 +93,12 @@ fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
}
let mut bits = vec![];
- bits.extend(style_key_with_modifier(&to_pane, &help.style.colors));
+ bits.extend(style_key_with_modifier(&to_pane, &help.style.colors, None));
bits.push(Style::new().paint(", "));
- bits.extend(style_key_with_modifier(&pane_frames, &help.style.colors));
+ bits.extend(style_key_with_modifier(
+ &pane_frames,
+ &help.style.colors,
+ None,
+ ));
bits
}
diff --git a/default-plugins/status-bar/src/tip/data/edit_scrollbuffer.rs b/default-plugins/status-bar/src/tip/data/edit_scrollbuffer.rs
index bef8acba..ebd944b7 100644
--- a/default-plugins/status-bar/src/tip/data/edit_scrollbuffer.rs
+++ b/default-plugins/status-bar/src/tip/data/edit_scrollbuffer.rs
@@ -83,8 +83,12 @@ fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
}
let mut bits = vec![];
- bits.extend(style_key_with_modifier(&to_pane, &help.style.colors));
+ bits.extend(style_key_with_modifier(&to_pane, &help.style.colors, None));
bits.push(Style::new().paint(", "));
- bits.extend(style_key_with_modifier(&edit_buffer, &help.style.colors));
+ bits.extend(style_key_with_modifier(
+ &edit_buffer,
+ &help.style.colors,
+ None,
+ ));
bits
}
diff --git a/default-plugins/status-bar/src/tip/data/floating_panes_mouse.rs b/default-plugins/status-bar/src/tip/data/floating_panes_mouse.rs
index d91c3ed8..4bf4a143 100644
--- a/default-plugins/status-bar/src/tip/data/floating_panes_mouse.rs
+++ b/default-plugins/status-bar/src/tip/data/floating_panes_mouse.rs
@@ -62,11 +62,12 @@ fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
}
let mut bits = vec![];
- bits.extend(style_key_with_modifier(&to_pane, &help.style.colors));
+ bits.extend(style_key_with_modifier(&to_pane, &help.style.colors, None));
bits.push(Style::new().paint(", "));
bits.extend(style_key_with_modifier(
&floating_toggle,
&help.style.colors,
+ None,
));
bits
}
diff --git a/default-plugins/status-bar/src/tip/data/move_focus_hjkl_tab_switch.rs b/default-plugins/status-bar/src/tip/data/move_focus_hjkl_tab_switch.rs
index 67940e49..c39ea302 100644
--- a/default-plugins/status-bar/src/tip/data/move_focus_hjkl_tab_switch.rs
+++ b/default-plugins/status-bar/src/tip/data/move_focus_hjkl_tab_switch.rs
@@ -70,8 +70,8 @@ fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
letters.push(key);
}
}
- let arrows = style_key_with_modifier(&arrows, &help.style.colors);
- let letters = style_key_with_modifier(&letters, &help.style.colors);
+ let arrows = style_key_with_modifier(&arrows, &help.style.colors, None);
+ let letters = style_key_with_modifier(&letters, &help.style.colors, None);
if arrows.is_empty() && letters.is_empty() {
vec![Style::new().bold().paint("UNBOUND")]
} else if arrows.is_empty() || letters.is_empty() {
diff --git a/default-plugins/status-bar/src/tip/data/quicknav.rs b/default-plugins/status-bar/src/tip/data/quicknav.rs
index b8077e45..318fe702 100644
--- a/default-plugins/status-bar/src/tip/data/quicknav.rs
+++ b/default-plugins/status-bar/src/tip/data/quicknav.rs
@@ -66,7 +66,7 @@ fn add_keybinds(help: &ModeInfo) -> Keygroups {
let new_pane = if new_pane_keys.is_empty() {
vec![Style::new().bold().paint("UNBOUND")]
} else {
- style_key_with_modifier(&new_pane_keys, &help.style.colors)
+ style_key_with_modifier(&new_pane_keys, &help.style.colors, None)
};
let mut resize_keys = action_key_group(
@@ -84,7 +84,7 @@ fn add_keybinds(help: &ModeInfo) -> Keygroups {
let resize = if resize_keys.is_empty() {
vec![Style::new().bold().paint("UNBOUND")]
} else {
- style_key_with_modifier(&resize_keys, &help.style.colors)
+ style_key_with_modifier(&resize_keys, &help.style.colors, None)
};
let move_focus_keys = action_key_group(
@@ -113,8 +113,8 @@ fn add_keybinds(help: &ModeInfo) -> Keygroups {
letters.push(key);
}
}
- let arrows = style_key_with_modifier(&arrows, &help.style.colors);
- let letters = style_key_with_modifier(&letters, &help.style.colors);
+ let arrows = style_key_with_modifier(&arrows, &help.style.colors, None);
+ let letters = style_key_with_modifier(&letters, &help.style.colors, None);
let move_focus = if arrows.is_empty() && letters.is_empty() {
vec![Style::new().bold().paint("UNBOUND")]
} else if arrows.is_empty() || letters.is_empty() {
diff --git a/default-plugins/status-bar/src/tip/data/sync_tab.rs b/default-plugins/status-bar/src/tip/data/sync_tab.rs
index 55331eb3..486e2aa2 100644
--- a/default-plugins/status-bar/src/tip/data/sync_tab.rs
+++ b/default-plugins/status-bar/src/tip/data/sync_tab.rs
@@ -61,8 +61,12 @@ fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
}
let mut bits = vec![];
- bits.extend(style_key_with_modifier(&to_tab, &help.style.colors));
+ bits.extend(style_key_with_modifier(&to_tab, &help.style.colors, None));
bits.push(Style::new().paint(", "));
- bits.extend(style_key_with_modifier(&sync_tabs, &help.style.colors));
+ bits.extend(style_key_with_modifier(
+ &sync_tabs,
+ &help.style.colors,
+ None,
+ ));
bits
}