Closed HarveyHunt closed 8 years ago
Bump. I would love the same thing. Best via a console script to be language agnostic.
I took a look at this the other day, the issue that I can see is how will a user script be aware of an event - such as a window opening, layout changing etc?
Constantly polling using cottage doesn't seem like a good idea, ideally we want a user script to be notified of change, perhaps Dbus could be useful for that (I haven't used Dbus before, nor have I looked into much)?
Alternatively, howm could write to its Unix socket and cottage could work like a daemon - waiting for something to be sent to the socket and then perform an action.
I'd vote for sockets! I've never had bad experience with them. (Unlike dbus ...)
Okay, sockets it is then. I'll take a look at it this week. :-)
I've had more of a think about this and I don't think it is something I am going to implement - this feels like feature creep and I can justify adding the extra code.
Do you mind elaborating the reason? How else can external applications query the data from this tool?
Currently information about workspaces etc is send to stdout
, so other programs can parse that.
The networking part of howm wasn't designed to send information back to cottage, so both howm and cottage will need some big changes. I'd rather keep howm focused on its core ideas, I think it is almost feature complete as it is.
I think that it should be possible to ask howm information about its current state, such as layout, mode, config options etc.
This would also be helpful for querying information about clients, workspaces etc. Imagine being able to write a small program that can be used to search and then focus a given window.