feat(layout): add tabbed window groups and scrolling columns
This commit is contained in:
1 parent
7d58eeb65d
commit
bfa78f62f2
27 files changed
+1480
-47
No files matched your search
@@ -333,6 +333,23 @@ pub(super) fn parse_action(
|
||||
no_argument()?;
|
||||
Ok(BindingAction::CenterColumn)
|
||||
}
|
||||
"toggle-column-tabbed" => {
|
||||
no_argument()?;
|
||||
Ok(BindingAction::ToggleColumnTabbed)
|
||||
}
|
||||
"join-tab" => Ok(BindingAction::JoinTab(parse_direction(required_argument()?)?)),
|
||||
"leave-tab" => {
|
||||
no_argument()?;
|
||||
Ok(BindingAction::LeaveTab)
|
||||
}
|
||||
"next-tab" => {
|
||||
no_argument()?;
|
||||
Ok(BindingAction::CycleTab(false))
|
||||
}
|
||||
"previous-tab" => {
|
||||
no_argument()?;
|
||||
Ok(BindingAction::CycleTab(true))
|
||||
}
|
||||
"consume" => {
|
||||
no_argument()?;
|
||||
Ok(BindingAction::Consume)
|
||||
@@ -403,6 +420,9 @@ pub(super) fn default_bindings() -> Vec<BindingConfig> {
|
||||
binding("Super+C", "center-column", None),
|
||||
binding("Super+[", "consume", None),
|
||||
binding("Super+]", "expel", None),
|
||||
binding("Super+Shift+T", "toggle-column-tabbed", None),
|
||||
binding("Super+Ctrl+[", "previous-tab", None),
|
||||
binding("Super+Ctrl+]", "next-tab", None),
|
||||
binding("Super+Shift+Space", "toggle-floating", None),
|
||||
binding("Super+V", "focus-floating", None),
|
||||
binding("Super+Tab", "toggle-overview", None),
|
||||
@@ -495,6 +515,10 @@ pub enum BindingAction {
|
||||
ToggleLayout,
|
||||
CycleColumnWidth,
|
||||
CenterColumn,
|
||||
ToggleColumnTabbed,
|
||||
JoinTab(ferese_layout::Direction),
|
||||
LeaveTab,
|
||||
CycleTab(bool),
|
||||
Consume,
|
||||
Expel,
|
||||
ToggleFloating,
|
||||
@@ -609,8 +633,12 @@ impl Binding {
|
||||
BindingAction::ToggleLayout => "Switch workspace layout".into(),
|
||||
BindingAction::CycleColumnWidth => "Cycle column width".into(),
|
||||
BindingAction::CenterColumn => "Center focused column".into(),
|
||||
BindingAction::Consume => "Join window into column".into(),
|
||||
BindingAction::Expel => "Move window out of column".into(),
|
||||
BindingAction::ToggleColumnTabbed => "Toggle stacked / tabbed column".into(),
|
||||
BindingAction::JoinTab(direction) => format!("Join tab group {direction:?}"),
|
||||
BindingAction::LeaveTab => "Leave tab group".into(),
|
||||
BindingAction::CycleTab(previous) => if *previous { "Previous tab" } else { "Next tab" }.into(),
|
||||
BindingAction::Consume => "Join window into column or tab group".into(),
|
||||
BindingAction::Expel => "Leave column or tab group".into(),
|
||||
BindingAction::ToggleFloating => "Toggle floating window".into(),
|
||||
BindingAction::Media(action) => match *action {
|
||||
"next" => "Next track",
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
use super::*;
|
||||
|
||||
impl Config {
|
||||
pub fn default_column_display(&self) -> ferese_layout::ColumnDisplay {
|
||||
match self
|
||||
.scrolling
|
||||
.default_column_display
|
||||
.unwrap_or(ColumnDisplayValue::Stacked)
|
||||
{
|
||||
ColumnDisplayValue::Stacked => ferese_layout::ColumnDisplay::Stacked,
|
||||
ColumnDisplayValue::Tabbed => ferese_layout::ColumnDisplay::Tabbed,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn layout_mode(&self) -> LayoutMode {
|
||||
match self.layout.mode.unwrap_or(LayoutModeValue::Scrolling) {
|
||||
LayoutModeValue::Scrolling => LayoutMode::Scrolling,
|
||||
|
||||
Reference in new issue
Block a user