Switch to suspend hook.
This commit is contained in:
parent
a1a2c6a3f2
commit
570daf6a1c
@ -1,6 +1,6 @@
|
||||
import os
|
||||
import subprocess
|
||||
from libqtile import bar, extension, hook, layout
|
||||
from libqtile import bar, extension, hook, layout, qtile
|
||||
from libqtile.lazy import lazy
|
||||
from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen
|
||||
from libqtile.backend.wayland import InputConfig
|
||||
@ -25,10 +25,9 @@ def autostop():
|
||||
autostop = os.path.expanduser('~/.config/qtile/stop.sh')
|
||||
subprocess.Popen([autostop])
|
||||
|
||||
@hook.subscribe.resume
|
||||
def resume():
|
||||
wallpaper = os.path.expanduser('~/.config/qtile/wallpaper.img')
|
||||
subprocess.Popen(['swaylock', '--image', wallpaper])
|
||||
@hook.subscribe.suspend
|
||||
def suspend():
|
||||
qtile.spawn("swaylock --image ~/.config/qtile/wallpaper.img")
|
||||
|
||||
mod = "mod4"
|
||||
groups = [
|
||||
|
Loading…
Reference in New Issue
Block a user