Adding qtile-extras border decorations to my qtile config.
This commit is contained in:
parent
aea0c13069
commit
2d7752c079
|
@ -1,14 +1,14 @@
|
||||||
[xin_0]
|
[xin_0]
|
||||||
file=/home/dt/wallpapers/0193.jpg
|
file=/home/dt/wallpapers/0272.jpg
|
||||||
mode=0
|
mode=0
|
||||||
bgcolor=#000000
|
bgcolor=#000000
|
||||||
|
|
||||||
[xin_1]
|
[xin_1]
|
||||||
file=/home/dt/wallpapers/0193.jpg
|
file=/home/dt/wallpapers/0272.jpg
|
||||||
mode=0
|
mode=0
|
||||||
bgcolor=#000000
|
bgcolor=#000000
|
||||||
|
|
||||||
[xin_2]
|
[xin_2]
|
||||||
file=/home/dt/wallpapers/0193.jpg
|
file=/home/dt/wallpapers/0272.jpg
|
||||||
mode=0
|
mode=0
|
||||||
bgcolor=#000000
|
bgcolor=#000000
|
||||||
|
|
|
@ -69,6 +69,9 @@ from libqtile import layout, bar, widget, hook
|
||||||
from libqtile.lazy import lazy
|
from libqtile.lazy import lazy
|
||||||
from libqtile.utils import guess_terminal
|
from libqtile.utils import guess_terminal
|
||||||
from typing import List # noqa: F401
|
from typing import List # noqa: F401
|
||||||
|
|
||||||
|
from qtile_extras import widget
|
||||||
|
from qtile_extras.widget.decorations import BorderDecoration
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Variables
|
* Variables
|
||||||
|
@ -537,110 +540,165 @@ def init_widgets_list():
|
||||||
foreground = colors[0],
|
foreground = colors[0],
|
||||||
background = colors[0]
|
background = colors[0]
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
|
||||||
text = '',
|
|
||||||
font = "Ubuntu Mono",
|
|
||||||
background = colors[0],
|
|
||||||
foreground = colors[3],
|
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
|
||||||
widget.Net(
|
widget.Net(
|
||||||
interface = "enp5s0",
|
interface = "enp6s0",
|
||||||
format = 'Net: {down} ↓↑ {up}',
|
format = 'Net: {down} ↓↑ {up}',
|
||||||
foreground = colors[1],
|
foreground = colors[3],
|
||||||
background = colors[3],
|
background = colors[0],
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[3],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[3],
|
foreground = colors[0],
|
||||||
foreground = colors[4],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
widget.ThermalSensor(
|
widget.ThermalSensor(
|
||||||
foreground = colors[1],
|
foreground = colors[4],
|
||||||
background = colors[4],
|
background = colors[0],
|
||||||
threshold = 90,
|
threshold = 90,
|
||||||
fmt = 'Temp: {}',
|
fmt = 'Temp: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[4],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text='',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[4],
|
foreground = colors[0],
|
||||||
foreground = colors[5],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
widget.CheckUpdates(
|
widget.CheckUpdates(
|
||||||
update_interval = 1800,
|
update_interval = 1800,
|
||||||
distro = "Arch_checkupdates",
|
distro = "Arch_checkupdates",
|
||||||
display_format = "Updates: {updates} ",
|
display_format = "Updates: {updates} ",
|
||||||
foreground = colors[1],
|
foreground = colors[5],
|
||||||
colour_have_updates = colors[1],
|
colour_have_updates = colors[5],
|
||||||
colour_no_updates = colors[1],
|
colour_no_updates = colors[5],
|
||||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
|
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
|
||||||
padding = 5,
|
padding = 5,
|
||||||
background = colors[5]
|
background = colors[0],
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[5],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[5],
|
foreground = colors[0],
|
||||||
foreground = colors[6],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
widget.Memory(
|
widget.Memory(
|
||||||
foreground = colors[1],
|
foreground = colors[9],
|
||||||
background = colors[6],
|
background = colors[0],
|
||||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
|
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
|
||||||
fmt = 'Mem: {}',
|
fmt = 'Mem: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[9],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[6],
|
foreground = colors[0],
|
||||||
foreground = colors[7],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
|
|
||||||
widget.Volume(
|
widget.Volume(
|
||||||
foreground = colors[1],
|
foreground = colors[7],
|
||||||
background = colors[7],
|
background = colors[0],
|
||||||
fmt = 'Vol: {}',
|
fmt = 'Vol: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[7],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[7],
|
foreground = colors[0],
|
||||||
foreground = colors[8],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
widget.KeyboardLayout(
|
widget.KeyboardLayout(
|
||||||
foreground = colors[1],
|
foreground = colors[8],
|
||||||
background = colors[8],
|
background = colors[0],
|
||||||
fmt = 'Keyboard: {}',
|
fmt = 'Keyboard: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[8],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[8],
|
foreground = colors[0],
|
||||||
foreground = colors[9],
|
background = colors[0]
|
||||||
padding = 0,
|
),
|
||||||
fontsize = 37
|
widget.AnalogueClock(
|
||||||
|
background = colors[0],
|
||||||
|
face_shape = "square",
|
||||||
|
face_background = colors[6],
|
||||||
|
face_border_colour = colors[6],
|
||||||
|
face_border_width = 4,
|
||||||
|
padding = 5
|
||||||
),
|
),
|
||||||
widget.Clock(
|
widget.Clock(
|
||||||
foreground = colors[1],
|
foreground = colors[6],
|
||||||
background = colors[9],
|
background = colors[0],
|
||||||
format = "%A, %B %d - %H:%M "
|
format = "%A, %B %d - %H:%M ",
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[6],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
widget.Sep(
|
||||||
|
linewidth = 0,
|
||||||
|
padding = 6,
|
||||||
|
foreground = colors[0],
|
||||||
|
background = colors[0]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
return widgets_list
|
return widgets_list
|
||||||
|
|
|
@ -8,8 +8,12 @@ from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen
|
||||||
from libqtile.command import lazy
|
from libqtile.command import lazy
|
||||||
from libqtile import layout, bar, widget, hook
|
from libqtile import layout, bar, widget, hook
|
||||||
from libqtile.lazy import lazy
|
from libqtile.lazy import lazy
|
||||||
|
from libqtile.utils import guess_terminal
|
||||||
from typing import List # noqa: F401
|
from typing import List # noqa: F401
|
||||||
|
|
||||||
|
from qtile_extras import widget
|
||||||
|
from qtile_extras.widget.decorations import BorderDecoration
|
||||||
|
|
||||||
mod = "mod4" # Sets mod key to SUPER/WINDOWS
|
mod = "mod4" # Sets mod key to SUPER/WINDOWS
|
||||||
myTerm = "alacritty" # My terminal of choice
|
myTerm = "alacritty" # My terminal of choice
|
||||||
myBrowser = "qutebrowser" # My browser of choice
|
myBrowser = "qutebrowser" # My browser of choice
|
||||||
|
@ -410,110 +414,165 @@ def init_widgets_list():
|
||||||
foreground = colors[0],
|
foreground = colors[0],
|
||||||
background = colors[0]
|
background = colors[0]
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
|
||||||
text = '',
|
|
||||||
font = "Ubuntu Mono",
|
|
||||||
background = colors[0],
|
|
||||||
foreground = colors[3],
|
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
|
||||||
widget.Net(
|
widget.Net(
|
||||||
interface = "enp5s0",
|
interface = "enp6s0",
|
||||||
format = 'Net: {down} ↓↑ {up}',
|
format = 'Net: {down} ↓↑ {up}',
|
||||||
foreground = colors[1],
|
foreground = colors[3],
|
||||||
background = colors[3],
|
background = colors[0],
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[3],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[3],
|
foreground = colors[0],
|
||||||
foreground = colors[4],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
widget.ThermalSensor(
|
widget.ThermalSensor(
|
||||||
foreground = colors[1],
|
foreground = colors[4],
|
||||||
background = colors[4],
|
background = colors[0],
|
||||||
threshold = 90,
|
threshold = 90,
|
||||||
fmt = 'Temp: {}',
|
fmt = 'Temp: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[4],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text='',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[4],
|
foreground = colors[0],
|
||||||
foreground = colors[5],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
widget.CheckUpdates(
|
widget.CheckUpdates(
|
||||||
update_interval = 1800,
|
update_interval = 1800,
|
||||||
distro = "Arch_checkupdates",
|
distro = "Arch_checkupdates",
|
||||||
display_format = "Updates: {updates} ",
|
display_format = "Updates: {updates} ",
|
||||||
foreground = colors[1],
|
foreground = colors[5],
|
||||||
colour_have_updates = colors[1],
|
colour_have_updates = colors[5],
|
||||||
colour_no_updates = colors[1],
|
colour_no_updates = colors[5],
|
||||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
|
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
|
||||||
padding = 5,
|
padding = 5,
|
||||||
background = colors[5]
|
background = colors[0],
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[5],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[5],
|
foreground = colors[0],
|
||||||
foreground = colors[6],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
widget.Memory(
|
widget.Memory(
|
||||||
foreground = colors[1],
|
foreground = colors[9],
|
||||||
background = colors[6],
|
background = colors[0],
|
||||||
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
|
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
|
||||||
fmt = 'Mem: {}',
|
fmt = 'Mem: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[9],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[6],
|
foreground = colors[0],
|
||||||
foreground = colors[7],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
|
|
||||||
widget.Volume(
|
widget.Volume(
|
||||||
foreground = colors[1],
|
foreground = colors[7],
|
||||||
background = colors[7],
|
background = colors[0],
|
||||||
fmt = 'Vol: {}',
|
fmt = 'Vol: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[7],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[7],
|
foreground = colors[0],
|
||||||
foreground = colors[8],
|
background = colors[0]
|
||||||
padding = 0,
|
|
||||||
fontsize = 37
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
widget.KeyboardLayout(
|
widget.KeyboardLayout(
|
||||||
foreground = colors[1],
|
foreground = colors[8],
|
||||||
background = colors[8],
|
background = colors[0],
|
||||||
fmt = 'Keyboard: {}',
|
fmt = 'Keyboard: {}',
|
||||||
padding = 5
|
padding = 5,
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[8],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.Sep(
|
||||||
text = '',
|
linewidth = 0,
|
||||||
font = "Ubuntu Mono",
|
padding = 6,
|
||||||
background = colors[8],
|
foreground = colors[0],
|
||||||
foreground = colors[9],
|
background = colors[0]
|
||||||
padding = 0,
|
),
|
||||||
fontsize = 37
|
widget.AnalogueClock(
|
||||||
|
background = colors[0],
|
||||||
|
face_shape = "square",
|
||||||
|
face_background = colors[6],
|
||||||
|
face_border_colour = colors[6],
|
||||||
|
face_border_width = 4,
|
||||||
|
padding = 5
|
||||||
),
|
),
|
||||||
widget.Clock(
|
widget.Clock(
|
||||||
foreground = colors[1],
|
foreground = colors[6],
|
||||||
background = colors[9],
|
background = colors[0],
|
||||||
format = "%A, %B %d - %H:%M "
|
format = "%A, %B %d - %H:%M ",
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[6],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
padding_x = 5,
|
||||||
|
padding_y = None,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
widget.Sep(
|
||||||
|
linewidth = 0,
|
||||||
|
padding = 6,
|
||||||
|
foreground = colors[0],
|
||||||
|
background = colors[0]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
return widgets_list
|
return widgets_list
|
||||||
|
|
Loading…
Reference in New Issue