aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/plugins
diff options
context:
space:
mode:
authorKarl Bunch <karlbunch@users.noreply.github.com>2026-03-04 08:26:26 -0500
committerGitHub <noreply@github.com>2026-03-04 14:26:26 +0100
commitf77cdec298576164f34baf0456e4b986bde269e6 (patch)
treeaf9fb93cfc6edf465378952c0aff38d48820e142 /zellij-server/src/plugins
parentdocs(changelog): native Windows support (!!) (diff)
downloadsl0ppij-f77cdec298576164f34baf0456e4b986bde269e6.tar.gz
sl0ppij-f77cdec298576164f34baf0456e4b986bde269e6.tar.xz
sl0ppij-f77cdec298576164f34baf0456e4b986bde269e6.zip
feat: add per-pane default foreground/background color support (#4737)
* feat: add per-pane default foreground/background color support Add per-pane default foreground and background colors, configurable through four surfaces: - OSC 10/11 escape sequences (set/query) and OSC 110/111 (reset) - CLI action: zellij action set-pane-color --pane-id <id> --fg/--bg - Layout config: default_fg/default_bg properties on pane nodes - Plugin API: set_pane_color() SDK function and PaneInfo read-side Colors are applied at render time as a fallback when cells have no explicit foreground/background, without mutating stored grid data. Closes #4712 * refactor: address review feedback for pane color support - Extract adjust_styles_for_custom_bg_fg in output/mod.rs - Move color parsing (xparse_color) from tab into Grid - Move color serialization (ansi_code_to_color_string) into Grid - Pane trait now uses Option<String> for color getters/setters - Add colors to session serialization (dump-layout) - Add default_fg/default_bg to protobuf IPC schema to fix layout-in-session color loss - Update example layout with tab-bar and status-bar * fix stack overflow and ordering * rustfmt * update e2e snapshots --------- Co-authored-by: Karl Bunch <karl@karlbunch.com> Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'zellij-server/src/plugins')
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap6
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap6
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap180
-rw-r--r--zellij-server/src/plugins/zellij_exports.rs10
4 files changed, 202 insertions, 0 deletions
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap
index 9811bdc4..8a11021c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap
@@ -26,6 +26,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -42,6 +44,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -55,6 +59,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
),
[],
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap
index 4e5fe5d2..4e5076b1 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap
@@ -26,6 +26,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -42,6 +44,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -55,6 +59,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
),
[],
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap
index 21dc6fda..0320d754 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap
@@ -29,6 +29,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -66,6 +68,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -79,6 +83,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
floating_layouts: [],
swap_tiled_layouts: Some(
@@ -114,6 +120,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -132,6 +140,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -145,6 +155,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -158,6 +170,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -195,6 +209,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -208,6 +224,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
MaxPanes(
7,
@@ -240,6 +258,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -260,6 +280,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -276,6 +298,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -292,6 +316,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -308,6 +334,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -321,6 +349,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -334,6 +364,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -347,6 +379,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -384,6 +418,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -397,6 +433,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
MaxPanes(
11,
@@ -429,6 +467,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -449,6 +489,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -465,6 +507,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -481,6 +525,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -497,6 +543,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -510,6 +558,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -530,6 +580,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -546,6 +598,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -562,6 +616,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -578,6 +634,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -591,6 +649,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -604,6 +664,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -617,6 +679,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -654,6 +718,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -667,6 +733,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
},
Some(
@@ -700,6 +768,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -716,6 +786,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -729,6 +801,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -766,6 +840,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -779,6 +855,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
MaxPanes(
7,
@@ -811,6 +889,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Vertical,
@@ -831,6 +911,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -847,6 +929,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -863,6 +947,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -879,6 +965,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -892,6 +980,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -905,6 +995,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -918,6 +1010,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -955,6 +1049,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -968,6 +1064,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
MaxPanes(
11,
@@ -1000,6 +1098,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Vertical,
@@ -1020,6 +1120,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1036,6 +1138,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1052,6 +1156,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1068,6 +1174,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1081,6 +1189,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Vertical,
@@ -1101,6 +1211,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1117,6 +1229,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1133,6 +1247,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1149,6 +1265,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1162,6 +1280,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1175,6 +1295,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1188,6 +1310,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1225,6 +1349,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1238,6 +1364,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
},
Some(
@@ -1275,6 +1403,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1293,6 +1423,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1306,6 +1438,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1319,6 +1453,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -1356,6 +1492,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
],
split_size: None,
@@ -1369,6 +1507,8 @@ Some(
run_instructions_to_ignore: [],
hide_floating_panes: false,
pane_initial_contents: None,
+ default_fg: None,
+ default_bg: None,
},
},
Some(
@@ -1421,6 +1561,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1451,6 +1593,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1481,6 +1625,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1511,6 +1657,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1541,6 +1689,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1571,6 +1721,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1601,6 +1753,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1631,6 +1785,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1661,6 +1817,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1691,6 +1849,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
],
},
@@ -1724,6 +1884,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
],
MaxPanes(
@@ -1754,6 +1916,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1780,6 +1944,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
],
MaxPanes(
@@ -1810,6 +1976,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1836,6 +2004,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1862,6 +2032,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
],
MaxPanes(
@@ -1896,6 +2068,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1926,6 +2100,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1956,6 +2132,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
FloatingPaneLayout {
name: None,
@@ -1986,6 +2164,8 @@ Some(
already_running: false,
pane_initial_contents: None,
logical_position: None,
+ default_fg: None,
+ default_bg: None,
},
],
},
diff --git a/zellij-server/src/plugins/zellij_exports.rs b/zellij-server/src/plugins/zellij_exports.rs
index 57cd2a44..dd323977 100644
--- a/zellij-server/src/plugins/zellij_exports.rs
+++ b/zellij-server/src/plugins/zellij_exports.rs
@@ -596,6 +596,9 @@ fn host_run_plugin_command(mut caller: Caller<'_, PluginEnv>) {
PluginCommand::SetPaneBorderless(pane_id, borderless) => {
set_pane_borderless(env, pane_id.into(), borderless)
},
+ PluginCommand::SetPaneColor(pane_id, fg, bg) => {
+ set_pane_color(env, pane_id.into(), fg, bg)
+ },
PluginCommand::OpenFileNearPlugin(file_to_open, context) => {
open_file_near_plugin(env, file_to_open, context)
},
@@ -3602,6 +3605,12 @@ fn set_pane_borderless(env: &PluginEnv, pane_id: PaneId, borderless: bool) {
));
}
+fn set_pane_color(env: &PluginEnv, pane_id: PaneId, fg: Option<String>, bg: Option<String>) {
+ let _ = env
+ .senders
+ .send_to_screen(ScreenInstruction::SetPaneColor(pane_id, fg, bg, None));
+}
+
fn scan_host_folder(env: &PluginEnv, folder_to_scan: PathBuf) {
if !folder_to_scan.starts_with("/host") {
log::error!(
@@ -5061,6 +5070,7 @@ fn check_command_permission(
| PluginCommand::ChangeFloatingPanesCoordinates(..)
| PluginCommand::TogglePaneBorderless(..)
| PluginCommand::SetPaneBorderless(..)
+ | PluginCommand::SetPaneColor(..)
| PluginCommand::GroupAndUngroupPanes(..)
| PluginCommand::HighlightAndUnhighlightPanes(..)
| PluginCommand::CloseMultiplePanes(..)