Skip to content
Snippets Groups Projects
Commit bf30af61 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman :boom:
Browse files

Fixed taskbar

parent 4698de0b
No related branches found
No related tags found
No related merge requests found
...@@ -214,6 +214,11 @@ def get_workspace_groups(workspace): ...@@ -214,6 +214,11 @@ def get_workspace_groups(workspace):
""" """
return [ get_group_name(workspace, room) for room in rooms] return [ get_group_name(workspace, room) for room in rooms]
def get_room_groups(room):
""" Get list of Groups that belongs to room.
"""
return [ get_group_name(w, room) for w,_ in workspaces]
def to_workspace(workspace): def to_workspace(workspace):
""" Change current workspace to another one. """ Change current workspace to another one.
""" """
...@@ -236,6 +241,8 @@ def to_workspace(workspace): ...@@ -236,6 +241,8 @@ def to_workspace(workspace):
# we also need to change subset of visible groups in the GroupBox widget # we also need to change subset of visible groups in the GroupBox widget
qtile.widgetMap['groupbox'].visible_groups=get_workspace_groups(workspace) qtile.widgetMap['groupbox'].visible_groups=get_workspace_groups(workspace)
qtile.widgetMap['groupbox'].draw() qtile.widgetMap['groupbox'].draw()
qtile.widgetMap['workspacebox'].visible_groups=get_room_groups(wsp[workspace]['active_group'][:1])
qtile.widgetMap['workspacebox'].draw()
# You can do some other cosmetic stuff here. # You can do some other cosmetic stuff here.
# For example, change Bar background depending on the current workspace. # For example, change Bar background depending on the current workspace.
# # qtile.widgetMap['groupbox'].bar.background="ff0000" # # qtile.widgetMap['groupbox'].bar.background="ff0000"
...@@ -246,6 +253,8 @@ def to_room(room): ...@@ -246,6 +253,8 @@ def to_room(room):
""" """
def f(qtile): def f(qtile):
global wsp global wsp
qtile.widgetMap['workspacebox'].visible_groups=get_room_groups(room)
qtile.widgetMap['workspacebox'].draw()
qtile.groupMap[get_group_name(wsp['current'], room)].cmd_toscreen() qtile.groupMap[get_group_name(wsp['current'], room)].cmd_toscreen()
return f return f
...@@ -331,7 +340,7 @@ screens = [ ...@@ -331,7 +340,7 @@ screens = [
padding=-1 padding=-1
), ),
WorkspaceBox( WorkspaceBox(
visible_groups=get_workspace_groups(wsp['current']), visible_groups=get_room_groups("1"),
spacing=0, spacing=0,
font="font-awesome", font="font-awesome",
...@@ -354,9 +363,9 @@ screens = [ ...@@ -354,9 +363,9 @@ screens = [
font="font-awesome", font="font-awesome",
foreground=GROUP_FG, foreground=GROUP_FG,
background=GROUP_BG, background=GROUP_BG,
text=(" -> "), text=(""),
fontsize=FONT_SIZE, fontsize=FONT_SIZE,
spacing=0 padding=15
), ),
widget.GroupBox( widget.GroupBox(
visible_groups=get_workspace_groups(wsp['current']), visible_groups=get_workspace_groups(wsp['current']),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment