mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-09-14 05:41:59 +02:00
wip
This commit is contained in:
@@ -9,6 +9,7 @@ use std::fs::OpenOptions;
|
||||
use std::io::BufRead;
|
||||
use std::io::BufReader;
|
||||
use std::io::Write;
|
||||
use std::num::NonZeroUsize;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
@@ -963,6 +964,12 @@ struct EagerFocus {
|
||||
exe: String,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
struct ScrollingLayoutColumns {
|
||||
/// Desired number of visible columns
|
||||
count: NonZeroUsize,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
#[clap(author, about, version = build::CLAP_LONG_VERSION)]
|
||||
struct Opts {
|
||||
@@ -1202,6 +1209,9 @@ enum SubCommand {
|
||||
/// Cycle between available layouts
|
||||
#[clap(arg_required_else_help = true)]
|
||||
CycleLayout(CycleLayout),
|
||||
/// Set the number of visible columns for the Scrolling layout on the focused workspace
|
||||
#[clap(arg_required_else_help = true)]
|
||||
ScrollingLayoutColumns(ScrollingLayoutColumns),
|
||||
/// Load a custom layout from file for the focused workspace
|
||||
#[clap(hide = true)]
|
||||
#[clap(arg_required_else_help = true)]
|
||||
@@ -2625,6 +2635,9 @@ if (Get-Command Get-CimInstance -ErrorAction SilentlyContinue) {
|
||||
SubCommand::CycleLayout(arg) => {
|
||||
send_message(&SocketMessage::CycleLayout(arg.cycle_direction))?;
|
||||
}
|
||||
SubCommand::ScrollingLayoutColumns(arg) => {
|
||||
send_message(&SocketMessage::ScrollingLayoutColumns(arg.count))?;
|
||||
}
|
||||
SubCommand::LoadCustomLayout(arg) => {
|
||||
send_message(&SocketMessage::ChangeLayoutCustom(arg.path))?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user