mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-19 13:46:17 +10:00
Adding qtile config with mouse callbacks for panel widgets.
This commit is contained in:
@@ -346,6 +346,17 @@ widget_defaults = dict(
|
|||||||
)
|
)
|
||||||
extension_defaults = widget_defaults.copy()
|
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 #####
|
##### WIDGETS #####
|
||||||
|
|
||||||
def init_widgets_list():
|
def init_widgets_list():
|
||||||
@@ -356,12 +367,16 @@ def init_widgets_list():
|
|||||||
foreground = colors[2],
|
foreground = colors[2],
|
||||||
background = colors[0]
|
background = colors[0]
|
||||||
),
|
),
|
||||||
|
widget.Image(
|
||||||
|
filename = "~/.config/qtile/icons/python.png",
|
||||||
|
mouse_callbacks = {'Button1': open_dmenu}
|
||||||
|
),
|
||||||
widget.GroupBox(font="Ubuntu Bold",
|
widget.GroupBox(font="Ubuntu Bold",
|
||||||
fontsize = 9,
|
fontsize = 9,
|
||||||
margin_y = 3,
|
margin_y = 3,
|
||||||
margin_x = 0,
|
margin_x = 0,
|
||||||
padding_y = 5,
|
padding_y = 5,
|
||||||
padding_x = 5,
|
padding_x = 3,
|
||||||
borderwidth = 3,
|
borderwidth = 3,
|
||||||
active = colors[2],
|
active = colors[2],
|
||||||
inactive = colors[2],
|
inactive = colors[2],
|
||||||
@@ -429,6 +444,7 @@ def init_widgets_list():
|
|||||||
widget.ThermalSensor(
|
widget.ThermalSensor(
|
||||||
foreground=colors[2],
|
foreground=colors[2],
|
||||||
background=colors[5],
|
background=colors[5],
|
||||||
|
threshold = 90,
|
||||||
padding = 5
|
padding = 5
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
@@ -446,9 +462,9 @@ def init_widgets_list():
|
|||||||
fontsize=14
|
fontsize=14
|
||||||
),
|
),
|
||||||
widget.Pacman(
|
widget.Pacman(
|
||||||
execute = "alacritty",
|
|
||||||
update_interval = 1800,
|
update_interval = 1800,
|
||||||
foreground = colors[2],
|
foreground = colors[2],
|
||||||
|
mouse_callbacks = {'Button1': open_pacman},
|
||||||
background = colors[4]
|
background = colors[4]
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
@@ -474,6 +490,7 @@ def init_widgets_list():
|
|||||||
widget.Memory(
|
widget.Memory(
|
||||||
foreground = colors[2],
|
foreground = colors[2],
|
||||||
background = colors[5],
|
background = colors[5],
|
||||||
|
mouse_callbacks = {'Button1': open_htop},
|
||||||
padding = 5
|
padding = 5
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
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>" |
|
clickable l = [ "<action=xdotool key super+" ++ show (n) ++ ">" ++ "<fn=2>" ++ ws ++ "</fn>" ++ "</action>" |
|
||||||
(i,ws) <- zip [1..9] l,
|
(i,ws) <- zip [1..9] l,
|
||||||
let n = i ]
|
let n = i ]
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- MANAGEHOOK
|
-- MANAGEHOOK
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
@@ -775,7 +776,7 @@ main = do
|
|||||||
, modMask = myModMask
|
, modMask = myModMask
|
||||||
, terminal = myTerminal
|
, terminal = myTerminal
|
||||||
, startupHook = myStartupHook
|
, startupHook = myStartupHook
|
||||||
, layoutHook = showWName' myShowWNameTheme myLayoutHook
|
, layoutHook = myLayoutHook
|
||||||
, workspaces = myWorkspaces
|
, workspaces = myWorkspaces
|
||||||
, borderWidth = myBorderWidth
|
, borderWidth = myBorderWidth
|
||||||
, normalBorderColor = myNormColor
|
, normalBorderColor = myNormColor
|
||||||
|
|||||||
Reference in New Issue
Block a user