As far as a scratchpad.py goes, I do not have that file. My scratchpad is
set up in my groups.py file, and is simply declared as such:
groups = [
Group("Development"),
... (Other Groups),
ScratchPad("scratchpad", [
DropDown("browser", "qutebrowser -R --basedir
~/.config/scratchpad_qutebrowser/",
on_focus_lost_hide=False, x=0.05, y=0.05,
width=0.9, height=0.9),
... (Other similar DropDowns)
]),
]
As for what I meant regarding the scratchpad being called to, what I meant
was that I was confused that the client isn't first being assigned to the
'scratchpad' group, then re-assigned to the current group.It's instead
being directly assigned to the group I want the DropDown to appear on. That
does make some sense when I think about it, I was just confirming that that
is indeed what it supposed to happen.
Regarding the group_window_add hook, I see that it doesn't appear to pass
any arguments. What would be the best way to get the window that was just
added when it's called?
Really, I just need any way to identify when a new window is created that
is part of the Scratchpad group, and I was hoping to do it without relying
on how the internals of the groups work, since I wanted to future-proof it
in case a change is made in the future. I feel like what I want to do is,
in theory, really simple and I'm just misunderstanding the correct way to
go about it. When I create the Scratchpad, I know I add a bunch of DropDown
items to it that have an associated label, but these aren't themselves the
window to my understanding. Instead, the DropDown will start without a
window, and is assigned a window dynamically when I press the corresponding
keybinding if said window doesn't already exist, right? I could pass the
lazy object to a new function, toggle_dropdown(dd_label, lazy), and have it
request lazy.group['scratchpad'].dropdown_toggle(dd_label), then on the
next line call
lazy.group['scratchpad'].dropdowns[dd_label].window.on_scratchpad = True,
right? But this feels like I'm digging too deep into the internal state of
qtile and relying on Scratchpads working in this manner, when it's possible
the internal data structures may change in the future.
Apologies if I'm making this all overly complicated. It would be no lie to
say I'm just learning as I go here.
On Tuesday, June 11, 2019 at 11:09:44 AM UTC-4, Tycho Andersen wrote:
>
> On Mon, Jun 10, 2019 at 03:19:25PM -0700, Aaron Helton wrote:
> >
> > Now that I've done some more logging I confirmed that the issue appears
> to be in my client_managed hook. The check windoe.group.name ==
> 'scratchpad' always appears to be false and the group instead always comes
> up as the group the scratchpad is being called to. Is this expected
> behavior?
>
> What do you mean "the scratchpad is being called to"? It should be the
> group the client is initially assigned to once it's managed. You can
> follow the code in libqtile/core/manager.py:599 in the manage()
> function.
>
> Maybe you want group_window_add, for the scratchpad group instead?
>
> Tycho
>
--
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/4fe177e2-bb02-4347-993b-44a5369d300b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.