Skip to content

Commit

Permalink
Merge pull request #158 from sij1nk/feat/relative-monitor-including-e…
Browse files Browse the repository at this point in the history
…mpty

Add WorkspaceIdentifier(WithSpecial) variant for `r` prefix
  • Loading branch information
yavko authored Jan 27, 2024
2 parents e2517e1 + 7dbd7ff commit 54a0446
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ pub enum WorkspaceIdentifierWithSpecial<'a> {
Id(WorkspaceId),
/// The workspace relative to the current workspace
Relative(i32),
/// The workspace on the monitor relative to the current monitor
/// The workspace on the monitor relative to the current workspace
RelativeMonitor(i32),
/// The workspace on the monitor relative to the current workspace, including empty workspaces
RelativeMonitorIncludingEmpty(i32),
/// The open workspace relative to the current workspace
RelativeOpen(i32),
/// The previous Workspace
Expand All @@ -189,6 +191,7 @@ impl std::fmt::Display for WorkspaceIdentifierWithSpecial<'_> {
Name(name) => format!("name:{name}"),
Relative(int) => format_relative(*int, ""),
RelativeMonitor(int) => format_relative(*int, "m"),
RelativeMonitorIncludingEmpty(int) => format_relative(*int, "r"),
RelativeOpen(int) => format_relative(*int, "e"),
Previous => "previous".to_string(),
Empty => "empty".to_string(),
Expand All @@ -209,8 +212,10 @@ pub enum WorkspaceIdentifier<'a> {
Id(WorkspaceId),
/// The workspace relative to the current workspace
Relative(i32),
/// The workspace on the monitor relative to the current monitor
/// The workspace on the monitor relative to the current workspace
RelativeMonitor(i32),
/// The workspace on the monitor relative to the current workspace, including empty workspaces
RelativeMonitorIncludingEmpty(i32),
/// The open workspace relative to the current workspace
RelativeOpen(i32),
/// The previous Workspace
Expand All @@ -229,6 +234,7 @@ impl std::fmt::Display for WorkspaceIdentifier<'_> {
Name(name) => format!("name:{name}"),
Relative(int) => format_relative(*int, ""),
RelativeMonitor(int) => format_relative(*int, "m"),
RelativeMonitorIncludingEmpty(int) => format_relative(*int, "r"),
RelativeOpen(int) => format_relative(*int, "e"),
Previous => "previous".to_string(),
Empty => "empty".to_string(),
Expand Down

0 comments on commit 54a0446

Please sign in to comment.