Comments (10)
Oh ok put it in there then.
from i3ipc-python.
Looking closer, it seems that only get_workspaces()
actually returns a visibility info.
This uses that function to fill in the relevant data, but it's hackish. Another option would be to just drop visible
from the attribute docstring.
from i3ipc-python.
This uses that function to fill in the relevant data,
That won't work because the window can be hidden in a stack or by a floating window.
Another option would be to just drop visible from the attribute docstring.
Yeah that's probably best.
from i3ipc-python.
Search the i3 tracker for this. I think it's already been discussed. You'll have to fix this in i3 for me to support it.
from i3ipc-python.
@acrisci I looked for issues related to this on i3
repo, but couldn't find an issue that deals with exactly the current use case. Do you know if there is a way to filter for the list of containers which are 'visible' in a workspace?
from i3ipc-python.
You have to write it.
from i3ipc-python.
Understood, but I'm unable to infer that information in case of tabbed
containers from the output of i3-msg -t get_tree
. All the children of tabbed
containers exist in the focus
, and not just the visible one. Any ideas?
from i3ipc-python.
The first one in the list is on top.
from i3ipc-python.
@sainathadapa
get_tree doesn't have the ability to tell which containers are visible. You can have a look at my workaround here: here
key_list = ['urgent','focused','visible','inactive','off']
def init():
states = {k:[] for k in key_list}
states['off'].extend(range(1,19))
js = i3.get_workspaces()
for j in js:
num = j['num']
states['off'].remove(num)
for k in key_list[:3]:
if j[k]:
states[k].append(num)
break
else:
states['inactive'].append(num)
Basically, it uses get_workspaces
to infer what containers are visible, active, etc. I don't think I've tested it with tabbed containers, though, so ymmv.
from i3ipc-python.
interesting, i'll try using both of your suggestions @acrisci @jcalbert and see if it works.
from i3ipc-python.
Related Issues (20)
- Missing sway visible attribute HOT 1
- Id not available in WorkspaceReply object even when it is in the ipc_data HOT 1
- 'WindowEvent' has no attribute 'replace'
- Con.floating is None in sway HOT 5
- Floating containers are not considered when reordering
- Create PEP 561 compliant library stub for type checking HOT 2
- Use generic self type rather than specifying "Con" HOT 1
- test_detailed_window_event sometimes fails
- New release HOT 1
- Alttab HOT 1
- Undocumented Con.parent property? HOT 1
- Make python-xlib dep optional HOT 1
- Question: Correct way to get the mode name change when listening to mode event HOT 1
- Docs imply the only way to use i3ipc is with asyncio
- i3ipc is twice as slow as runnig `swaymsg -t get_tree` and parsing the json
- Travis build appears broken?
- How do you use keybinds?
- Any way to get element on 'right' or 'left' of a given element? HOT 1
- i3-msg restart is not good enough for i3-cycle-focus.py
- i3-cycle-focus.py needs version number embedded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3ipc-python.