Closed Schievel1 closed 1 year ago
I've tried making a nix file for this, but when I try to build it, it complains about the Makefile. Do you know what I can do to fix this?
make: *** No rule to make target 'scratchpad', needed by 'install'. Stop.
Provided that the script is somewhere in path I created this patch for waybar to make the on-click
feature of wlr/workspaces work with this.
--- a/src/modules/wlr/workspace_manager.cpp
+++ b/src/modules/wlr/workspace_manager.cpp
@@ -511,7 +511,8 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
if (action.empty())
return true;
else if (action == "activate") {
- zext_workspace_handle_v1_activate(workspace_handle_);
+ const std::string command = "try_swap_workspace " + name_;
+ system(command.c_str());
} else if (action == "close") {
zext_workspace_handle_v1_remove(workspace_handle_);
} else {
Maybe we can get a PR merged in waybar that makes the command configurable in the future. Hyprland (without this script) needs this as well.
I've tried making a nix file for this, but when I try to build it, it complains about the Makefile. Do you know what I can do to fix this?
make: *** No rule to make target 'scratchpad', needed by 'install'. Stop.
Yes, I’m pretty sure I didn’t do the Makefile properly. Should be fixed now.
Hey :wave:
Inspired from this discussion on the hyprland repository try_swap_workspace is a binding to mimic the 'arbitrary workspace on arbitrary monitor' on arbitrary monitor behavior known from may window managers. This means:
I hope this helps some people that want hyprland to behave like their old windowmanager. (For me that was xmonad). I tried to mimic the existing script for scratchpatch as much as possible, I don't know how to write nix packages, though. So I skipped that.
I think the explanation already describes it well enough, but let me know if you want a screen recording. I have to figure out how to do that first then. If people come up with any other modes of how workspaces and windows should behave with multi monitors (I am bad in imagining them, but people come up with new weird stuff all the time) we can probably add some extra flags to this script to change behavior. For now lets keep it simple.
Cheers! :tada: