4 ms·
Can you clue me in on how you did all that? I'd love some inspiration. That sounds really great.
by geocrasher 3y ago
Can you clue me in on how you did all that? I'd love some inspiration. That sounds really great.
- csdvrx 3y agoThe simplest way is 1 hotkey for specific position. For my first attempt, using my arrow cluster, I divided my screen in roughly third: - top left: win+pageup - bottom left win+left - top center: win+up - bottom center: win+down - top right: win+pagedown - bottom right: win+down Then you just remove the decorations and put windows there, using the coordinates you get. You can also create toggles, here's a simple one: WinGetPos, X, Y, Width, Height, A ;MsgBox, is at %X%`,%Y% if (X == 1800-640) { WinMove,A,, 0,0, 1800, 1200 } else { WinMove,A,, 1800-640, 1200-480, 640, 480 } Extend the logic to use more (or less) of the 3x2 grid. If you prefer to keep some windows floating: ; Get window style WinGet, S, Style, A if (S & 0x00C00000) { ; If not borderless, toggle all: ; 0xC00000:border, 0x40000:resize border, 0x00000200:WS_EX_CLIENTEDGE WinSet, Style, -0xC40200, A Winset, Alwaysontop, On, A } else { WinSet, Style, +0xC40200, A Winset, Alwaysontop, Off, A } You can automatize more by hooking to events like OnMessage(WM_DISPLAYCHANGE, "displayChange") which will trigger the function when you move from tablet to portrait mode: just adapt the dimensions. Look on the forums and you will find plenty of such examples. I've now moved to Linux and roughly replicated some of my setting using hyprland (wayland), but there are many things I miss from AHK BTW, for the dlls, here's an example of how on Windows 10 the taskbar could be programmatically changed to small icons, then refreshed: DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 0, UInt,4, UInt,0) DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 4, UInt,4, UInt,0) DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 8, UInt,4, UInt,A_ScreenWidth) DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 12,UInt,4, UInt,Top) DllCall("SystemParametersInfo", UInt,0x2F, UInt,0, UInt,&area, UInt,0) Think of that more or less like changing the CSS then sending `pkill -USR1 waybar`
- Jochim 3y agoIn case you're interested in something low effort Microsoft's FancyZones[0], included in PowerToys and iirc Windows 11, has some basic window tiling. It supports defining arbitrary zone layouts, switching between different layouts with hotkeys, snapping windows to them using the mouse or hotkeys, remembering which zone a window was in, snapping child windows/popups to zones. It doesn't lock windows in place or remove window decorations unfortunately. There's some other great stuff in PowerToys as well, they can all be enabled optionally. * Bulk file rename in the context menu. Rename large numbers of files in a UI using regex/pattern matching. * File lock viewer: See which process is preventing a file being deleted. * PowerToys Run: basically spotlight or a system wide version of vscode's command bar. It can do calculations, find files, launch programs. Bound to a global hotkey of alt+space. * Text extractor: like snipping tool but tries to use OCR to extract text from the capture region. [0] https://learn.microsoft.com/en-us/windows/powertoys/fancyzones https://learn.microsoft.com/en-us/windows/powertoys/fancyzon...
- pulpfictional 3y agoFlow Launcher and Fluent Search do a better job than the powertoys one. By the time Powertoys got a result I could've opened the program with the mouse. https://github.com/adirh3/Fluent-Search https://github.com/adirh3/Fluent-Search https://github.com/Flow-Launcher/Flow.Launcher https://github.com/Flow-Launcher/Flow.Launcher The Fluent Search creator is pretty active and available on Discord.
- Jochim 3y agoThat's fair. I haven't evaluated any alternatives but the powertoys launcher can definitely be slow at times.
- pulpfictional 3y agoGive them a shot if you like the feature, it's worth it.
- lolive 3y agoJust mentionned FancyZones in another comment above. I highly recommend you give a look at it!