qtile: bar on up to four screens with key switching
This commit is contained in:
parent
b68fb380e2
commit
c13b51cf58
@ -26,8 +26,8 @@ layouts = [
|
|||||||
layout.Columns(border_width=4, margin=4, **subtheme("border_focus", "border_normal")),
|
layout.Columns(border_width=4, margin=4, **subtheme("border_focus", "border_normal")),
|
||||||
]
|
]
|
||||||
|
|
||||||
screens = [
|
def createBar():
|
||||||
Screen(top=bar.Bar([
|
return bar.Bar([
|
||||||
widget.Spacer(10),
|
widget.Spacer(10),
|
||||||
widget.CurrentLayout(fmt="[{:3.3}]"),
|
widget.CurrentLayout(fmt="[{:3.3}]"),
|
||||||
widget.Spacer(10),
|
widget.Spacer(10),
|
||||||
@ -40,8 +40,11 @@ screens = [
|
|||||||
widget.Spacer(),
|
widget.Spacer(),
|
||||||
widget.Clock(),
|
widget.Clock(),
|
||||||
widget.Spacer(10),
|
widget.Spacer(10),
|
||||||
], 48, background=theme["background"])),
|
], 48, background=theme["background"])
|
||||||
]
|
|
||||||
|
screens = [Screen(top=createBar()) for i in range(4)]
|
||||||
|
|
||||||
|
#fake_screens = [Screen(top=createBar(), x=x, y=y, width=1920, height=1080) for x, y in [(0, 0), (1920, 0), (0, 1080), (1920, 1080)]]
|
||||||
|
|
||||||
keys.extend([
|
keys.extend([
|
||||||
Key([mod], "Return", lazy.spawn(terminal), desc="Run terminal "),
|
Key([mod], "Return", lazy.spawn(terminal), desc="Run terminal "),
|
||||||
@ -78,6 +81,8 @@ keys.extend([
|
|||||||
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
|
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
keys.extend([Key([mod, "control"], str(i + 1), lazy.to_screen(i), desc=f"Switch to screen {i}") for i in range(len(screens))])
|
||||||
|
|
||||||
cursor_warp = True
|
cursor_warp = True
|
||||||
|
|
||||||
apply_theme(qtile)
|
apply_theme(qtile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user