-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
123 lines (105 loc) · 3.75 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
import os
import re
import subprocess
from libqtile import layout, bar, hook
from libqtile.config import Drag, Group, Key, Match, Screen
from tools.monitor import *
from libqtile.lazy import lazy
#from libqtile.backend.wayland import InputConfig
import keys
mod = "mod4"
colors_1 = "#000000"
colors_2 = "#c0c5ce"
colors_3 = "#fab387"
colors_5 = "#cccccc"
colors_9 = "#555555"
keys = keys.keys
group_names = ["1", "2", "3", "4", "5", "6", "7", "8","9","0"]
group_labels = ["", "", "", "","", "","","","",""]
match = [
[""],[""],[""],[""],#1,2,3,4
["sublime_text", "Sublime_text","obsidian", "Obsidian"],["slack"],#5,6
["thunar", "Thunar"],#7
["google-chrome", "Google-chrome"],#8
["teams-for-linux"],#9
["Alacritty","alacritty"]#0
]
layout_theme = {
"margin":5,
"border_focus": "#fab300",
"border_normal": "#777777",
}
layouts = [
layout.MonadThreeCol(**layout_theme,ratio=0.5, single_border_width=0, border_width=2),
]
groups = []
for i in range(len(group_names)):
groups.append(Group(
name=group_names[i],
# layout= layout.MonadThreeCol(**layout_theme,ratio=0.5, single_border_width=0, border_width=1),
label=group_labels[i],
matches=[Match(wm_class=re.compile(rf"^{'|'.join(match[i])}$"))]
))
for index,i in enumerate(groups):
keys.extend([
Key([mod], i.name, lazy.group[i.name].toscreen()),
Key(["mod1"], i.name, lazy.window.togroup(i.name)),
Key(["control"], i.name, lazy.window.togroup(i.name) , lazy.group[i.name].toscreen()),
])
def init_widgets_defaults():
return dict(font="Inter Medium",
fontsize = 15,
padding = 2,
background=colors_1)
widget_defaults = init_widgets_defaults()
fix = 5
margin=[0, fix, fix, fix]
def init_screens():
wall_loc = "/usr/share/backgrounds/arcolinux-dual/wall.jpg"
main_scr = [Screen(wallpaper =wall_loc, wallpaper_mode = 'fill', bottom=bar.Bar(widgets=init_widgets_screen_tray(), size=24, opacity=1))]
add_scr = [Screen(wallpaper =wall_loc, wallpaper_mode = 'fill', bottom=bar.Bar(widgets=init_widgets_screen(), size=24, opacity=1)) for _ in range(2)]
return main_scr+add_scr
screens = init_screens()
# MOUSE CONFIGURATION
mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(),
start=lazy.window.get_position()),
Drag(["mod1"], "Button1", lazy.window.set_size_floating(),
start=lazy.window.get_size())
]
@hook.subscribe.startup_once
def start_once():
subprocess.call([os.path.expanduser('~') + '/.config/qtile/scripts/autostart.sh'])
@hook.subscribe.client_new
def set_floating(window):
if (window.window.get_wm_transient_for()
or window.window.get_wm_type() in floating_types):
window.floating = True
floating_types = ["notification", "toolbar", "splash", "dialog"]
floating_layout = layout.Floating(float_rules=[
*layout.Floating.default_float_rules,
Match(wm_class='confirm'),
Match(wm_class='dialog'),
Match(wm_class='archlinux-logout.py'),
Match(wm_class='Archlinux-logout.py'),
Match(wm_class='error'),
Match(wm_class='notification'),
Match(wm_class='splash'),
Match(wm_class='toolbar'),
Match(wm_class='feh'),
Match(wm_class='archlinux-logout'),
Match(wm_class='pavucontrol'),
], fullscreen_border_width = 0, border_width = 2, border_focus="#fab300",border_normal="#fab300",)
#wl_input_rules = {
# "type:keyboard": InputConfig(dwt=True, kb_variant="altgr-intl", kb_layout="us"),
# "*": InputConfig(tap=True, natural_scroll=True),
#}
auto_fullscreen = False
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
focus_on_window_activation = "focus" #"smart"
reconfigure_screens = True
auto_minimize = True
floats_kept_above = True
wmname = "LG3D"