Open ortango opened 2 years ago
Hm yeah I might have to rethink the feature system. The idea was to not require all possible C interfaces for all possible WMs to be installed as that would be rather inconvenient. However, currently on the flip side this means that you can only build wmfocus with a single WM feature at a time. I realize this might be inconvenient. Due to a lack of time, I'd be happy for suggestions here.
i'm not experienced enough with rust to make qualified suggestions on this. the simplest solutions i can come up with avoiding some type of plugin system:
wm.rs
and having a "provider" enum with #[cfg
s determining the current features. is there a decent way to do this without duplicated #[cfg
directives in get_desktop()
and focus_window()
.This relates to https://github.com/svenstaro/wmfocus/pull/138 where Sway is implemented as a separate "feature" from i3, so they both can't be compiled at the same time. That would be inconvenient if you switch between Sway and i3. I only use Sway now, but for a period I did switch back and forth.
I'm a beginner Rust developer, so my best idea to deal with was was compile multiple OS packages, one for each "feature". All would generate a "wmfocus" binary.
Another idea is to simply encourage installation using cargo
instead of an OS package manager, and have people enable whichever WM they need that way.
After attempting to add bspwm support for wmfocus i've run into an issue building the project with all features enabled. what would be the proper way to add an additional feature?
I also wonder if there is need for a function that would enable switching
wm
's provider at runtime? whether it is through a user specified choice or automatically by querying_NET_SUPPORTING_WM_CHECK
.