Giter Club home page Giter Club logo

Comments (9)

Fuann-Kinoko avatar Fuann-Kinoko commented on June 9, 2024 1

ah, that was the missing part I'd want to know, I think it's a good idea to put this in the readme

from miguruwm.

Fuann-Kinoko avatar Fuann-Kinoko commented on June 9, 2024

To be precise, Alacritty only fails to be tiled when its window decorations were set to none (the default option is full), in which case there's no title bar for the window.

it seems that if I manually hide the title bar for a window

        WinSet, Style, -0xC00000, A
        WinSet, Style, -0x840000, A

then MiguruWM can't handle it correctly (at the beginning)

UPDATE:

I guess that's more difficult than I first thought, as disabling the title bar results in no recognisable WinEvents.

from miguruwm.

imawizard avatar imawizard commented on June 9, 2024

Hi there,

I actually had the same issue the other week with qutebrowser.

Your first title is a better fit though I guess, because handling windows without decorations would probably yield a lot of false-positives and forcely managing a few specific windows would thus be more reasonable.

PS:
"after some minor tweaks (like toggleFullscreen, toggleFloating and other functions)", do you just mean something like

*sc05::mwm.Set("layout", { value: "Fullscreen" })

or were you missing something?

from miguruwm.

Fuann-Kinoko avatar Fuann-Kinoko commented on June 9, 2024

Sorry I may have caused you a misunderstanding, by tweaks I just mean some adjustments in personal preference, like window resizing for a float window, or refocus the last virtualdesktop. (And if I didn't miss anything, although it does not affect the normal use, the mwm.FloatWindow(hwnd) for floating on Alt-Left/Right click hasn't been implemented yet on master branch)

And, thanks for the reminder, I will change the title back to force window tilings

from miguruwm.

imawizard avatar imawizard commented on June 9, 2024

Can you test the latest version?

You should be able to make borderless windows get managed with
GroupAdd("MIGURU_DECOLESS", "ahk_exe alactritty.exe")

If you'd also want to auto-float it, add this as well
GroupAdd("MIGURU_AUTOFLOAT", "ahk_exe alactritty.exe")

from miguruwm.

Fuann-Kinoko avatar Fuann-Kinoko commented on June 9, 2024

Thanks! Can confirm that windows missing WS_CAPTION can be handled correctly after adding MIGURU_DECOLESS.

The only less important issue is that even though all other borderless are handled well, alacritty is still treated as floating initially(but it can be manually tiled with mwm.Do("float-window", { hwnd: WinExist("A"), value: "toggle" })) and I can be sure I didn't add any AUTOFLOAT for alacritty

from miguruwm.

imawizard avatar imawizard commented on June 9, 2024

I can confirm that there seems to be an issue with alacritty, apparently it's specific to alacritty and not related to it being borderless:
For example, qutebrowser works as expected for me and also giving alacritty window decorations with decorations: full doesn't result in it getting managed/retiled correctly.

Can you check if it's the same for you (buggy even if non-borderless)?
Also instead of using Do("float-window") can you try re-focusing alacritty's window shortly after it appeared e.g. by alt-tabbing twice and see if it gets picked-up correctly? If not, what about resizing the master pane with alt-h/alt-l?

from miguruwm.

Fuann-Kinoko avatar Fuann-Kinoko commented on June 9, 2024

In my environment, alacritty can be handled correctly when decorations=full.

I think it might have something to do with this

exstyle := WinGetExStyle("ahk_id" hwnd)
if exstyle & WS_EX_WINDOWEDGE == 0 {
info(() => ["Floating: no WS_EX_WINDOWEDGE {}", WinInfo(hwnd)])
shouldTile := false

Some borderless windows still have exstyle, whereas with softwares like alacritty and tauon music box, their windows don't have exstyle in their borderless mode

from miguruwm.

imawizard avatar imawizard commented on June 9, 2024

Ahh, you're right. The problem I'm having with alacritty is actually a different one, it's due to startup_mode: Maximized, I'll probably create another issue for that later.

However, after removing that setting, it's working fine for me, with or without window decorations.
It's probably in the lines you quoted, though, and for me alacritty has the style you mentioned because of some other settings I guess.

window:
  padding:
    x: 0
    y: 0
  dynamic_padding: true
  decorations: none
  #startup_mode: Maximized

Btw. to verify the log messages, you can start miguru from powershell with $env:AHK_LOG="info"; autohotkey ./mwm.ahk or $env:AHK_LOG="workspacelist=info"; autohotkey ./mwm.ahk

from miguruwm.

Related Issues (19)

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.