mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-28 10:18:46 -05:00
Updated qTile config
This commit is contained in:
parent
33d11a022a
commit
5f679b475b
Binary file not shown.
@ -12,6 +12,6 @@ strings=bat, pkgbrowser, ly, zap, i3-gaps, microsoft edge, python3, python, pama
|
|||||||
|
|
||||||
[window]
|
[window]
|
||||||
central-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\0\0\0\x1>\0\xff\xff\xff\xff\x1\0\0\0\x1\0)
|
central-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\0\0\0\x1>\0\xff\xff\xff\xff\x1\0\0\0\x1\0)
|
||||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\ag\0\0\x3\xff\0\0\0\0\0\0\0\0\0\0\aq\0\0\x3\xdd\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\ag\0\0\x3\xff)
|
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x4\xa5\0\0\0)\0\0\ax\0\0\x4\n\0\0\0\0\0\0\0\x14\0\0\aq\0\0\x3\xf1\0\0\0\0\x2\0\0\0\a\x80\0\0\x4\xa7\0\0\0+\0\0\av\0\0\x4\b)
|
||||||
left-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xc0\0\0\x1\f\0\xff\xff\xff\xff\x1\0\0\0\x2\0)
|
left-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xc0\0\0\x1\f\0\xff\xff\xff\xff\x1\0\0\0\x2\0)
|
||||||
right-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xc0\0\0\0\xee\0\xff\xff\xff\xff\x1\0\0\0\x2\0)
|
right-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xc0\0\0\0\xee\0\xff\xff\xff\xff\x1\0\0\0\x2\0)
|
||||||
|
@ -1,23 +1,36 @@
|
|||||||
colorScheme = [
|
colorScheme = [
|
||||||
["283036", "283036"], # 0
|
"283036", # 0
|
||||||
["ff5959", "ff5959"], # 1
|
"ff5959", # 1
|
||||||
["59ff59", "59ff59"], # 2
|
"59ff59", # 2
|
||||||
["ffff59", "ffff59"], # 3
|
"ffff59", # 3
|
||||||
["9059ff", "9059ff"], # 4
|
"9059ff", # 4
|
||||||
["ff59f9", "ff59f9"], # 5
|
"ff59f9", # 5
|
||||||
["59fff9", "59fff9"], # 6
|
"59fff9", # 6
|
||||||
["e5e9f0", "e5e9f0"], # 7
|
"e5e9f0", # 7
|
||||||
["43515e", "43515e"], # 8
|
"43515e", # 8
|
||||||
["ffa6a6", "ffa6a6"], # 9
|
"ffa6a6", # 9
|
||||||
["a6ffa6", "a6ffa6"], # 10
|
"a6ffa6", # 10
|
||||||
["ffffa6", "ffffa6"], # 11
|
"ffffa6", # 11
|
||||||
["c5a6ff", "c5a6ff"], # 12
|
"c5a6ff", # 12
|
||||||
["ffa6fc", "ffa6fc"], # 13
|
"ffa6fc", # 13
|
||||||
["a6fffc", "a6fffc"], # 14
|
"a6fffc", # 14
|
||||||
["e5e9f0", "e5e9f0"], # 15
|
"e5e9f0", # 15
|
||||||
["e5e9f0", "e5e9f0"], # foregroundColor
|
"e5e9f0", # foregroundColor
|
||||||
["283036", "283036"], # backgroundColor
|
"283036", # backgroundColor
|
||||||
["434c5e", "434c5e"], # backgroundColor
|
"434c5e", # backgroundColor
|
||||||
|
]
|
||||||
|
|
||||||
|
widgetColors = [
|
||||||
|
"ff5959", # 1
|
||||||
|
"59ff59", # 2
|
||||||
|
"ffff59", # 3
|
||||||
|
"9059ff", # 4
|
||||||
|
"ff59f9", # 5
|
||||||
|
"59fff9", # 6
|
||||||
|
"e5e9f0", # 7
|
||||||
|
"43515e", # 8
|
||||||
|
"ffa6a6", # 9
|
||||||
|
"a6ffa6", # 10
|
||||||
]
|
]
|
||||||
|
|
||||||
foregroundColor = colorScheme[16]
|
foregroundColor = colorScheme[16]
|
||||||
|
96
qtile/.config/qtile/ext/multiColorTag.py
Normal file
96
qtile/.config/qtile/ext/multiColorTag.py
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# Copyright (c) 2023 The-Repo-Club
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
from libqtile import widget
|
||||||
|
from libqtile.confreader import ConfigError
|
||||||
|
|
||||||
|
|
||||||
|
class MultiColorTag(widget.GroupBox):
|
||||||
|
def __init__(self, **config):
|
||||||
|
super().__init__(**config)
|
||||||
|
self.tag_colors = config.get("tag_colors", [])
|
||||||
|
self.this_current_screen_border = config.get("this_current_screen_border", [])
|
||||||
|
|
||||||
|
if not isinstance(self.tag_colors, list):
|
||||||
|
raise ConfigError("MultiColorTag: tag_colors must be a list")
|
||||||
|
if not isinstance(self.this_current_screen_border, list):
|
||||||
|
raise ConfigError(
|
||||||
|
"MultiColorTag: this_current_screen_border must be a list"
|
||||||
|
)
|
||||||
|
|
||||||
|
def draw(self):
|
||||||
|
self.drawer.clear(self.background or self.bar.background)
|
||||||
|
|
||||||
|
offset = self.margin_x
|
||||||
|
num_tag_colors = len(self.tag_colors)
|
||||||
|
num_this_current_screen_border = len(self.this_current_screen_border)
|
||||||
|
|
||||||
|
for i, g in enumerate(self.groups):
|
||||||
|
effective_tag_colors_index = i % num_tag_colors
|
||||||
|
effective_this_current_screen_border_index = (
|
||||||
|
i % num_this_current_screen_border
|
||||||
|
)
|
||||||
|
|
||||||
|
bw = self.box_width([g])
|
||||||
|
|
||||||
|
if self.group_has_urgent(g):
|
||||||
|
text_color = self.urgent_text
|
||||||
|
elif g.windows:
|
||||||
|
text_color = self.active
|
||||||
|
else:
|
||||||
|
text_color = self.inactive
|
||||||
|
|
||||||
|
if effective_tag_colors_index < len(self.tag_colors):
|
||||||
|
text_color = self.tag_colors[effective_tag_colors_index]
|
||||||
|
|
||||||
|
if g.screen:
|
||||||
|
if self.block_highlight_text_color:
|
||||||
|
text_color = self.block_highlight_text_color
|
||||||
|
if self.bar.screen.group.name == g.name:
|
||||||
|
if self.qtile.current_screen == self.bar.screen:
|
||||||
|
border = self.this_current_screen_border[
|
||||||
|
effective_this_current_screen_border_index
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
border = self.this_screen_border
|
||||||
|
else:
|
||||||
|
if self.qtile.current_screen == g.screen:
|
||||||
|
border = self.other_current_screen_border
|
||||||
|
else:
|
||||||
|
border = self.other_screen_border
|
||||||
|
elif self.group_has_urgent(g):
|
||||||
|
border = self.urgent_border
|
||||||
|
else:
|
||||||
|
border = None
|
||||||
|
|
||||||
|
self.drawbox(
|
||||||
|
offset,
|
||||||
|
g.label,
|
||||||
|
border,
|
||||||
|
text_color,
|
||||||
|
highlight_color=self.highlight_color,
|
||||||
|
width=bw,
|
||||||
|
rounded=self.rounded,
|
||||||
|
block=False,
|
||||||
|
line=True,
|
||||||
|
highlighted=False,
|
||||||
|
)
|
||||||
|
offset += bw + self.spacing
|
||||||
|
self.drawer.draw(offsetx=self.offset, offsety=self.offsety, width=self.width)
|
@ -3,7 +3,9 @@ from libqtile.lazy import lazy
|
|||||||
from os.path import expanduser
|
from os.path import expanduser
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from colors import colorScheme, foregroundColor, backgroundColor
|
from ext.multiColorTag import MultiColorTag
|
||||||
|
|
||||||
|
from colors import colorScheme, widgetColors, foregroundColor, backgroundColor
|
||||||
|
|
||||||
|
|
||||||
class Widgets(object):
|
class Widgets(object):
|
||||||
@ -35,7 +37,7 @@ class Widgets(object):
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
groupBox1 = widget.GroupBox(
|
groupBox1 = MultiColorTag(
|
||||||
margin_y=4,
|
margin_y=4,
|
||||||
margin_x=4,
|
margin_x=4,
|
||||||
padding_y=6,
|
padding_y=6,
|
||||||
@ -48,7 +50,8 @@ class Widgets(object):
|
|||||||
rounded=False,
|
rounded=False,
|
||||||
highlight_method="line",
|
highlight_method="line",
|
||||||
highlight_color=backgroundColor,
|
highlight_color=backgroundColor,
|
||||||
this_current_screen_border=colorScheme[2],
|
tag_colors=widgetColors,
|
||||||
|
this_current_screen_border=widgetColors,
|
||||||
this_screen_border=colorScheme[1],
|
this_screen_border=colorScheme[1],
|
||||||
other_screen_border=colorScheme[6],
|
other_screen_border=colorScheme[6],
|
||||||
other_current_screen_border=colorScheme[6],
|
other_current_screen_border=colorScheme[6],
|
||||||
@ -60,7 +63,7 @@ class Widgets(object):
|
|||||||
use_mouse_wheel=True,
|
use_mouse_wheel=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
groupBox2 = widget.GroupBox(
|
groupBox2 = MultiColorTag(
|
||||||
margin_y=4,
|
margin_y=4,
|
||||||
margin_x=4,
|
margin_x=4,
|
||||||
padding_y=6,
|
padding_y=6,
|
||||||
@ -73,7 +76,8 @@ class Widgets(object):
|
|||||||
rounded=False,
|
rounded=False,
|
||||||
highlight_method="line",
|
highlight_method="line",
|
||||||
highlight_color=backgroundColor,
|
highlight_color=backgroundColor,
|
||||||
this_current_screen_border=colorScheme[2],
|
tag_colors=widgetColors,
|
||||||
|
this_current_screen_border=widgetColors,
|
||||||
this_screen_border=colorScheme[1],
|
this_screen_border=colorScheme[1],
|
||||||
other_screen_border=colorScheme[6],
|
other_screen_border=colorScheme[6],
|
||||||
other_current_screen_border=colorScheme[6],
|
other_current_screen_border=colorScheme[6],
|
||||||
|
Loading…
Reference in New Issue
Block a user