Format the qtile config with black
This commit is contained in:
parent
293f73ec5c
commit
cdd3a10a5d
|
@ -29,38 +29,30 @@ keys = [
|
||||||
Key([mod], "k", lazy.layout.up()),
|
Key([mod], "k", lazy.layout.up()),
|
||||||
Key([mod], "h", lazy.layout.left()),
|
Key([mod], "h", lazy.layout.left()),
|
||||||
Key([mod], "l", lazy.layout.right()),
|
Key([mod], "l", lazy.layout.right()),
|
||||||
|
|
||||||
Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"),
|
Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"),
|
||||||
|
|
||||||
# Move windows around
|
# Move windows around
|
||||||
Key([mod, "shift"], "j",
|
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), lazy.layout.move_down()),
|
||||||
lazy.layout.shuffle_down(),
|
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), lazy.layout.move_up()),
|
||||||
lazy.layout.move_down()),
|
|
||||||
Key([mod, "shift"], "k",
|
|
||||||
lazy.layout.shuffle_up(),
|
|
||||||
lazy.layout.move_up()),
|
|
||||||
Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
|
Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
|
||||||
Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
|
Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
|
||||||
Key([mod, "shift"], "q", lazy.window.kill()),
|
Key([mod, "shift"], "q", lazy.window.kill()),
|
||||||
|
|
||||||
Key([mod, "shift"], "space", add_treetab_section),
|
Key([mod, "shift"], "space", add_treetab_section),
|
||||||
Key([mod, "shift"], "Return",
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
"Return",
|
||||||
lazy.layout.toggle_split(),
|
lazy.layout.toggle_split(),
|
||||||
desc="Toggle between split and unsplit sides of stack"),
|
desc="Toggle between split and unsplit sides of stack",
|
||||||
|
),
|
||||||
# Resize windows
|
# Resize windows
|
||||||
Key([mod, "control"], "j", lazy.layout.grow_down()),
|
Key([mod, "control"], "j", lazy.layout.grow_down()),
|
||||||
Key([mod, "control"], "k", lazy.layout.grow_up()),
|
Key([mod, "control"], "k", lazy.layout.grow_up()),
|
||||||
Key([mod, "control"], "h", lazy.layout.grow_left()),
|
Key([mod, "control"], "h", lazy.layout.grow_left()),
|
||||||
Key([mod, "control"], "l", lazy.layout.grow_right()),
|
Key([mod, "control"], "l", lazy.layout.grow_right()),
|
||||||
|
|
||||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
|
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
|
||||||
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
|
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
|
||||||
|
|
||||||
# Move windows between sections
|
# Move windows between sections
|
||||||
Key([mod, "control", "shift"], "j", lazy.layout.section_down()),
|
Key([mod, "control", "shift"], "j", lazy.layout.section_down()),
|
||||||
Key([mod, "control", "shift"], "k", lazy.layout.section_up()),
|
Key([mod, "control", "shift"], "k", lazy.layout.section_up()),
|
||||||
|
|
||||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||||
Key([mod], "c", lazy.spawn("i3lock -c 000000")),
|
Key([mod], "c", lazy.spawn("i3lock -c 000000")),
|
||||||
Key([mod], "d", lazy.spawn("rofi -show drun")),
|
Key([mod], "d", lazy.spawn("rofi -show drun")),
|
||||||
|
@ -123,27 +115,29 @@ def toscreen(qtile, group_name):
|
||||||
groups = [Group(name=i, matches=group_matches[int(i)]) for i in "1234567890"]
|
groups = [Group(name=i, matches=group_matches[int(i)]) for i in "1234567890"]
|
||||||
|
|
||||||
for i in groups:
|
for i in groups:
|
||||||
keys.extend([
|
keys.extend(
|
||||||
# mod1 + letter of group = switch to group
|
[
|
||||||
Key(
|
# mod1 + letter of group = switch to group
|
||||||
[mod],
|
Key(
|
||||||
i.name,
|
[mod],
|
||||||
lazy.function(toscreen, i.name),
|
i.name,
|
||||||
desc="Switch to group {}".format(i.name),
|
lazy.function(toscreen, i.name),
|
||||||
),
|
desc="Switch to group {}".format(i.name),
|
||||||
# mod1 + shift + letter of group = switch to & move focused window to
|
),
|
||||||
# group Key([mod, "shift"], i.name, lazy.window.togroup(i.name,
|
# mod1 + shift + letter of group = switch to & move focused window to
|
||||||
# switch_group=True), desc="Switch to & move focused window to group
|
# group Key([mod, "shift"], i.name, lazy.window.togroup(i.name,
|
||||||
# {}".format(i.name)), Or, use below if you prefer not to switch to
|
# switch_group=True), desc="Switch to & move focused window to group
|
||||||
# that group. # mod1 + shift + letter of group = move focused window to
|
# {}".format(i.name)), Or, use below if you prefer not to switch to
|
||||||
# group
|
# that group. # mod1 + shift + letter of group = move focused window to
|
||||||
Key(
|
# group
|
||||||
[mod, "shift"],
|
Key(
|
||||||
i.name,
|
[mod, "shift"],
|
||||||
lazy.window.togroup(i.name),
|
i.name,
|
||||||
desc="move focused window to group {}".format(i.name),
|
lazy.window.togroup(i.name),
|
||||||
),
|
desc="move focused window to group {}".format(i.name),
|
||||||
])
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
border = dict(border_width=1, border_focus="#000000")
|
border = dict(border_width=1, border_focus="#000000")
|
||||||
|
|
||||||
|
@ -198,38 +192,44 @@ def top_bar_widgets():
|
||||||
|
|
||||||
|
|
||||||
screens = [
|
screens = [
|
||||||
Screen(top=bar.Bar(
|
Screen(
|
||||||
top_bar_widgets(),
|
top=bar.Bar(
|
||||||
24,
|
top_bar_widgets(),
|
||||||
), ),
|
24,
|
||||||
Screen(top=bar.Bar(
|
),
|
||||||
[
|
),
|
||||||
widget.GroupBox(),
|
Screen(
|
||||||
widget.Sep(padding=5),
|
top=bar.Bar(
|
||||||
widget.WindowName(),
|
[
|
||||||
widget.Sep(padding=5),
|
widget.GroupBox(),
|
||||||
widget.CurrentLayout(),
|
widget.Sep(padding=5),
|
||||||
widget.Sep(padding=5),
|
widget.WindowName(),
|
||||||
widget.Volume(),
|
widget.Sep(padding=5),
|
||||||
widget.Sep(padding=5),
|
widget.CurrentLayout(),
|
||||||
widget.Clock(format="%Y-%m-%d %a %H:%M"),
|
widget.Sep(padding=5),
|
||||||
],
|
widget.Volume(),
|
||||||
24,
|
widget.Sep(padding=5),
|
||||||
), ),
|
widget.Clock(format="%Y-%m-%d %a %H:%M"),
|
||||||
Screen(top=bar.Bar(
|
],
|
||||||
[
|
24,
|
||||||
widget.GroupBox(),
|
),
|
||||||
widget.Sep(padding=5),
|
),
|
||||||
widget.WindowName(),
|
Screen(
|
||||||
widget.Sep(padding=5),
|
top=bar.Bar(
|
||||||
widget.CurrentLayout(),
|
[
|
||||||
widget.Sep(padding=5),
|
widget.GroupBox(),
|
||||||
widget.Volume(),
|
widget.Sep(padding=5),
|
||||||
widget.Sep(padding=5),
|
widget.WindowName(),
|
||||||
widget.Clock(format="%Y-%m-%d %a %H:%M"),
|
widget.Sep(padding=5),
|
||||||
],
|
widget.CurrentLayout(),
|
||||||
24,
|
widget.Sep(padding=5),
|
||||||
), ),
|
widget.Volume(),
|
||||||
|
widget.Sep(padding=5),
|
||||||
|
widget.Clock(format="%Y-%m-%d %a %H:%M"),
|
||||||
|
],
|
||||||
|
24,
|
||||||
|
),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Drag floating layouts.
|
# Drag floating layouts.
|
||||||
|
@ -240,10 +240,9 @@ mouse = [
|
||||||
lazy.window.set_position_floating(),
|
lazy.window.set_position_floating(),
|
||||||
start=lazy.window.get_position(),
|
start=lazy.window.get_position(),
|
||||||
),
|
),
|
||||||
Drag([mod],
|
Drag(
|
||||||
"Button3",
|
[mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()
|
||||||
lazy.window.set_size_floating(),
|
),
|
||||||
start=lazy.window.get_size()),
|
|
||||||
Click([mod], "Button2", lazy.window.toggle_floating()),
|
Click([mod], "Button2", lazy.window.toggle_floating()),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -263,24 +262,26 @@ def autostart():
|
||||||
subprocess.run([home])
|
subprocess.run([home])
|
||||||
|
|
||||||
|
|
||||||
floating_layout = layout.Floating(float_rules=[
|
floating_layout = layout.Floating(
|
||||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
float_rules=[
|
||||||
*layout.Floating.default_float_rules,
|
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||||
Match(wm_class="confirm"),
|
*layout.Floating.default_float_rules,
|
||||||
Match(wm_class="dialog"),
|
Match(wm_class="confirm"),
|
||||||
Match(wm_class="download"),
|
Match(wm_class="dialog"),
|
||||||
Match(wm_class="error"),
|
Match(wm_class="download"),
|
||||||
Match(wm_class="file_progress"),
|
Match(wm_class="error"),
|
||||||
Match(wm_class="notification"),
|
Match(wm_class="file_progress"),
|
||||||
Match(wm_class="splash"),
|
Match(wm_class="notification"),
|
||||||
Match(wm_class="toolbar"),
|
Match(wm_class="splash"),
|
||||||
Match(wm_class="confirmreset"), # gitk
|
Match(wm_class="toolbar"),
|
||||||
Match(wm_class="makebranch"), # gitk
|
Match(wm_class="confirmreset"), # gitk
|
||||||
Match(wm_class="maketag"), # gitk
|
Match(wm_class="makebranch"), # gitk
|
||||||
Match(title="branchdialog"), # gitk
|
Match(wm_class="maketag"), # gitk
|
||||||
Match(title="pinentry"), # GPG key password entry
|
Match(title="branchdialog"), # gitk
|
||||||
Match(wm_class="ssh-askpass"), # ssh-askpass
|
Match(title="pinentry"), # GPG key password entry
|
||||||
])
|
Match(wm_class="ssh-askpass"), # ssh-askpass
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
|
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
|
||||||
# string besides java UI toolkits; you can see several discussions on the
|
# string besides java UI toolkits; you can see several discussions on the
|
||||||
|
|
Loading…
Reference in New Issue
Block a user