Add background_opacity to @ ls output
This commit is contained in:
parent
f73d32e15d
commit
70f3909cdc
1 changed files with 6 additions and 1 deletions
|
|
@ -167,6 +167,7 @@ class OSWindowDict(TypedDict):
|
|||
tabs: List[TabDict]
|
||||
wm_class: str
|
||||
wm_name: str
|
||||
background_opacity: float
|
||||
|
||||
|
||||
def listen_on(spec: str) -> Tuple[int, str]:
|
||||
|
|
@ -447,6 +448,9 @@ def list_os_windows(
|
|||
for os_window_id, tm in self.os_window_map.items():
|
||||
tabs = list(tm.list_tabs(self_window, tab_filter, window_filter))
|
||||
if tabs:
|
||||
bo = background_opacity_of(os_window_id)
|
||||
if bo is None:
|
||||
bo = 1
|
||||
yield {
|
||||
'id': os_window_id,
|
||||
'platform_window_id': platform_window_id(os_window_id),
|
||||
|
|
@ -455,7 +459,8 @@ def list_os_windows(
|
|||
'last_focused': os_window_id == last_focused_os_window_id(),
|
||||
'tabs': tabs,
|
||||
'wm_class': tm.wm_class,
|
||||
'wm_name': tm.wm_name
|
||||
'wm_name': tm.wm_name,
|
||||
'background_opacity': bo,
|
||||
}
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in a new issue