The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

scripting i3. How ?

asked 2013-01-18 11:18:25 +0000

Goran gravatar image

updated 2013-01-18 11:20:29 +0000

So my main concern is that the language used for .config is not a real scripting language but some sort of English dialect. Like those jokes about people trying to talk with the shell in pure English :). Then again that is not a trivial matter to program and Michael said he is not going in that direction and they also moved to a home made informative parser, which is nice I guess.

So what is left for me to do? I want to fell the tree structure with my keyboard and adjust it accordingly. First of how do I now if a command passed to i3-msg executed successively all I get is [{"success":true}]? What sort of information i3 output's to me? I need to be able to query stuff.

So I saw that i3-msg has some functionality like printing the tree structure and workspaces , outputs and similar but what should I do with this? I guess the tree is stored somewhere in some file and that I need to adjust it by changing that file "manually" ??? In that case I would really need more powerful robust commands instead of doing it by hand or implementing my own function's (aka plugin).

In the end it would be best if there was a nice scripting language for i3 so that users can make there own UI and workflow and developers job wold be to provide the user with robust and powerful function's

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-01-18 11:24:39 +0000

Michael gravatar image

I think you are looking for http://i3wm.org/docs/ipc.html which documents what is possible and how it’s done, both on the wire and referring to libraries in various languages (e.g. i3-py).

I just want to comment specifically on your last paragraph:

In the end it would be best if there was a nice scripting language for i3 so that users can make there own UI and workflow and developers job wold be to provide the user with robust and powerful function's

I disagree. i3 aims to provide a usable window manager, not a framework for writing your own window manager. If you don’t find i3 usable as-is, you should go look elsewhere. Have a look at awesome, XMonad, wmfs, etc…

edit flag offensive delete link more

Comments

Michale tnx for the replay. The problem with your last remark is that neither of mentioned window managers has a simple scripting language :). Just one question. If you "easily" could make it a 'framework' as you say. Would you do it ?

Goran gravatar imageGoran ( 2013-01-18 11:48:52 +0000 )edit

The problem with creating such a framework is that it is not easy ;-). You have to think of _a lot_ of cases and essentially provide the user with a higher level of abstraction than talking to X11 directly. I think most users would not care for such a framework.

Michael gravatar imageMichael ( 2013-01-18 13:21:09 +0000 )edit

Question Tools

Stats

Asked: 2013-01-18 11:18:25 +0000

Seen: 1,068 times

Last updated: Jan 18 '13