fix layout error

This commit is contained in:
zoe 2022-09-09 09:59:35 +02:00
parent c2753de7aa
commit 663852b972
4 changed files with 20 additions and 2 deletions

View File

@ -1,4 +1,4 @@
from libqtile.config import Click, Drag, Group, Key
from libqtile.config import Click, Drag, Group, Key, ScratchPad
from libqtile.lazy import lazy
from libqtile import hook
@ -7,6 +7,7 @@ import my_layouts
import my_widgets
import my_keys
import my_globals
import my_scratchpads
mod = my_globals.mod
@ -43,6 +44,7 @@ for i in groups:
]
)
groups.extend(my_scratchpads.get_scratchpads())
extension_defaults = my_widgets.get_defaults().copy()

View File

@ -18,6 +18,7 @@ _mediaChord = KeyChord(
Key([], "space", lazy.spawn("playerctl play-pause")),
Key([], "l", lazy.spawn("playerctl next")),
Key([], "h", lazy.spawn("playerctl previous")),
Key([], "c", lazy.group["scratchpad"].dropdown_toggle("cmus")),
],
mode=" media",
)
@ -105,4 +106,6 @@ def get_defaults():
),
desc="rofi",
),
] + [_mediaChord]
] + [
_mediaChord,
]

11
my_scratchpads.py Normal file
View File

@ -0,0 +1,11 @@
from libqtile.config import DropDown, ScratchPad
import my_globals
def get_scratchpads():
return [
ScratchPad(
"scratchpad",
[DropDown("cmus", my_globals.terminal + " cmus", height=1, width=1, x=0)],
)
]

View File

@ -140,6 +140,7 @@ _window_name = widget.WindowName(
for_current_screen=True,
)
_clock = widget.Clock(
**get_defaults(),
format="%d.%m.%y %H:%M:%S",
@ -165,6 +166,7 @@ _volume = widget.Volume(
_music = widget.GenPollText(
**get_defaults(),
update_interval=5,
max_chars=30,
background=_Accent.B.value,
func=my_functions.get_currently_playing,
)