dot/config/qtile/utils.py

48 lines
1.3 KiB
Python
Raw Permalink Normal View History

2023-06-13 15:50:56 +02:00
from libqtile import layout
from libqtile.lazy import lazy
from colors import *
@lazy.function
def layout_left(qtile):
layout = qtile.current_layout.info()
if layout["name"] == "columns" and layout["current"] != 0:
qtile.current_layout.cmd_left()
else:
qtile.current_screen.cmd_prev_group(skip_managed=True)
@lazy.function
def layout_right(qtile):
layout = qtile.current_layout.info()
if layout["name"] == "columns" and len(layout["columns"]) - 1 != layout["current"]:
qtile.current_layout.cmd_right()
else:
qtile.current_screen.cmd_next_group(skip_managed=True)
def get_layouts():
return [
layout.Columns(
border_focus=TEXT,
border_normal=BASE,
border_normal_stacked=BASE,
border_focus_stack=[SAPPHIRE, SKY],
border_normal_stack=BASE,
border_width=1,
margin=3,
),
layout.Max(),
# Try more layouts by unleashing below layouts.
# layout.Stack(num_stacks=2),
# layout.Bsp(),
# layout.Matrix(),
# layout.MonadTall(),
# layout.MonadWide(),
# layout.RatioTile(),
# layout.Tile(),
# layout.TreeTab(),
# layout.VerticalTile(),
# layout.Zoomy(),
]