Giter Club home page Giter Club logo

miguruwm's People

Contributors

fuann-kinoko avatar imawizard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

miguruwm's Issues

Feature Request: Force tiling windows that are not handled as default

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?

just a message + tool suggestion

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!

Exception when opening Openshot Video Editor.

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.

Error when moving certain window type to workspace.

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

BUG when opening a folder or cmd

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:

  • regedit worked fine
  • ms-settings: worked fine

ExtendedFrameBounds is flaky for DPI unaware windows

Examples for affected windows:

  • GitExtensions (window=96 monitor=144 system=144)
  • dirtyJOE (window=96 monitor=144 system=144)

Examples for not affected windows (system DPI aware):

  • WinSpy (window=144 monitor=144 system=144)
  • Process Hacker (window=144 monitor=144 system=144)

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}

Windows 11 Support

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.

Can't move floating windows between monitors

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.

Pinned windows are being ignored

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.

differentiate lateral padding from vertical padding

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:

  1. a way to ignore window/programs so that they are not managed (#3)
  2. a way to ignore window that requires administrator privileges

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.

Run MiguruWM without explorer.exe

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?

Inconsistent focus upon switching desktops

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.:

  1. MS Teams is running but its main-window is not opened anywhere
    • upon switching desktops with above method the (actually closed) MS Teams gets focused
    • IsWindowVisible returns true, IsWindowCloaked returns false, VD.DesktopByWindow returns unassigned
  2. there's a pinned window
    • it's always the pinned window that gets focused upon switching desktops with above method
    • also right before the EV_DESKTOP_CHANGED-event, there's a EV_WINDOW_FOCUSED-event for the pinned window, so in _onDesktopEvent using workspace.ActiveWindow actually results in the pinned window, not in actual prior active window

Switching 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.

Manual/automatic floating of specific windows

Similiar to the behaviour described here: xmonad - floating clients

  • Manually with a hotkey
  • Automatically via rules (e.g. ahk_group)
  • Automatically via minimum window size
  • Possibly set always on top for floating windows
  • Add hotkey to switch between tiled and floating windows and to iterate latter ones when iterating they come after the tiled windows

Issue with last commits

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.

Can I use Win (Super) as hotkey?

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 unpin functionality

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:
image

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",
        )
    }

Sometimes can't switch to workspace.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.