-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
179 lines (157 loc) · 3.99 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# TODO handle MultiScreenGroupBox clicks and events
import logging
from os.path import expanduser
from libqtile import layout
from libqtile.lazy import lazy
from libqtile.config import Drag, Match
from taqtile.extra import Terminal, terminal
from taqtile.groups import generate_groups, get_dgroups
from taqtile.keys import get_keys
from taqtile.screens import (
get_screens,
PRIMARY_SCREEN,
SECONDARY_SCREEN,
TERTIARY_SCREEN,
)
from taqtile.system import get_num_monitors
from taqtile.themes import current_theme
from taqtile.layouts import Max
log_file_path = expanduser("~/.local/share/qtile/qtile.taqtile.log")
handler = logging.FileHandler(log_file_path)
formatter = logging.Formatter(
"%(asctime)s %(levelname)s [%(name)s] [%(module)s] %(message)s"
)
handler.setFormatter(formatter)
logger = logging.getLogger("taqtile")
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
logger.info("Logger initialized")
mod = "mod4"
num_monitors = get_num_monitors()
layouts = [
Max(**current_theme),
# layout.Stack(**current_theme),
# layout.xmonad.MonadTall(ratio=0.50, **current_theme),
# layout.Tile(**current_theme),
# layout.Zoomy(**current_theme),
# layout.TreeTab(),
# a layout just for gimp
# layout.Slice(
# "term1",
# 192,
# name="gimp",
# role="gimp-toolbox",
# fallback=layout.Slice(
# "right",
# 256,
# role="gimp-dock",
# fallback=layout.Stack(num_stacks=1, **border_args),
# ),
# ),
]
# This allows you to drag windows around with the mouse if you want.
mouse = [
Drag(
[mod],
"Button1",
lazy.window.set_position_floating(),
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())
]
float_windows = ["buddy_list", "antimicrox"]
follow_mouse_focus = False # pylint: noqa, flake8: noqa
bring_front_click = True
cursor_warp = False
auto_fullscreen = True
widget_defaults = current_theme
dgroups_app_rules = get_dgroups()
num_groups = (num_monitors) * 10
groups = generate_groups(num_groups, layouts)
keys = get_keys(mod, num_groups, num_monitors)
Terminal(
"term0",
"F11",
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
screen=PRIMARY_SCREEN,
)
Terminal(
"term1",
"F12",
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
screen=SECONDARY_SCREEN,
)
Terminal(
"term2",
"XF86Launch5",
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
screen=TERTIARY_SCREEN,
)
Terminal(
"salt-bison",
[[mod], "F12"],
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
spawn=expanduser("~/.bin/salt-bison"),
screen=SECONDARY_SCREEN,
)
Terminal(
"comms",
"F9",
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
screen=PRIMARY_SCREEN,
)
Terminal(
"audio",
"F3",
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
screen=PRIMARY_SCREEN,
)
Terminal(
"htop",
[
["control"],
"Escape",
],
groups=groups,
keys=keys,
dgroups=dgroups_app_rules,
screen=TERTIARY_SCREEN,
spawn=terminal("htop", cmd="htop"),
)
screens = get_screens(num_monitors, groups)
floating_layout = layout.Floating(
float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client.
*layout.Floating.default_float_rules,
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="branchdialog"), # gitk
Match(wm_class="pinentry-qt"), # GPG key password entry
Match(
title=[
"discord.com is sharing your screen.",
],
),
Match(wm_class=["Wine", "Xephyr", "Gmrun"]),
]
)