thanks both! I managed to get it working with my config :) On Tuesday, 14 September 2021 at 16:36:57 UTC+1 [email protected] wrote:
> On Tue, Sep 14, 2021 at 6:03 AM Kai Stian Olstad <[email protected]> > wrote: > >> On 13.09.2021 22:59, David Budzynski wrote: >> > Sorry for not explaining this. Let's say I set a floating rule for MPV >> > windows. Sometimes I would like to make that floating window to tile >> > (there are cases when I open 4 mpv windows and that gets difficult to >> > manage), or make any floating windows in the workspace to tile - I >> > don't >> > mind as long as it's possible to toggle between floating and tiling. >> >> You can use lazy.window.toggle_floating() >> I have this in my config >> Key([mod], "t", lazy.window.toggle_floating(), desc='Toggle floating'), >> > I pair that with > EzKey('M-<space>', f.toggle_focus_floating(), f.warp_cursor_here()), > > where f.toggle_focus_floating() is: > > def toggle_focus_floating(): > > '''Toggle focus between floating window and other windows in group''' > > @lazy.function > def _toggle_focus_floating(qtile): > group = qtile.current_group > switch = 'non-float' if qtile.current_window.floating else 'float' > logger.debug(f'toggle_focus_floating: switch = {switch}\t > current_window: {qtile.current_window}') > logger.debug(f'focus_history: {group.focus_history}') > > > for win in reversed(group.focus_history): > logger.debug(f'{win}: {win.floating}') > if switch=='float' and win.floating: > # win.focus(warp=False) > group.focus(win) > return > if switch=='non-float' and not win.floating: > # win.focus(warp=False) > group.focus(win) > return > return _toggle_focus_floating > > That way if I accidentally go create a floating window I can get to it via > keyboard to un-float it. Or in cases where I want to go back and forth > between a floating window and a tiled window. > > >> >> -- >> Kai Stian Olstad > > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "qtile-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/qtile-dev/c91ad89cd39c7b5628d2f8cdf3176166%40olstad.com >> . >> > -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/d3186f88-a8e8-456f-997c-2082fb7ab977n%40googlegroups.com.
