Add more mouse callbacks

This commit is contained in:
Aleksey Samoilov 2023-11-24 13:18:27 +04:00
parent a14287f4f8
commit 775407e907

View file

@ -31,7 +31,7 @@ from libqtile.lazy import lazy
from qtile_extras import widget from qtile_extras import widget
from qtile_extras.widget.decorations import BorderDecoration from qtile_extras.widget.decorations import BorderDecoration
from libqtile.backend.wayland import InputConfig from libqtile.backend.wayland import InputConfig
from keybindings import mod, keys from keybindings import mod, keys, terminal
import colors import colors
import os import os
import subprocess import subprocess
@ -206,6 +206,7 @@ screens = [
border_width = [0, 0, 2, 0], border_width = [0, 0, 2, 0],
) )
], ],
mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + '-e btop')}
), ),
widget.Spacer(length = 8), widget.Spacer(length = 8),
widget.Memory( widget.Memory(
@ -218,6 +219,7 @@ screens = [
border_width = [0, 0, 2, 0], border_width = [0, 0, 2, 0],
) )
], ],
mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + '-e btop')}
), ),
widget.Spacer(length = 8), widget.Spacer(length = 8),
widget.Net( widget.Net(
@ -230,6 +232,7 @@ screens = [
border_width = [0, 0, 2, 0], border_width = [0, 0, 2, 0],
) )
], ],
mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + '-e nmtui')}
), ),
widget.Spacer(length = 8), widget.Spacer(length = 8),
widget.Volume( widget.Volume(
@ -241,6 +244,7 @@ screens = [
border_width = [0, 0, 2, 0], border_width = [0, 0, 2, 0],
) )
], ],
mouse_callbacks={'Button2': lambda: qtile.cmd_spawn('pavucontrol')}
), ),
widget.Spacer(length = 8), widget.Spacer(length = 8),
widget.Clock( widget.Clock(
@ -252,6 +256,7 @@ screens = [
border_width = [0, 0, 2, 0], border_width = [0, 0, 2, 0],
) )
], ],
mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + '-e calcurse')}
), ),
widget.Spacer(length = 8), widget.Spacer(length = 8),
widget.Image( widget.Image(
@ -268,8 +273,6 @@ screens = [
widget.Spacer(length = 8), widget.Spacer(length = 8),
], ],
30, 30,
# border_width=[2, 0, 2, 0], # Draw top and bottom borders
# border_color=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta
), ),
), ),
] ]