New floating panel qtile

This commit is contained in:
Derek Taylor
2025-02-27 12:54:11 -06:00
parent 3bb586db86
commit 3598ea02b2
3 changed files with 56 additions and 54 deletions

View File

@@ -20,14 +20,14 @@ conky.config = {
imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song
-- Placement (Conky on MIDDLE of THREE monitors at 1920x1080) -- Placement (Conky on MIDDLE of THREE monitors at 1920x1080)
--alignment = 'top_left', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right, alignment = 'top_left', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
--gap_x = 3540, -- pixels between right or left border gap_x = 3540, -- pixels between right or left border
--gap_y = 70, -- pixels between bottom or left border gap_y = 70, -- pixels between bottom or left border
-- Placement (For SINGLE monitor users!) -- Placement (For SINGLE monitor users!)
alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right, --alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
gap_x = 50, -- pixels between right or left border --gap_x = 50, -- pixels between right or left border
gap_y = 70, -- pixels between bottom or left border --gap_y = 70, -- pixels between bottom or left border
-- Size -- Size
minimum_height = 200, -- minimum height of window minimum_height = 200, -- minimum height of window

View File

@@ -259,14 +259,15 @@ Groups are really workspaces. group_names should remain 1-9 so the MOD+1-9 keyb
#+begin_src python #+begin_src python
groups = [] groups = []
group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9",] group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
#group_labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9",] #group_labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
#group_labels = ["DEV", "WWW", "SYS", "DOC", "VBOX", "CHAT", "MUS", "VID", "GFX",] #group_labels = ["DEV", "WWW", "SYS", "DOC", "VBOX", "CHAT", "MUS", "VID", "GFX", "MISC"]
group_labels = [" ", " ", " ", " ", " ", " ", "🎙 ", " ", " "] group_labels = ["", "", "", "", "", "", "", "", ""]
group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"] group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"]
for i in range(len(group_names)): for i in range(len(group_names)):
groups.append( groups.append(
Group( Group(
@@ -321,7 +322,7 @@ Some settings that I use on almost every layout, which saves me from having to t
#+begin_src python #+begin_src python
layout_theme = {"border_width": 2, layout_theme = {"border_width": 2,
"margin": 12, "margin": 8,
"border_focus": colors[8], "border_focus": colors[8],
"border_normal": colors[0] "border_normal": colors[0]
} }
@@ -391,11 +392,10 @@ This is the bar (the panel) and the widgets within the bar.
#+begin_src python #+begin_src python
def init_widgets_list(): def init_widgets_list():
widgets_list = [ widgets_list = [
widget.Spacer(length = 8), widget.Spacer(length = 12),
widget.Image( widget.Image(
filename = "~/.config/qtile/icons/infinity-icon.png", filename = "~/.config/qtile/icons/infinity-icon.png",
scale = "False", scale = "False",
margin_x = 5,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)}, mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)},
), ),
widget.Prompt( widget.Prompt(
@@ -404,11 +404,11 @@ def init_widgets_list():
foreground = colors[1] foreground = colors[1]
), ),
widget.GroupBox( widget.GroupBox(
fontsize = 11, fontsize = 15,
margin_y = 5, margin_y = 5,
margin_x = 5, margin_x = 10,
padding_y = 0, padding_y = 0,
padding_x = 2, padding_x = 1,
borderwidth = 3, borderwidth = 3,
active = colors[8], active = colors[8],
inactive = colors[9], inactive = colors[9],
@@ -440,30 +440,32 @@ def init_widgets_list():
), ),
widget.WindowName( widget.WindowName(
foreground = colors[6], foreground = colors[6],
padding = 4,
max_chars = 40 max_chars = 40
), ),
widget.GenPollText( widget.GenPollText(
update_interval = 300, update_interval = 300,
func = lambda: subprocess.check_output("printf $(uname -r)", shell=True, text=True), func = lambda: subprocess.check_output("printf $(uname -r)", shell=True, text=True),
foreground = colors[3], foreground = colors[3],
padding = 6,
fmt = '{}', fmt = '{}',
), ),
widget.Spacer(length = 12),
widget.CPU( widget.CPU(
format = ' Cpu: {load_percent}%', format = ' Cpu: {load_percent}%',
foreground = colors[4], foreground = colors[4],
padding = 6,
), ),
widget.Spacer(length = 12),
widget.Memory( widget.Memory(
foreground = colors[8], foreground = colors[8],
padding = 6,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')}, mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
format = '{MemUsed: .0f}{mm}', format = '{MemUsed: .0f}{mm}',
fmt = '🖥 Mem: {} used', fmt = '🖥 Mem: {} used',
), ),
widget.Spacer(length = 12),
widget.DF( widget.DF(
update_interval = 60, update_interval = 60,
foreground = colors[5], foreground = colors[5],
padding = 6,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e df')}, mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e df')},
partition = '/', partition = '/',
#format = '[{p}] {uf}{m} ({r:.0f}%)', #format = '[{p}] {uf}{m} ({r:.0f}%)',
@@ -471,24 +473,23 @@ def init_widgets_list():
fmt = '🖴 Disk: {}', fmt = '🖴 Disk: {}',
visible_on_warn = False, visible_on_warn = False,
), ),
widget.Spacer(length = 12),
widget.Volume( widget.Volume(
foreground = colors[7], foreground = colors[7],
padding = 6,
fmt = '🕫 Vol: {}', fmt = '🕫 Vol: {}',
), ),
widget.Spacer(length = 12),
widget.KeyboardLayout( widget.KeyboardLayout(
foreground = colors[4], foreground = colors[4],
padding = 6,
fmt = '⌨ Kbd: {}', fmt = '⌨ Kbd: {}',
), ),
widget.Spacer(length = 12),
widget.Clock( widget.Clock(
foreground = colors[8], foreground = colors[8],
padding = 6,
format = "%a, %b %d - %H:%M", format = "%a, %b %d - %H:%M",
), ),
widget.Spacer(length = 12),
widget.Systray(padding = 3), widget.Systray(padding = 3),
widget.Spacer(length = 18), widget.Spacer(length = 8),
] ]
return widgets_list return widgets_list
@@ -506,16 +507,16 @@ def init_widgets_screen1():
# All other monitors' bars will display everything but widgets 22 (systray) and 23 (spacer). # All other monitors' bars will display everything but widgets 22 (systray) and 23 (spacer).
def init_widgets_screen2(): def init_widgets_screen2():
widgets_screen2 = init_widgets_list() widgets_screen2 = init_widgets_list()
del widgets_screen2[22:24] del widgets_screen2[15:16]
return widgets_screen2 return widgets_screen2
# For adding transparency to your bar, add (background="#00000000") to the "Screen" line(s) # For adding transparency to your bar, add (background="#00000000") to the "Screen" line(s)
# For ex: Screen(top=bar.Bar(widgets=init_widgets_screen2(), background="#00000000", size=24)), # For ex: Screen(top=bar.Bar(widgets=init_widgets_screen2(), background="#00000000", size=24)),
def init_screens(): def init_screens():
return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), margin=[8, 12, 0, 12], size=28)), return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), margin=[8, 12, 8, 12], size=28)),
Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 0, 12], size=28)), Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 8, 12], size=28)),
Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 0, 12], size=28))] Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 8, 12], size=28))]
if __name__ in ["config", "__main__"]: if __name__ in ["config", "__main__"]:
screens = init_screens() screens = init_screens()

View File

@@ -177,14 +177,15 @@ keys = [
] ]
groups = [] groups = []
group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9",] group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
#group_labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9",] #group_labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
#group_labels = ["DEV", "WWW", "SYS", "DOC", "VBOX", "CHAT", "MUS", "VID", "GFX",] #group_labels = ["DEV", "WWW", "SYS", "DOC", "VBOX", "CHAT", "MUS", "VID", "GFX", "MISC"]
group_labels = [" ", " ", " ", " ", " ", " ", "🎙 ", " ", " "] group_labels = ["", "", "", "", "", "", "", "", ""]
group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"] group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"]
for i in range(len(group_names)): for i in range(len(group_names)):
groups.append( groups.append(
Group( Group(
@@ -216,7 +217,7 @@ for i in groups:
colors = colors.DoomOne colors = colors.DoomOne
layout_theme = {"border_width": 2, layout_theme = {"border_width": 2,
"margin": 12, "margin": 8,
"border_focus": colors[8], "border_focus": colors[8],
"border_normal": colors[0] "border_normal": colors[0]
} }
@@ -268,11 +269,10 @@ extension_defaults = widget_defaults.copy()
def init_widgets_list(): def init_widgets_list():
widgets_list = [ widgets_list = [
widget.Spacer(length = 8), widget.Spacer(length = 12),
widget.Image( widget.Image(
filename = "~/.config/qtile/icons/infinity-icon.png", filename = "~/.config/qtile/icons/infinity-icon.png",
scale = "False", scale = "False",
margin_x = 5,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)}, mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)},
), ),
widget.Prompt( widget.Prompt(
@@ -281,11 +281,11 @@ def init_widgets_list():
foreground = colors[1] foreground = colors[1]
), ),
widget.GroupBox( widget.GroupBox(
fontsize = 11, fontsize = 15,
margin_y = 5, margin_y = 5,
margin_x = 5, margin_x = 10,
padding_y = 0, padding_y = 0,
padding_x = 2, padding_x = 1,
borderwidth = 3, borderwidth = 3,
active = colors[8], active = colors[8],
inactive = colors[9], inactive = colors[9],
@@ -317,30 +317,32 @@ def init_widgets_list():
), ),
widget.WindowName( widget.WindowName(
foreground = colors[6], foreground = colors[6],
padding = 4,
max_chars = 40 max_chars = 40
), ),
widget.GenPollText( widget.GenPollText(
update_interval = 300, update_interval = 300,
func = lambda: subprocess.check_output("printf $(uname -r)", shell=True, text=True), func = lambda: subprocess.check_output("printf $(uname -r)", shell=True, text=True),
foreground = colors[3], foreground = colors[3],
padding = 6,
fmt = '{}', fmt = '{}',
), ),
widget.Spacer(length = 12),
widget.CPU( widget.CPU(
format = ' Cpu: {load_percent}%', format = ' Cpu: {load_percent}%',
foreground = colors[4], foreground = colors[4],
padding = 6,
), ),
widget.Spacer(length = 12),
widget.Memory( widget.Memory(
foreground = colors[8], foreground = colors[8],
padding = 6,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')}, mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
format = '{MemUsed: .0f}{mm}', format = '{MemUsed: .0f}{mm}',
fmt = '🖥 Mem: {} used', fmt = '🖥 Mem: {} used',
), ),
widget.Spacer(length = 12),
widget.DF( widget.DF(
update_interval = 60, update_interval = 60,
foreground = colors[5], foreground = colors[5],
padding = 6,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e df')}, mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e df')},
partition = '/', partition = '/',
#format = '[{p}] {uf}{m} ({r:.0f}%)', #format = '[{p}] {uf}{m} ({r:.0f}%)',
@@ -348,24 +350,23 @@ def init_widgets_list():
fmt = '🖴 Disk: {}', fmt = '🖴 Disk: {}',
visible_on_warn = False, visible_on_warn = False,
), ),
widget.Spacer(length = 12),
widget.Volume( widget.Volume(
foreground = colors[7], foreground = colors[7],
padding = 6,
fmt = '🕫 Vol: {}', fmt = '🕫 Vol: {}',
), ),
widget.Spacer(length = 12),
widget.KeyboardLayout( widget.KeyboardLayout(
foreground = colors[4], foreground = colors[4],
padding = 6,
fmt = '⌨ Kbd: {}', fmt = '⌨ Kbd: {}',
), ),
widget.Spacer(length = 12),
widget.Clock( widget.Clock(
foreground = colors[8], foreground = colors[8],
padding = 6,
format = "%a, %b %d - %H:%M", format = "%a, %b %d - %H:%M",
), ),
widget.Spacer(length = 12),
widget.Systray(padding = 3), widget.Systray(padding = 3),
widget.Spacer(length = 18), widget.Spacer(length = 8),
] ]
return widgets_list return widgets_list
@@ -377,16 +378,16 @@ def init_widgets_screen1():
# All other monitors' bars will display everything but widgets 22 (systray) and 23 (spacer). # All other monitors' bars will display everything but widgets 22 (systray) and 23 (spacer).
def init_widgets_screen2(): def init_widgets_screen2():
widgets_screen2 = init_widgets_list() widgets_screen2 = init_widgets_list()
del widgets_screen2[22:24] del widgets_screen2[15:16]
return widgets_screen2 return widgets_screen2
# For adding transparency to your bar, add (background="#00000000") to the "Screen" line(s) # For adding transparency to your bar, add (background="#00000000") to the "Screen" line(s)
# For ex: Screen(top=bar.Bar(widgets=init_widgets_screen2(), background="#00000000", size=24)), # For ex: Screen(top=bar.Bar(widgets=init_widgets_screen2(), background="#00000000", size=24)),
def init_screens(): def init_screens():
return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), margin=[8, 12, 0, 12], size=28)), return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), margin=[8, 12, 8, 12], size=28)),
Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 0, 12], size=28)), Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 8, 12], size=28)),
Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 0, 12], size=28))] Screen(top=bar.Bar(widgets=init_widgets_screen2(), margin=[8, 12, 8, 12], size=28))]
if __name__ in ["config", "__main__"]: if __name__ in ["config", "__main__"]:
screens = init_screens() screens = init_screens()