2024-09-06 00:39:10 +01:00
|
|
|
mod inner;
|
|
|
|
|
2024-09-30 22:48:22 +01:00
|
|
|
use std::rc::Rc;
|
|
|
|
|
2024-09-06 00:39:10 +01:00
|
|
|
use ego_tree::Tree;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
pub use inner::get_tabs;
|
|
|
|
|
|
|
|
#[derive(Clone, Hash, Eq, PartialEq)]
|
|
|
|
pub enum Command {
|
|
|
|
Raw(String),
|
2024-09-22 17:50:43 +01:00
|
|
|
LocalFile {
|
|
|
|
executable: String,
|
|
|
|
args: Vec<String>,
|
|
|
|
// The file path is included within the arguments; don't pass this in addition
|
|
|
|
file: PathBuf,
|
|
|
|
},
|
2024-09-06 00:39:10 +01:00
|
|
|
None, // Directory
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Hash, Eq, PartialEq)]
|
|
|
|
pub struct Tab {
|
|
|
|
pub name: String,
|
2024-09-30 22:48:22 +01:00
|
|
|
pub tree: Tree<Rc<ListNode>>,
|
2024-09-19 19:15:30 +01:00
|
|
|
pub multi_selectable: bool,
|
2024-09-06 00:39:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Hash, Eq, PartialEq)]
|
|
|
|
pub struct ListNode {
|
|
|
|
pub name: String,
|
2024-09-19 01:17:08 +01:00
|
|
|
pub description: String,
|
2024-09-06 00:39:10 +01:00
|
|
|
pub command: Command,
|
2024-09-22 17:10:05 +01:00
|
|
|
pub task_list: String,
|
2024-09-06 00:39:10 +01:00
|
|
|
}
|