pub struct Arguments {Show 19 fields
pub existing: bool,
pub group: bool,
pub group_with: Option<String>,
pub dont_attach: bool,
pub layout: bool,
pub path: Option<String>,
pub name: Option<String>,
pub print_workspace_name: bool,
pub command: Option<String>,
pub make_default_config: bool,
pub make_default_layout_config: bool,
pub print_config_schema: bool,
pub print_layout_config_schema: bool,
pub print_bash_completion: bool,
pub print_zsh_completion: bool,
pub print_fish_completion: bool,
pub print_man: bool,
pub search_paths: Option<Vec<String>>,
pub depth: Option<usize>,
}Expand description
twm (tmux workspace manager) is a customizable tool for managing workspaces in tmux sessions.
Workspaces are defined as a directory matching any workspace pattern from your configuration. If no configuration is set, any directory containing a .git file/folder or a .twm.yaml file is considered a workspace.
Environment variables that affect twm:
TWM_CONFIG_FILE: Path to the configuration file to use. Overrides the default search locations.
Environment variables that twm sets in tmux sessions:
TWM: set to 1 to indicate that you’re in a twm-managed session
TWM_ROOT: the root directory of the workspace
TWM_TYPE: the type of workspace, as defined in your configuration via the “name” on workspace definitions
TWM_NAME: the name of the session at creation time
Fields§
§existing: boolPrompt user to select an existing tmux session to attach to.
This shouldn’t be used with other options.
group: boolPrompt user to start a new session in the same group as an existing session.
Setting this option will cause -l/--layout and -p/--path to be ignored.
group_with: Option<String>Group with an existing session by name.
dont_attach: boolDon’t attach to the workspace session after opening it.
layout: boolPrompt user to select a globally-defined layout to open the workspace with.
Using this option will override any other layout definitions that would otherwise automatically be used when opening the workspace.
path: Option<String>Open the given path as a workspace.
Using this option does not require that the path be a valid workspace according to your configuration.
name: Option<String>Force the workspace to be opened with the given name.
When setting this option, you should be aware that twm will not “see” this session when performing other automatic actions.
For example, if you have a workspace at ~/foobar and run twm -n jimbob -p ~/foobar, and then run twm and select ~/foobar from the picker, a new session foobar will be created. If you then run twm -g and select foobar, foobar-1 will be created in the foobar group.
print_workspace_name: boolPrint the name of the workspace generated for the given path to stdout.
This can be used with other options.
command: Option<String>Override any layouts and open the workspace with the given command instead.
make_default_config: boolMake default configuration file.
By default will attempt to write a default configuration file and configuration schema in $XDG_CONFIG_HOME/twm/
Using -p/--path with this flag will attempt to write the files to the folder specified.
twm will not overwrite existing files. You will be prompted to rename/move the existing files before retrying.
make_default_layout_config: boolMake default local layout configuration file.
Will attempt to create .twm.yaml in the current directory. Will not overwrite existing files.
You can use -p/--path <PATH> to specify a different directory to write the file to.
print_config_schema: boolPrint the configuration file (twm.yaml) schema.
This can be used with tools (e.g. language servers) to provide autocompletion and validation when editing your configuration.
print_layout_config_schema: boolPrint the local layout configuration file (.twm.yaml) schema.
This can be used with tools (e.g. language servers) to provide autocompletion and validation when editing your configuration.
print_bash_completion: boolPrint bash completions to stdout
print_zsh_completion: boolPrint zsh completions to stdout
print_fish_completion: boolPrint fish completions to stdout
print_man: boolPrint man(1) page to stdout
search_paths: Option<Vec<String>>Paths to search for workspaces in. Overrides paths set in configuration.
Multiple paths can be specified by setting this flag multiple times, e.g. -s ~/projects -s ~/work.
depth: Option<usize>Maximum depth to search for workspaces. Overrides max depth set in configuration.
Trait Implementations§
Source§impl Args for Arguments
impl Args for Arguments
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Arguments
impl CommandFactory for Arguments
Source§impl FromArgMatches for Arguments
impl FromArgMatches for Arguments
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Arguments
impl Parser for Arguments
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Arguments
impl RefUnwindSafe for Arguments
impl Send for Arguments
impl Sync for Arguments
impl Unpin for Arguments
impl UnsafeUnpin for Arguments
impl UnwindSafe for Arguments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more