Skip to content

Commit

Permalink
Add Optional Behavior Settings for FocusNextTag and FocusPreviousTag (l…
Browse files Browse the repository at this point in the history
…eftwm#1086)

* added GoToNextEmptyTag

* updated gitignore

* removed .vscode

* changed to FocusNextEmptyTag

* added FocusPreviousEmptyTag

* changed to boolean option of FocusNextTab and FocusPreviousTab

* added ability to focus next/previous used tag

* Update leftwm-core/src/utils/command_pipe.rs

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>

* Update leftwm-core/src/utils/command_pipe.rs

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>

* builder for FocusNextTag and FocusPreviousTag error on invalid behavior

* implemented fixes from VuiMuich's fork, and cut down on lifetime use in command_pipe.rs

* cargo fmt

* updated leftwm command list

* github clippies again

---------

Co-authored-by: VuiMuich <vuimuich@quantentunnel.de>
Co-authored-by: VuiMuich <jm.spam@gmx.net>
  • Loading branch information
3 people authored Jun 14, 2023
1 parent 7c1ca73 commit 0395d2e
Show file tree
Hide file tree
Showing 7 changed files with 666 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ result
sweep.timestamp

.toggletasks.json

.vscode/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ install-linked: build
uninstall:
sudo rm -f $(SHARE_DIR)/leftwm.desktop
sudo rm /usr/local/share/man/man1/leftwm.1
sudo rm -f $(SHARE_DIR)/leftwm
sudo rm -rf $(SHARE_DIR)/leftwm
sudo rm -f\
$(TARGET_DIR)/leftwm\
$(TARGET_DIR)/leftwm-worker\
Expand Down
15 changes: 13 additions & 2 deletions leftwm-core/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ pub enum Command {
SwapWindowTop {
swap: bool,
},
FocusNextTag,
FocusPreviousTag,
FocusNextTag {
behavior: FocusDeltaBehavior,
},
FocusPreviousTag {
behavior: FocusDeltaBehavior,
},
FocusWindow(String),
FocusWindowUp,
FocusWindowDown,
Expand Down Expand Up @@ -78,3 +82,10 @@ pub enum Command {
CloseAllOtherWindows,
Other(String),
}

#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
pub enum FocusDeltaBehavior {
Default,
IgnoreUsed,
IgnoreEmpty,
}
Loading

0 comments on commit 0395d2e

Please sign in to comment.