mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 07:39:36 +01:00
Reformat qtile config with black
This commit is contained in:
parent
ed4235db43
commit
03e6b3a4d5
@ -1,10 +1,10 @@
|
|||||||
from modules.keys import keys, mod
|
|
||||||
from modules.groups import groups
|
from modules.groups import groups
|
||||||
from modules.layouts import layouts, floating_layout
|
from modules.keys import keys, mod
|
||||||
|
from modules.layouts import floating_layout, layouts
|
||||||
from modules.mouse import mouse
|
from modules.mouse import mouse
|
||||||
from modules.hooks import *
|
from modules.hooks import *
|
||||||
import os
|
|
||||||
from modules.screens import screens
|
from modules.screens import screens
|
||||||
|
|
||||||
dgroups_key_binder = None
|
dgroups_key_binder = None
|
||||||
dgroups_app_rules = [] # type: List
|
dgroups_app_rules = [] # type: List
|
||||||
main = None # WARNING: this is deprecated and will be removed soon
|
main = None # WARNING: this is deprecated and will be removed soon
|
||||||
@ -15,7 +15,5 @@ auto_fullscreen = True
|
|||||||
focus_on_window_activation = "urgent"
|
focus_on_window_activation = "urgent"
|
||||||
wmname = "LG3D"
|
wmname = "LG3D"
|
||||||
widget_defaults = dict(
|
widget_defaults = dict(
|
||||||
font='Cascadia Code',
|
font="Cascadia Code", fontsize=16, padding=12, foreground="CEC8C6"
|
||||||
fontsize=13,
|
|
||||||
padding=3
|
|
||||||
)
|
)
|
||||||
|
@ -5,38 +5,48 @@ from .keys import keys, mod
|
|||||||
|
|
||||||
groups = [Group(i) for i in "1234567890"]
|
groups = [Group(i) for i in "1234567890"]
|
||||||
|
|
||||||
browsers = [
|
browsers = [Match(wm_class="firefox"), Match(wm_class="Google-chrome")]
|
||||||
Match(wm_class="firefox"),
|
|
||||||
Match(wm_class="Google-chrome")]
|
|
||||||
file_managers = [Match(wm_class="Thunar")]
|
file_managers = [Match(wm_class="Thunar")]
|
||||||
video_players = [
|
video_players = [Match(wm_class="streamlink-twitch-gui"), Match(wm_class="mpv")]
|
||||||
Match(wm_class="streamlink-twitch-gui"),
|
|
||||||
Match(wm_class="mpv")]
|
|
||||||
groups = [
|
groups = [
|
||||||
Group('1'),
|
Group("1"),
|
||||||
Group('2', matches=[Match(wm_class="VirtualBox Manager")]),
|
Group("2", matches=[Match(wm_class="VirtualBox Manager")]),
|
||||||
Group('3', matches=[Match(wm_class="Thunderbird")]),
|
Group("3", matches=[Match(wm_class="Thunderbird")]),
|
||||||
Group('4', matches=[Match(wm_class="st-256color")]),
|
Group("4", matches=[Match(wm_class="st-256color")]),
|
||||||
Group('5', matches=file_managers),
|
Group("5", matches=file_managers),
|
||||||
Group('6'),
|
Group("6"),
|
||||||
Group('7', matches=browsers),
|
Group("7", matches=browsers),
|
||||||
Group('8', matches=video_players),
|
Group("8", matches=video_players),
|
||||||
Group('9'),
|
Group("9"),
|
||||||
Group('0', matches=[Match(wm_class="TelegramDesktop")]),
|
Group("0", matches=[Match(wm_class="TelegramDesktop")]),
|
||||||
]
|
]
|
||||||
groups.append(ScratchPad("scratchpad", [
|
groups.append(
|
||||||
|
ScratchPad(
|
||||||
|
"scratchpad",
|
||||||
|
[
|
||||||
# define a drop down terminal.
|
# define a drop down terminal.
|
||||||
# it is placed in the upper third of screen by default.
|
# it is placed in the upper third of screen by default.
|
||||||
DropDown("term", "st", opacity=1.0)
|
DropDown("term", "st", opacity=1.0)
|
||||||
]))
|
],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
symbols = 'arstgmneio'
|
symbols = "arstgmneio"
|
||||||
|
|
||||||
for i, j in zip(groups, symbols):
|
for i, j in zip(groups, symbols):
|
||||||
keys.extend([
|
keys.extend(
|
||||||
Key([mod], j, lazy.group[i.name].toscreen(),
|
[
|
||||||
desc="Switch to group {}".format(i.name)),
|
Key(
|
||||||
|
[mod],
|
||||||
Key([mod, "shift"], j, lazy.window.togroup(i.name, switch_group=True),
|
j,
|
||||||
desc="Switch to & move focused window to group {}".format(i.name)),
|
lazy.group[i.name].toscreen(),
|
||||||
])
|
desc="Switch to group {}".format(i.name),
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
j,
|
||||||
|
lazy.window.togroup(i.name, switch_group=True),
|
||||||
|
desc="Switch to & move focused window to group {}".format(i.name),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@ -6,13 +6,13 @@ from libqtile.command.client import InteractiveCommandClient
|
|||||||
|
|
||||||
@hook.subscribe.startup
|
@hook.subscribe.startup
|
||||||
def autostart():
|
def autostart():
|
||||||
subprocess.call(['autostart.sh'])
|
subprocess.call(["autostart.sh"])
|
||||||
|
|
||||||
|
|
||||||
@hook.subscribe.startup_complete
|
@hook.subscribe.startup_complete
|
||||||
def focus_group():
|
def focus_group():
|
||||||
c = InteractiveCommandClient()
|
c = InteractiveCommandClient()
|
||||||
c.group['4'].toscreen()
|
c.group["4"].toscreen()
|
||||||
|
|
||||||
|
|
||||||
@hook.subscribe.client_managed
|
@hook.subscribe.client_managed
|
||||||
|
@ -23,126 +23,118 @@ keys = [
|
|||||||
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
||||||
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
||||||
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
||||||
|
Key(
|
||||||
Key([mod], "Tab", lazy.screen.toggle_group(),
|
[mod],
|
||||||
desc="Toggle back and forth between latest groups"),
|
"Tab",
|
||||||
|
lazy.screen.toggle_group(),
|
||||||
|
desc="Toggle back and forth between latest groups",
|
||||||
|
),
|
||||||
Key([mod], "d", lazy.spawn("rofi -show combi"), desc="spawn rofi"),
|
Key([mod], "d", lazy.spawn("rofi -show combi"), desc="spawn rofi"),
|
||||||
|
|
||||||
# Move windows between left/right columns or move up/down in current
|
# Move windows between left/right columns or move up/down in current
|
||||||
# stack. Moving out of range in Columns layout will create new column.
|
# stack. Moving out of range in Columns layout will create new column.
|
||||||
Key([mod, "shift"], "h",
|
Key(
|
||||||
lazy.layout.shuffle_left(), desc="Move window to the left"),
|
[mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"
|
||||||
Key([mod, "shift"], "l",
|
),
|
||||||
lazy.layout.shuffle_right(), desc="Move window to the right"),
|
Key(
|
||||||
Key([mod, "shift"], "j",
|
[mod, "shift"],
|
||||||
lazy.layout.shuffle_down(), desc="Move window down"),
|
"l",
|
||||||
Key([mod, "shift"], "k",
|
lazy.layout.shuffle_right(),
|
||||||
lazy.layout.shuffle_up(), desc="Move window up"),
|
desc="Move window to the right",
|
||||||
|
),
|
||||||
|
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
|
||||||
|
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
|
||||||
# Grow windows. If current window is on the edge of screen and direction
|
# Grow windows. If current window is on the edge of screen and direction
|
||||||
# will be to screen edge - window would shrink.
|
# will be to screen edge - window would shrink.
|
||||||
Key([mod, "control"], "h",
|
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
|
||||||
lazy.layout.grow_left(), desc="Grow window to the left"),
|
Key(
|
||||||
Key([mod, "control"], "l",
|
[mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"
|
||||||
lazy.layout.grow_right(), desc="Grow window to the right"),
|
),
|
||||||
Key([mod, "control"], "j",
|
Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
|
||||||
lazy.layout.grow_down(), desc="Grow window down"),
|
Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
|
||||||
Key([mod, "control"], "k",
|
|
||||||
lazy.layout.grow_up(), desc="Grow window up"),
|
|
||||||
# KeyChord([mod], "w", [
|
# KeyChord([mod], "w", [
|
||||||
# Key([], "g", lazy.layout.grow()),
|
# Key([mod], "g", lazy.layout.grow()),
|
||||||
# Key([], "s", lazy.layout.shrink()),
|
# Key([mod], "s", lazy.layout.shrink()),
|
||||||
# Key([], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
|
# Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
|
||||||
# Key([], "m", lazy.layout.maximize())],
|
# Key([mod], "m", lazy.layout.maximize())],
|
||||||
# mode="Windows"
|
# mode="Windows"
|
||||||
# ),
|
# ),
|
||||||
Key([mod], "f",
|
Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"),
|
||||||
lazy.window.toggle_fullscreen(), desc='Toggle fullscreen'),
|
Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc="Toggle floating"),
|
||||||
Key([mod, "shift"], "f",
|
|
||||||
lazy.window.toggle_floating(), desc='Toggle floating'),
|
|
||||||
|
|
||||||
# Toggle between split and unsplit sides of stack.
|
# Toggle between split and unsplit sides of stack.
|
||||||
# Split = all windows displayed
|
# Split = all windows displayed
|
||||||
# Unsplit = 1 window displayed, like Max layout, but still with
|
# Unsplit = 1 window displayed, like Max layout, but still with
|
||||||
# multiple stack panes
|
# multiple stack panes
|
||||||
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",
|
||||||
|
),
|
||||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||||
|
|
||||||
# Toggle between different layouts as defined below
|
# Toggle between different layouts as defined below
|
||||||
Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"),
|
Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"),
|
||||||
Key([mod, 'shift'], "space",
|
Key([mod, "shift"], "space", lazy.spawn("chlayout"), desc="Next keyboard layout."),
|
||||||
lazy.spawn("chlayout"), desc="Next keyboard layout."),
|
Key([mod], "comma", lazy.screen.prev_group(), desc="Move to the group on the left"),
|
||||||
Key([mod], "comma",
|
Key(
|
||||||
lazy.screen.prev_group(), desc="Move to the group on the left"),
|
[mod], "period", lazy.screen.next_group(), desc="Move to the group on the right"
|
||||||
Key([mod], "period",
|
),
|
||||||
lazy.screen.next_group(), desc="Move to the group on the right"),
|
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
||||||
Key([mod], "q",
|
Key([mod, "shift", "control"], "h", lazy.layout.swap_column_left()),
|
||||||
lazy.window.kill(), desc="Kill focused window"),
|
|
||||||
Key([mod, "shift", "control"], "h",
|
|
||||||
lazy.layout.swap_column_left()),
|
|
||||||
Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right()),
|
Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right()),
|
||||||
# Key([mod, "shift"], "space", lazy.layout.flip()),
|
# Key([mod, "shift"], "space", lazy.layout.flip()),
|
||||||
Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"),
|
Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"),
|
||||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
|
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
|
||||||
Key([mod, "control"], "n",
|
Key([mod, "control"], "n", lazy.spawn("lock-screen"), desc="Lock screen"),
|
||||||
lazy.spawn("lock-screen"), desc="Lock screen"),
|
Key(
|
||||||
Key([mod, "control"], "s",
|
[mod, "control"],
|
||||||
lazy.spawn("toggle-screenkey"), desc="Show keys on screen"),
|
"s",
|
||||||
Key([mod, "shift"], "d",
|
lazy.spawn("toggle-screenkey"),
|
||||||
lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
|
desc="Show keys on screen",
|
||||||
|
),
|
||||||
|
Key(
|
||||||
|
[mod, "shift"],
|
||||||
|
"d",
|
||||||
|
lazy.spawncmd(),
|
||||||
|
desc="Spawn a command using a prompt widget",
|
||||||
|
),
|
||||||
Key([mod], "p", lazy.spawn("passmenu"), desc="Spawn passmenu"),
|
Key([mod], "p", lazy.spawn("passmenu"), desc="Spawn passmenu"),
|
||||||
|
|
||||||
# Key([mod, "shift"], "e", lazy.spawn("menu_powermenu"), desc="Spawn powermenu using rofi"),
|
# Key([mod, "shift"], "e", lazy.spawn("menu_powermenu"), desc="Spawn powermenu using rofi"),
|
||||||
|
|
||||||
# Key([mod], "n", lazy.spawn(home("~/Desktop/GitRepositories/networkmanager-dmenu/networkmanager_dmenu")), desc="Launch network manager"),
|
# Key([mod], "n", lazy.spawn(home("~/Desktop/GitRepositories/networkmanager-dmenu/networkmanager_dmenu")), desc="Launch network manager"),
|
||||||
# Key([mod], "i", lazy.spawn("sxiv " + home("~/Pictures/keyboard-layout.jpg")), desc="Show current keyboard layout"),
|
# Key([mod], "i", lazy.spawn("sxiv " + home("~/Pictures/keyboard-layout.jpg")), desc="Show current keyboard layout"),
|
||||||
|
Key([mod], "b", lazy.spawn("rofi-bluetooth"), desc="Manage bluetooth devices"),
|
||||||
Key([mod], "b", lazy.spawn('rofi-bluetooth'),
|
Key(
|
||||||
desc="Manage bluetooth devices"),
|
[mod],
|
||||||
|
"v",
|
||||||
Key([mod], "v", lazy.spawn('polybar-wireguard --toggle'),
|
lazy.spawn("polybar-wireguard --toggle"),
|
||||||
desc="Manage VPN connections"),
|
desc="Manage VPN connections",
|
||||||
|
),
|
||||||
# Key([mod], "x", lazy.spawn(home("~/scripts/kill-process.sh")),
|
# Key([mod], "x", lazy.spawn(home("~/scripts/kill-process.sh")),
|
||||||
# desc="Kill processes using rofi"),
|
# desc="Kill processes using rofi"),
|
||||||
|
|
||||||
# == audio
|
# == audio
|
||||||
|
Key(
|
||||||
Key([], "XF86AudioRaiseVolume",
|
[],
|
||||||
lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
|
"XF86AudioRaiseVolume",
|
||||||
Key([], "XF86AudioLowerVolume",
|
lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%"),
|
||||||
lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")),
|
),
|
||||||
Key([], "XF86AudioMute",
|
Key(
|
||||||
lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
|
[],
|
||||||
Key([], "XF86AudioMicMute",
|
"XF86AudioLowerVolume",
|
||||||
lazy.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle")),
|
lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%"),
|
||||||
|
),
|
||||||
|
Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
|
||||||
|
Key(
|
||||||
|
[],
|
||||||
|
"XF86AudioMicMute",
|
||||||
|
lazy.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle"),
|
||||||
|
),
|
||||||
# == backlight
|
# == backlight
|
||||||
Key([], "XF86MonBrightnessUp",
|
Key([], "XF86MonBrightnessUp", lazy.spawn("light -A 5")),
|
||||||
lazy.spawn("light -A 5")),
|
Key([], "XF86MonBrightnessDown", lazy.spawn("light -U 5")),
|
||||||
Key([], "XF86MonBrightnessDown",
|
Key([], "Print", lazy.spawn("flameshot gui")),
|
||||||
lazy.spawn("light -U 5")),
|
Key(["shift"], "Print", lazy.spawn("flameshot full")),
|
||||||
|
Key(["control"], "Print", lazy.spawn("flameshot full")),
|
||||||
Key([], "Print",
|
Key([], "F12", lazy.group["scratchpad"].dropdown_toggle("term")),
|
||||||
lazy.spawn("flameshot gui")),
|
Key([], "XF86KbdBrightnessUp", lazy.spawn("keyboard_backlight.sh inc")),
|
||||||
|
Key([], "XF86KbdBrightnessDown", lazy.spawn("keyboard_backlight.sh dec")),
|
||||||
Key(["shift"], "Print",
|
Key([], "XF86TouchpadToggle", lazy.spawn("toggle-touchpad.sh")),
|
||||||
lazy.spawn("flameshot full")),
|
|
||||||
|
|
||||||
Key(["control"], "Print",
|
|
||||||
lazy.spawn("flameshot full")),
|
|
||||||
|
|
||||||
Key([], 'F12', lazy.group['scratchpad'].dropdown_toggle('term')),
|
|
||||||
|
|
||||||
Key([], "XF86KbdBrightnessUp",
|
|
||||||
lazy.spawn("keyboard_backlight.sh inc")),
|
|
||||||
Key([], "XF86KbdBrightnessDown",
|
|
||||||
lazy.spawn("keyboard_backlight.sh dec")),
|
|
||||||
|
|
||||||
|
|
||||||
Key([], "XF86TouchpadToggle",
|
|
||||||
lazy.spawn("toggle-touchpad.sh")),
|
|
||||||
]
|
]
|
||||||
|
@ -9,7 +9,7 @@ from libqtile.config import Match
|
|||||||
layouts = [
|
layouts = [
|
||||||
# layout.MonadTall(margin=8, border_focus='#5294e2',
|
# layout.MonadTall(margin=8, border_focus='#5294e2',
|
||||||
# border_normal='#2c5380'),
|
# border_normal='#2c5380'),
|
||||||
layout.Columns(margin=8, border_focus_stack='#d75f5f'),
|
layout.Columns(margin=8, border_focus_stack="#d75f5f"),
|
||||||
layout.Max(),
|
layout.Max(),
|
||||||
# Try more layouts by unleashing below layouts.
|
# Try more layouts by unleashing below layouts.
|
||||||
# layout.Stack(num_stacks=2),
|
# layout.Stack(num_stacks=2),
|
||||||
@ -24,17 +24,19 @@ layouts = [
|
|||||||
# layout.Zoomy(),
|
# layout.Zoomy(),
|
||||||
]
|
]
|
||||||
|
|
||||||
floating_layout = layout.Floating(float_rules=[
|
floating_layout = layout.Floating(
|
||||||
|
float_rules=[
|
||||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||||
*layout.Floating.default_float_rules,
|
*layout.Floating.default_float_rules,
|
||||||
Match(wm_class='confirmreset'), # gitk
|
Match(wm_class="confirmreset"), # gitk
|
||||||
Match(wm_class='makebranch'), # gitk
|
Match(wm_class="makebranch"), # gitk
|
||||||
Match(wm_class='maketag'), # gitk
|
Match(wm_class="maketag"), # gitk
|
||||||
Match(wm_class='ssh-askpass'), # ssh-askpass
|
Match(wm_class="ssh-askpass"), # ssh-askpass
|
||||||
Match(wm_class='sxiv'),
|
Match(wm_class="sxiv"),
|
||||||
Match(wm_class='telegram-desktop'),
|
Match(wm_class="telegram-desktop"),
|
||||||
Match(wm_class='streamlink-twitch-gui'),
|
Match(wm_class="streamlink-twitch-gui"),
|
||||||
Match(wm_class='pinentry-gtk-2'),
|
Match(wm_class="pinentry-gtk-2"),
|
||||||
Match(title='branchdialog'), # gitk
|
Match(title="branchdialog"), # gitk
|
||||||
Match(title='pinentry'), # GPG key password entry
|
Match(title="pinentry"), # GPG key password entry
|
||||||
])
|
]
|
||||||
|
)
|
||||||
|
@ -4,9 +4,14 @@ from .keys import mod
|
|||||||
|
|
||||||
# Drag floating layouts.
|
# Drag floating layouts.
|
||||||
mouse = [
|
mouse = [
|
||||||
Drag([mod], "Button1", lazy.window.set_position_floating(),
|
Drag(
|
||||||
start=lazy.window.get_position()),
|
[mod],
|
||||||
Drag([mod], "Button3", lazy.window.set_size_floating(),
|
"Button1",
|
||||||
start=lazy.window.get_size()),
|
lazy.window.set_position_floating(),
|
||||||
Click([mod], "Button2", lazy.window.bring_to_front())
|
start=lazy.window.get_position(),
|
||||||
|
),
|
||||||
|
Drag(
|
||||||
|
[mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()
|
||||||
|
),
|
||||||
|
Click([mod], "Button2", lazy.window.bring_to_front()),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user