bug.n
bug.n copied to clipboard
Feature Request: Windows 10 Virtual Desktops
I'd like to utilize windows 10 virtual desktops as precision trackpads support desktop switching via gestures and it would be amazing to combine that with bug.n. It's fairly easy to get and manage and detect virtual desktops via registry entries (https://www.computerhope.com/tips/tip224.htm) however I haven't been able to integrate them into bug.n.
Ideally I'd be able to do one of these two things (enabled via config?) - -Make bug.n virtual desktop aware and use that instead of views to manage windows (I'd imagine this is super time intensive) -Disable bug.n from seeing windows open in other virtual desktops, at the moment bug.n detects window sizes of windows in different virtual desktops, making it useless to try to utilize both.
I have been trying to do this myself and haven't found a way to do either - the latter seems like it would be easier but messing with the tiler is a tricky proposition. I'm probably making assumptions here, but perhaps monitoring the registry keys and syncing views up with desktops might be the easiest way to go? (if desktop X is activated, switch to view X)
The idea crossed my mind, too. But my greatest concern is, that there is no stable API and the unofficial/ unstable API does not support moving windows to a different virtual desktop. One could use the tip you mentioned, even for moving a window, but it is too instable and error-prone. Therewith I do not see a viable possibility replacing bug.n views with Windows virtual desktops.
Making bug.n compatible with Windows virtual desktops would need a rewrite of the current implementation of bug.n, since the window detection and view model are depending on each other. I did some testing, but could not find a way to get the current code base working with virtual desktops.
Would it be an interesting idea to implement gesture control for views?
Yeah understood. I have been able to sort of make it work with AutoHotKey - using windows integrated touchpad controls and then an external program that allows moving between virtual desktops with keyboard shortcuts.
"Would it be an interesting idea to implement gesture control for views?"
This would solve my issue entirely :) I basically just want to be able to switch views with three finger swipes left and right.
What external program are you using and does it move windows between virtual desktops? Are you still using bug.n for tiling?
I did some initial tests with the current development version of bug.n. By adding the following two lines to Config.ini it already seems to work:
Config_hotkey=WheelLeft::Monitor_activateView(0, -1)
Config_hotkey=WheelRight::Monitor_activateView(0, +1)
Although it is a bit oversensitive. And it is only two finger scrolling, of course; but maybe #WheelLeft
would be accommodating enough.
Thanks I'll play around with it.
This is the program I was using to move windows between desktops: https://github.com/Eun/MoveToDesktop
And then I was using a variation on the AHK linked in my first post to move between virtual desktops.
It's a lot clunkier than bug.n, however.
EDIT: Looks like AHK straight up doesn't detect three finger swipes/etc. I'm sure something detectable happens when I do it, but I don't think the hooks catch it.
Hi, I know you said it would be difficult to change the existing code. I'm just curiously wondering if Microsoft didn't provided a way to get a windows current desktop? I feel like that would be a really important feature, cause things like rainmeter are able to ~~differentiate~~ tell what desktop they are on. I just finished my first bug.n config, and I was starting to feel really happy with it. It has really come a long way. But... I really prefer to use windows' virtual desktops, though I'll give views a try.
@ducklin5 You can via registry - here's an example: https://www.computerhope.com/tips/tip224.htm
Oh, switching ~~tabs~~ desktops really isnt an issue for me, my issue is the fact that bug.n is tilling everything as though they were on the same desktop. So now Ive got a windows in my second work space taking up only half of the screen because its being tiled with a window in the first work space.
I had a look at the registry keys on my pc at work, but they were not present; therefor it seems not that reliable; but I did some test with the code written by qwerty12 and got some intial results. Therewith it would be possible to detect the current desktop, I think, but bug.n's window detection is still buried deep.
I am using this right now, at work, but I have not tested it with bug.n: https://github.com/binarylandscapes/win-10-virtual-desktop-enhancer It uses this DLL to hook api calls for AHK: https://github.com/Ciantic/VirtualDesktopAccessor
There could still be a lot of rewriting if the code is using a "global" windows list. Maybe just giving those methods context to only the current virtual desktop ID would be enough.