imawizard / miguruwm Goto Github PK
View Code? Open in Web Editor NEWA tiling window manager for Windows
A tiling window manager for Windows
Hi, after some minor tweaks (like toggleFullscreen, toggleFloating and other functions), I have to say that this is the most comfortable Windows TWM I've ever tried!
The native virtual desktop makes refocusing windows across workspaces quite smooth, which is an unexpected surprise!
The only thing that is a bit unfortunate though is that it seems that programs like Alacritty that are not automatically tiled, do not have a command to force them to be tiled, is there any possibility that it would be implemented in the future?
Hi, this is not an actual issue, but I didn't now hot to leave a message here (you can close/delete it).
I am very interested in a TWM that actually works and has all the basic function i need. I tried all the TWM that you linked but most tend to crash easily, lose windows, are abandoned or lack some basic features.
Amethyst and komorebi are currently the best. Tried amethyst (and still trying to use it) but has some small problems + crashes that make it not a solid tool to use (also kinda abandoned). Maybe I will test komorebi again in the future but I preferred to use windows virtual desktop for robustness and because of the tool I am linking below: it is amazing to manage your desktops when you have many windows open.
Since you are going to use the windows virtual desktop feature you too may be interested in this: https://github.com/newlooper/VirtualSpace.
When you have a working version I will try it. Good luck!
Error: Unhandled exception.
---- C:\msys64\home\User\progs\MiguruWM\lib\miguru\utils.ahk
045: {
046: SetDpiAwareness(old)
▶ 047: }
048: }
050: DWMWA_NCRENDERING_ENABLED := 1
Able to reproduce consistently.
Hello I get this error on certain types of borderless windows.
Error: This value of type "Integer" has no property named "workspace".
---- C:\msys64\home\User\progs\MiguruWM\lib\miguru\miguru.ahk
529: {
530: window := this._managed.Get(hwnd, 0)
▶ 531: next := window.workspace.Remove(hwnd)
532: ws.AddIfNew(hwnd)
533: ws.ActiveWindow := hwnd
The current thread will exit.
Call stack:
C:\msys64\home\User\progs\MiguruWM\lib\miguru\miguru.ahk (531) : [MiguruWM.Prototype._onRequest] next := window.workspace.Remove(hwnd)
C:\msys64\home\User\progs\MiguruWM\lib\miguru\events.ahk (151) : [WMEvents.Prototype._onMessage] ret := this._onRequest(req)
C:\msys64\home\User\progs\MiguruWM\lib\miguru\events.ahk (84) : [Func.Prototype.Call] Return fn.Call(ObjFromPtrAddRef(self), args*)
C:\msys64\home\User\progs\MiguruWM\lib\miguru\events.ahk (84) : [] Return fn.Call(ObjFromPtrAddRef(self), args*)
> OnMessage
OS: Window 10 (1809)
Minor bug.
explorer/folder navigation isn't managed on opening. You need to move the window so that miguruWM sees it.
When using Win+E to navigate folders, the new window is not managed/tiled.
Same when opening a folder through Run (Win+R). I mean folders like shell:startup or %appdata%.
Same when opening a folder through the start menu.
Same when opening a folder with right click and then "open folder in new window".
Same with CMD:
when opening from start, from Run (win+R) or double clicking a *.cmd.
I also tried a couple other option with Run:
Examples for affected windows:
Examples for not affected windows (system DPI aware):
Returned values are not reliable:
ExtendedFrameBounds(0x00020a6c) are {bottom = 11, left = 11, right = 11, top = 0}
ExtendenFrameBounds(0x00020a6c) are {bottom = 11, left = 12, right = 10, top = 0}
Currently only Win10 is supported.
In a few months my corporate laptop will be updated to Windows 11, though, so I'll very likely add Win11 support then.
Moving windows between monitors is done by removing it from the current monitor's workspace's window list, appending it to another one and retiling that other workspace.
Floating windows remain untouched when retiling and thus don't move at all.
When a window is shown on all desktops by pinning it or its app, then it's not being managed because DesktopByWindow fails for them. Upon pinning a window that's already being managed e.g. "Window moved from (1, 3) to (1, 0)" is logged.
Setting MIGURU_DECOLESS works, but if miguru is reloaded such windows remain managed but not tiled. To fix it I have to use ^t manually on each one. This is cumbersome, what change do I need to make this automatic?
Hi,
would it make sense to differentiate vertical padding from lateral?
I have recently bought a wide screen monitor. Now when I have only one window or when I use the monocle layout I have one REAAAALLY wide window and sometimes it can be unwelcome and not easy to use.
So I was thinking about setting a monocle layout with big lateral padding to have a more manageable window.
Are you still working on this project? I have been using this for months now and I really like it.
It still lack a couple of feature that are mandatory to make it actually usable:
Without these features the tool gets in the way so many times that is as helpful as it is hurtful (at least for the programs I use).
I have implemented both in my local version but with a junky_approach_that_kinda_works_because_I_know_how_I_made_it.
I hope you are still working on it. Nice work.
Hi wizard,
Thanks for fixing all the issues this far. My question if it is possible to run MiguruWM without explorer?
It crashes and nothing works once explorer.exe is killed. How difficult would it be (if possible at all) to keep it functioning in such
an environment?
Right now calling VD.FocusDesktop focuses the taskbar (to prevent the taskbar icons from flashing) and restores the prior active window with Alt-Escape (see commit 5621361).
However, there are cases where it's not working consistently, e.g.:
_onDesktopEvent
using workspace.ActiveWindow
actually results in the pinned window, not in actual prior active windowSwitching desktops with the built-in method by swiping the trackpad does not have these limitations (there are other minor annoyances, though, I can't recall right now), but I couldn't find a workaround so far.
Ultimately it should be possible mimicking the built-in behaviour by reversing the swipe-handlers twinui.pcshell.dll, which would obviously be pretty time-consuming, though.
Similiar to the behaviour described here: xmonad - floating clients
The popup fix commit exposed a bug:
a1454e9
Error: This variable has not been assigned a value.
Specifically: local iconWidth
---- C:\msys64\home\User\progs\MiguruWM\lib\Popup.ahk
089: iconHeight := 0
090: }
▶ 093: msgX := Max(horzPadding // 2 + iconWidth / 1.5, horzPadding // 4 + iconWidth)
094: msg.GetPos(, , &msgWidth, &msgHeight)
095: guiWidth := msgWidth + horzPadding + iconWidth // 2
The current thread will exit.
Call stack:
C:\msys64\home\User\progs\MiguruWM\lib\Popup.ahk (93) : [Popup.Prototype.__New] msgX := Max(horzPadding // 2 + iconWidth / 1.5, horzPadding // 4 + iconWidth)
C:\msys64\home\User\progs\MiguruWM\mwm.ahk (50) : [Object.Call] Return Popup(text, ObjMerge({ showIcon: true, }, opts))
C:\msys64\home\User\progs\MiguruWM\mwm.ahk (50) : [] Return Popup(text, ObjMerge({ showIcon: true, }, opts))
C:\msys64\home\User\progs\MiguruWM\lib\miguru\miguru.ahk (702) : [Func.Prototype.Call] this._opts.showPopup.Call(ws.Layout.DisplayName, { activeMonitor: this.activeMonitor.Index, })
C:\msys64\home\User\progs\MiguruWM\lib\miguru\miguru.ahk (702) : [MiguruWM.Prototype._onRequest] this._opts.showPopup.Call(ws.Layout.DisplayName, { activeMonitor: this.activeMonitor.Index, })
C:\msys64\home\User\progs\MiguruWM\lib\miguru\events.ahk (151) : [WMEvents.Prototype._onMessage] ret := this._onRequest(req)
C:\msys64\home\User\progs\MiguruWM\lib\miguru\events.ahk (84) : [Func.Prototype.Call] Return fn.Call(ObjFromPtrAddRef(self), args*)
C:\msys64\home\User\progs\MiguruWM\lib\miguru\events.ahk (84) : [] Return fn.Call(ObjFromPtrAddRef(self), args*)
this is just changing layout.
Here's a quick patch to fix it
diff --git a/lib/Popup.ahk b/lib/Popup.ahk
index 5e93637..39c398f 100644
--- a/lib/Popup.ahk
+++ b/lib/Popup.ahk
@@ -70,6 +70,9 @@ class Popup {
;; Create window hidden to get text width and height.
g.Show("Hide")
+ icon := ""
+ iconWidth := 0
+ iconHeight := 0
if showIcon {
file := A_IconFile
@@ -83,10 +86,6 @@ class Popup {
icon := g.Add("Picture", "Icon1", file)
icon.GetPos(, , &iconWidth, &iconHeight)
}
- } else {
- icon := ""
- iconWidth := 0
- iconHeight := 0
}
;; Resize window to message plus padding.
I tried changing mod1 from Alt to Win, but it did not work.
Also, some functions seem to be hardcoded with win key.
Is this key assignment not expected?
Minor issue with the unpin code.
I have written the following function to toggle the pinned status
#t::{
if mwm.VD.IsWindowPinned(WinExist("A")) = true {
TrayTip("Miguru","UnPinned",16)
SetTimer HideTrayTip, -1000
view := mwm.VD.viewCollection.GetViewForHwnd(WinExist("A"))
mwm.VD.pinnedApps.UnpinView(view)
} else {
view := mwm.VD.viewCollection.GetViewForHwnd(WinExist("A"))
mwm.VD.pinnedApps.PinView(view)
TrayTip("Miguru","Pinned",16)
SetTimer HideTrayTip, -1000
}
}
but when unpinning there was an error:
It was easily solved by deleting one line inside:
MiguruWM/lib/vd/interfaces/IVirtualDesktopPinnedApps.ahk
The Unpin function is now:
UnpinView(view) {
this._funcs["UnpinView"](
"Ptr", view,
"HRESULT",
)
}
There is an issue, and I think this started happening after the last batch of commits where switching to some workspace does not work at all.
For example you press alt+3 and nothing happens. It depends on what windows I have on that workspace. I think my windows become unmanaged after I switch workspace and then do some more window switching on the other one. But I don't get why it won't even switch the workspace at all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.