mark #workspace-occupied
This commit is contained in:
@@ -266,7 +266,8 @@
|
|||||||
<property name="halign">start</property>
|
<property name="halign">start</property>
|
||||||
<property name="label" translatable="yes"><span size="small"><b>CSS IDs</b>:
|
<property name="label" translatable="yes"><span size="small"><b>CSS IDs</b>:
|
||||||
#sway-workspaces, #sway-workspaces-item,
|
#sway-workspaces, #sway-workspaces-item,
|
||||||
#sway-workspaces-icon, #sway-workspaces-name</span></property>
|
#sway-workspaces-icon, #sway-workspaces-name
|
||||||
|
#workspace-occupied</span></property>
|
||||||
<property name="use-markup">True</property>
|
<property name="use-markup">True</property>
|
||||||
<property name="wrap">True</property>
|
<property name="wrap">True</property>
|
||||||
</object>
|
</object>
|
||||||
|
@@ -171,10 +171,13 @@ class SwayWorkspaces(Gtk.Box):
|
|||||||
else:
|
else:
|
||||||
lbl.hide()
|
lbl.hide()
|
||||||
|
|
||||||
|
# mark non-empty WS with CSS ID
|
||||||
|
if int_num in non_empty:
|
||||||
|
lbl.set_property("name", "workspace-occupied")
|
||||||
|
|
||||||
# mark non-empty WS with a dot
|
# mark non-empty WS with a dot
|
||||||
if self.settings["mark-content"]:
|
if self.settings["mark-content"]:
|
||||||
if int_num in non_empty:
|
if int_num in non_empty:
|
||||||
lbl.set_property("name", "workspace-occupied")
|
|
||||||
if not text.endswith("."):
|
if not text.endswith("."):
|
||||||
text += "."
|
text += "."
|
||||||
else:
|
else:
|
||||||
@@ -263,7 +266,7 @@ class SwayWorkspaces(Gtk.Box):
|
|||||||
for item in tree.descendants():
|
for item in tree.descendants():
|
||||||
if item.type == "workspace":
|
if item.type == "workspace":
|
||||||
# find non-empty workspaces
|
# find non-empty workspaces
|
||||||
if self.settings["mark-content"] or self.settings["hide-empty"]:
|
# if self.settings["mark-content"] or self.settings["hide-empty"]:
|
||||||
tasks_num = 0
|
tasks_num = 0
|
||||||
for d in item.descendants():
|
for d in item.descendants():
|
||||||
if d.type == "con" and d.name:
|
if d.type == "con" and d.name:
|
||||||
|
Reference in New Issue
Block a user