Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
qtile-config
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jeffrey Phillips Freeman
qtile-config
Commits
4698de0b
Commit
4698de0b
authored
6 years ago
by
Jeffrey Phillips Freeman
Browse files
Options
Downloads
Patches
Plain Diff
A little farther along.
parent
5cdb8e21
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config.py
+34
-2
34 additions, 2 deletions
config.py
with
34 additions
and
2 deletions
config.py
+
34
−
2
View file @
4698de0b
...
...
@@ -15,6 +15,7 @@ from libqtile.command import lazy
from
libqtile
import
layout
,
bar
,
widget
,
extension
import
fontawesome
as
fa
import
copy
# ----------------------------
# -------- Colors ------------
...
...
@@ -69,6 +70,11 @@ COLS = {
# ----- Workspace Box --------
# ----------------------------
def
group_as_workspace
(
g
):
cloned
=
copy
.
copy
(
g
)
cloned
.
label
=
cloned
.
name
[
1
:
2
]
return
cloned
class
WorkspaceBox
(
widget
.
GroupBox
):
def
__init__
(
self
,
**
config
):
widget
.
GroupBox
.
__init__
(
self
,
**
config
)
...
...
@@ -81,7 +87,12 @@ class WorkspaceBox(widget.GroupBox):
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
)
if
super
().
groups
:
return
list
(
map
(
group_as_workspace
,
super
().
groups
))
#return list(map(lambda g: Group(g.name), super().groups))
else
:
return
super
().
groups
# ----------------------------
# -------- Hotkeys -----------
...
...
@@ -319,10 +330,31 @@ screens = [
fontsize
=
(
FONT_SIZE
*
5.15
),
padding
=-
1
),
WorkspaceBox
(
visible_groups
=
get_workspace_groups
(
wsp
[
'
current
'
]),
spacing
=
0
,
font
=
"
font-awesome
"
,
other_current_screen_border
=
GROUP_SELECTED_BG
,
#COLS["orange_0"],
this_current_screen_border
=
GROUP_SELECTED_BG
,
#COLS["blue_0"],
other_screen_border
=
GROUP_SELECTED_BG
,
#COLS["orange_0"],
this_screen_border
=
GROUP_SELECTED_BG
,
#COLS["blue_0"],
highlight_color
=
GROUP_SELECTED_BG
,
#COLS["blue_0"],
urgent_border
=
GROUP_URGENT_BORDER
,
#COLS["red_1"],
background
=
GROUP_BG
,
highlight_method
=
"
line
"
,
inactive
=
GROUP_FG
,
active
=
GROUP_ACTIVE_FG
,
disable_drag
=
True
,
borderwidth
=
2
,
fontsize
=
FONT_SIZE
,
foreground
=
GROUP_FG
),
widget
.
TextBox
(
font
=
"
font-awesome
"
,
foreground
=
GROUP_FG
,
text
=
(
fa
.
icons
[
'
window-restore
'
]
+
"
->
"
),
background
=
GROUP_BG
,
text
=
(
"
->
"
),
fontsize
=
FONT_SIZE
,
spacing
=
0
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment