diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b3bbb47179c9c7757083a03d9cb78249b54b856d --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +to install + +1. make sure font-awesome is installed on your system. + +Optionally adjust : + +GROUP_URGENT_BORDER = "#FF0000" +GROUP_FG = "#888888" +GROUP_ACTIVE_FG="#000000" +GROUP_SELECTED_BG="#bbbbbb" +GROUP_BG = "#ffffff" +FONT_SIZE=18 + diff --git a/config.py b/config.py index f40b2ca622999e6f46b915a0465033631c00c2cd..508d9545699d06d3aea18287852a1233f4e3a1e3 100644 --- a/config.py +++ b/config.py @@ -1,18 +1,19 @@ import os, subprocess -#import libqtile -#import libqtile.config -#import libqtile.command -#import libqtile +import libqtile +import libqtile.config +import libqtile.command +import libqtile -#from libqtile import * -#from libqtile.config import * -#from libqtile.command import * +from libqtile import * +from libqtile.config import * +from libqtile.command import * from libqtile import hook, layout from libqtile.config import Key, Screen, Group, Drag, Click from libqtile.command import lazy from libqtile import layout, bar, widget, extension + import fontawesome as fa # ---------------------------- @@ -64,6 +65,24 @@ COLS = { 'deus_5': '#101A28', } +# ---------------------------- +# ----- Workspace Box -------- +# ---------------------------- + +class WorkspaceBox(widget.GroupBox): + def __init__(self, **config): + widget.GroupBox.__init__(self, **config) + + @property + def groups(self): + """ + returns list of visible groups. + The existing groups are filtered by the visible_groups attribute and + their label. Groups with an empty string as label are never contained. + Groups that are not named in visible_groups are not returned. + """ + return map(lambda g: Group(g.name, label = g.label), widget.GroupBox.groups) + # ---------------------------- # -------- Hotkeys ----------- # ---------------------------- @@ -239,7 +258,7 @@ def window_to_room(room): groups = [] for workspace, hotkey in workspaces: for room in rooms: - groups.append(Group(get_group_name(workspace, room))) + groups.append(Group(get_group_name(workspace, room), label=room)) # Assign individual hotkeys for each workspace we have for workspace, hotkey in workspaces: @@ -300,6 +319,13 @@ screens = [ fontsize=(FONT_SIZE*5.15), padding=-1 ), + widget.TextBox( + font="font-awesome", + foreground=GROUP_FG, + text=(fa.icons['window-restore'] + " -> "), + fontsize=FONT_SIZE, + spacing=0 + ), widget.GroupBox( visible_groups=get_workspace_groups(wsp['current']), spacing=0,