HarveyHunt / howm

A lightweight, X11 tiling window manager that behaves like vim
GNU General Public License v2.0
649 stars 24 forks source link

Implement Querying State #49

Closed HarveyHunt closed 8 years ago

HarveyHunt commented 9 years ago

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.

Anachron commented 8 years ago

Bump. I would love the same thing. Best via a console script to be language agnostic.

HarveyHunt commented 8 years ago

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)?

HarveyHunt commented 8 years ago

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.

Anachron commented 8 years ago

I'd vote for sockets! I've never had bad experience with them. (Unlike dbus ...)

HarveyHunt commented 8 years ago

Okay, sockets it is then. I'll take a look at it this week. :-)

HarveyHunt commented 8 years ago

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.

Anachron commented 8 years ago

Do you mind elaborating the reason? How else can external applications query the data from this tool?

HarveyHunt commented 8 years ago

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.