* initial implementation with break panes to new tab * break pane group left/right * group embed/eject panes * stack pane group on resize * close pane group * style(fmt): rustfmt * fix tests * group drag and ungroup with the mouse * fix mouse hover for multiple clients * fix for multiple clients * multiple select plugin initial * use real data in plugin * adjust functionality * fix some ux issues * reflect group mouse group selections in plugin * group/ungroup panes in Zellij * highlight frames when marked by the plugin * refactor: render function in plugin * some ui responsiveness * some more responsiveness and adjust hover text * break out functionality * stack functionality * break panes left/right and close multiple panes * fix(tab): only relayout the relevant layout when non-focused pane is closed * status bar UI * embed and float panes * work * fix some ui/ux issues * refactor: move stuff around * some responsiveness and fix search result browsing bug * change plugin pane title * differentiate group from focused pane * add keyboard shortcut * add ui to compact bar * make boundary colors appear properly without pane frames * get plugins to also display their frame color * make hover shortcuts appear on command panes * fix: do not render search string component if it's empty * BeforeClose Event and unhighlight panes on exit * some UI/UX fixes * some fixes to the catppuccin-latte theme * remove ungroup shortcut * make some ui components opaque * fix more opaque elements * fix some issues with stacking pane order * keyboard shortcuts for grouping * config to opt out of advanced mouse actions * make selected + focused frame color distinct * group marking mode * refactor: multiple-select plugin * adjust stacking group behavior * adjust flashing periods * render common modifier in group controls * add to compact bar * adjust key hint wording * add key to presets and default config * some cleanups * some refactoring * fix tests * fix plugin system tests * tests: group/ungroup/hover * test: BeforeClose plugin event * new plugin assets * style(fmt): rustfmt * remove warnings * tests: give plugin more time to load
40 lines
1.3 KiB
Rust
40 lines
1.3 KiB
Rust
pub use super::generated_api::api::plugin_ids::{
|
|
PluginIds as ProtobufPluginIds, ZellijVersion as ProtobufZellijVersion,
|
|
};
|
|
use crate::data::PluginIds;
|
|
|
|
use std::convert::TryFrom;
|
|
use std::path::PathBuf;
|
|
|
|
impl TryFrom<ProtobufPluginIds> for PluginIds {
|
|
type Error = &'static str;
|
|
fn try_from(protobuf_plugin_ids: ProtobufPluginIds) -> Result<Self, &'static str> {
|
|
Ok(PluginIds {
|
|
plugin_id: protobuf_plugin_ids.plugin_id as u32,
|
|
zellij_pid: protobuf_plugin_ids.zellij_pid as u32,
|
|
initial_cwd: PathBuf::from(protobuf_plugin_ids.initial_cwd),
|
|
client_id: protobuf_plugin_ids.client_id as u16,
|
|
})
|
|
}
|
|
}
|
|
|
|
impl TryFrom<PluginIds> for ProtobufPluginIds {
|
|
type Error = &'static str;
|
|
fn try_from(plugin_ids: PluginIds) -> Result<Self, &'static str> {
|
|
Ok(ProtobufPluginIds {
|
|
plugin_id: plugin_ids.plugin_id as i32,
|
|
zellij_pid: plugin_ids.zellij_pid as i32,
|
|
initial_cwd: plugin_ids.initial_cwd.display().to_string(),
|
|
client_id: plugin_ids.client_id as u32,
|
|
})
|
|
}
|
|
}
|
|
|
|
impl TryFrom<&str> for ProtobufZellijVersion {
|
|
type Error = &'static str;
|
|
fn try_from(zellij_version: &str) -> Result<Self, &'static str> {
|
|
Ok(ProtobufZellijVersion {
|
|
version: zellij_version.to_owned(),
|
|
})
|
|
}
|
|
}
|