added some mouse callbacks

This commit is contained in:
paul-loedige
2020-12-12 20:21:54 +01:00
parent b5f72deefa
commit 6790a16cad
+14 -4
View File
@@ -287,6 +287,7 @@ def pacman_widget(prev_color,color,size,fontsize):
filename='~/.config/qtile/icons/pacman.png',
margin=5,
background=color,
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(term + ' -e "sudo pacman -Sy"')},
),
widget.CheckUpdates(
colour_have_updates=dark_foreground_color,
@@ -299,6 +300,8 @@ def pacman_widget(prev_color,color,size,fontsize):
#endregion
#region System_widgets
launch_htop= {'Button1': lambda qtile: qtile.cmd_spawn(term + ' -e htop')}
def System_widgets(prev_color,last_color,size,fontsize):
return [
*powerline_arrow('l',prev_color,red_color,size),
@@ -306,44 +309,49 @@ def System_widgets(prev_color,last_color,size,fontsize):
filename='~/.config/qtile/icons/temp.png',
margin=5,
background=red_color,
mouse_callbacks = launch_htop,
),
widget.ThermalSensor(
foreground=dark_foreground_color,
background=red_color,
fontsize=fontsize,
tag_sensor='Tctl',
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',red_color,green_color,size),
widget.Image(
filename='~/.config/qtile/icons/cpu.png',
margin=5,
background=green_color,
mouse_callbacks = launch_htop,
),
widget.CPU(
foreground=dark_foreground_color,
background=green_color,
fontsize=fontsize,
format='{load_percent}% @ {freq_current}GHz',
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(term + ' -e htop')},
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',green_color,orange_color,size),
widget.Image(
filename='~/.config/qtile/icons/ram.png',
background=orange_color,
margin=-10
margin=-10,
mouse_callbacks = launch_htop,
),
MemoryC(
foreground=dark_foreground_color,
background=orange_color,
fontsize=fontsize,
format=" {MemUsed}GB({MemPercent}%) | {SwapUsed}GB({SwapPercent}%)",
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(term + ' -e htop')},
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',orange_color,last_color,size),
widget.Image(
filename='~/.config/qtile/icons/network.png',
background=blue_color,
margin=5
margin=5,
mouse_callbacks = launch_htop,
),
widget.Net(
background=last_color,
@@ -351,6 +359,7 @@ def System_widgets(prev_color,last_color,size,fontsize):
fontsize=fontsize,
fmt='{:.9}',
format='{down}',
mouse_callbacks = launch_htop,
),
widget.Net(
background=last_color,
@@ -358,6 +367,7 @@ def System_widgets(prev_color,last_color,size,fontsize):
fontsize=fontsize,
fmt='{:.9}',
format='{up}',
mouse_callbacks = launch_htop,
),
]
#endregion