mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2023-02-13 20:55:19 -05:00
Adding qtile config with mouse callbacks for panel widgets.
This commit is contained in:
parent
3d69afdf0a
commit
60533ea0eb
3 changed files with 21 additions and 3 deletions
|
@ -346,6 +346,17 @@ widget_defaults = dict(
|
|||
)
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
##### MOUSE CALLBACKS ######
|
||||
|
||||
def open_dmenu(qtile):
|
||||
qtile.cmd_spawn('dmenu_run')
|
||||
|
||||
def open_htop(qtile):
|
||||
qtile.cmd_spawn('alacritty -e htop')
|
||||
|
||||
def open_pacman(qtile):
|
||||
qtile.cmd_spawn('alacritty -e sudo pacman -Syu')
|
||||
|
||||
##### WIDGETS #####
|
||||
|
||||
def init_widgets_list():
|
||||
|
@ -356,12 +367,16 @@ def init_widgets_list():
|
|||
foreground = colors[2],
|
||||
background = colors[0]
|
||||
),
|
||||
widget.Image(
|
||||
filename = "~/.config/qtile/icons/python.png",
|
||||
mouse_callbacks = {'Button1': open_dmenu}
|
||||
),
|
||||
widget.GroupBox(font="Ubuntu Bold",
|
||||
fontsize = 9,
|
||||
margin_y = 3,
|
||||
margin_x = 0,
|
||||
padding_y = 5,
|
||||
padding_x = 5,
|
||||
padding_x = 3,
|
||||
borderwidth = 3,
|
||||
active = colors[2],
|
||||
inactive = colors[2],
|
||||
|
@ -429,6 +444,7 @@ def init_widgets_list():
|
|||
widget.ThermalSensor(
|
||||
foreground=colors[2],
|
||||
background=colors[5],
|
||||
threshold = 90,
|
||||
padding = 5
|
||||
),
|
||||
widget.TextBox(
|
||||
|
@ -446,9 +462,9 @@ def init_widgets_list():
|
|||
fontsize=14
|
||||
),
|
||||
widget.Pacman(
|
||||
execute = "alacritty",
|
||||
update_interval = 1800,
|
||||
foreground = colors[2],
|
||||
mouse_callbacks = {'Button1': open_pacman},
|
||||
background = colors[4]
|
||||
),
|
||||
widget.TextBox(
|
||||
|
@ -474,6 +490,7 @@ def init_widgets_list():
|
|||
widget.Memory(
|
||||
foreground = colors[2],
|
||||
background = colors[5],
|
||||
mouse_callbacks = {'Button1': open_htop},
|
||||
padding = 5
|
||||
),
|
||||
widget.TextBox(
|
||||
|
|
BIN
.config/qtile/icons/python.png
Normal file
BIN
.config/qtile/icons/python.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 746 B |
|
@ -469,6 +469,7 @@ myWorkspaces = clickable . (map xmobarEscape)
|
|||
clickable l = [ "<action=xdotool key super+" ++ show (n) ++ ">" ++ "<fn=2>" ++ ws ++ "</fn>" ++ "</action>" |
|
||||
(i,ws) <- zip [1..9] l,
|
||||
let n = i ]
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- MANAGEHOOK
|
||||
------------------------------------------------------------------------
|
||||
|
@ -775,7 +776,7 @@ main = do
|
|||
, modMask = myModMask
|
||||
, terminal = myTerminal
|
||||
, startupHook = myStartupHook
|
||||
, layoutHook = showWName' myShowWNameTheme myLayoutHook
|
||||
, layoutHook = myLayoutHook
|
||||
, workspaces = myWorkspaces
|
||||
, borderWidth = myBorderWidth
|
||||
, normalBorderColor = myNormColor
|
||||
|
|
Loading…
Reference in a new issue