Created
March 9, 2012 22:16
-
-
Save AeroNotix/2009005 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 22:51:17 AeroNotix | dmpayton: my attempt basically creating a function which subbed to the hook.window_new (or whatever it's called). │ | |
| | This function had a dict that I popped when a window matching a dict entry got used then sent it to the correct │ | |
| | window, with an inner closure. │ | |
| 22:51:30 dmpayton | That's what I used to us │ | |
| 22:51:51 dmpayton | https://github.com/dmpayton/dotfiles/blob/ef0e94f1dd17642a2cb478849cd9fc61924665a0/qtile/config.py#L124 │ | |
| 22:52:25 AeroNotix | dmpayton: no │ | |
| 22:52:38 AeroNotix | dmpayton: I was trying to make it so it'd only put them into the groups the _first_ time │ | |
| 22:52:49 AeroNotix | dmpayton: and then the next time it would ignore where i opened the window │ | |
| 22:52:55 dmpayton | Oh │ | |
| 22:53:04 dmpayton | I see │ | |
| 22:53:57 AeroNotix | dmpayton: I'm well and truly vodka'd at this moment in time but I remember that because it gets fileexec'd then any │ | |
| | mutable data is lost ??? I can't fucking remember where's my DRINK │ | |
| 22:54:16 AeroNotix | dmpayton: I think that's what it is, file exec? what's the function? │ | |
| 22:55:13 AeroNotix | dmpayton: execfile │ | |
| 22:55:55 AeroNotix | dmpayton: because it uses execfile, I think (might be mis-remembering here) any global data that doesn't match what │ | |
| | it's looking for is lost completey. Hence my attempt with closures, but it didn't work with that, either. │ | |
| 22:57:23 dmpayton | I just thought of a nasty implementation of storing the state on a file on disk, and reading that on the new window │ | |
| | hook │ | |
| 22:57:32 dmpayton | Gross. │ | |
| 22:59:15 AeroNotix | dmpayton: It also crossed my mind but I'm sure we can fit some json in there │ | |
| 23:00:07 dmpayton | Yeah, thats what my thought was -- just store a dict as json in a dotfile, and clear it on qtile startup. │ | |
| 23:00:30 AeroNotix | dmpayton: but maybe we could just pull the dict from a git repo when the hook gets fired? Possibly using XML? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment