summaryrefslogtreecommitdiffstats
path: root/.config/qtile/config.py
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-07-26 21:29:51 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-07-26 21:29:51 +0200
commita0807a0ebb07d1cfbcf88bc3dc81eca4a5ff11e1 (patch)
treef9fcce866310d38b3401afb3d7aa153e4aa3f281 /.config/qtile/config.py
parentd3c7562f6b8d7d14fe6198897289973398177074 (diff)
downloaddotfiles-a0807a0ebb07d1cfbcf88bc3dc81eca4a5ff11e1.tar.gz
dotfiles-a0807a0ebb07d1cfbcf88bc3dc81eca4a5ff11e1.zip
Add config.org file to qtile conig
Diffstat (limited to '.config/qtile/config.py')
-rw-r--r--.config/qtile/config.py113
1 files changed, 57 insertions, 56 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py
index 86d14bd..0cdd232 100644
--- a/.config/qtile/config.py
+++ b/.config/qtile/config.py
@@ -10,8 +10,9 @@ from libqtile.lazy import lazy
10from libqtile.utils import guess_terminal 10from libqtile.utils import guess_terminal
11from libqtile import hook 11from libqtile import hook
12 12
13mod = "mod4" 13MOD = "mod4"
14terminal = guess_terminal() 14
15TERMINAL = guess_terminal()
15 16
16BAR = '#282a36' 17BAR = '#282a36'
17LIGHT_BAR = '#393b37' 18LIGHT_BAR = '#393b37'
@@ -22,55 +23,54 @@ GREEN = '#50fa7b'
22CYAN = '#8be9fd' 23CYAN = '#8be9fd'
23LIGHT_CYAN = '#abfbff' 24LIGHT_CYAN = '#abfbff'
24 25
25
26@hook.subscribe.startup_once 26@hook.subscribe.startup_once
27def autostart(): 27def autostart():
28 home = os.path.expanduser('~/.config/qtile/autorc') 28 home = os.path.expanduser('~/.config/qtile/autorc')
29 subprocess.run([home]) 29 subprocess.run([home])
30 30
31keys = [ 31keys = [
32 Key([mod], "h", lazy.layout.left(), desc="Move focus to left"), 32 Key([MOD], "h", lazy.layout.left(), desc="Move focus to left"),
33 Key([mod], "l", lazy.layout.right(), desc="Move focus to right"), 33 Key([MOD], "l", lazy.layout.right(), desc="Move focus to right"),
34 Key([mod], "j", lazy.layout.down(), desc="Move focus down"), 34 Key([MOD], "j", lazy.layout.down(), desc="Move focus down"),
35 Key([mod], "k", lazy.layout.up(), desc="Move focus up"), 35 Key([MOD], "k", lazy.layout.up(), desc="Move focus up"),
36 Key([mod], "s", lazy.next_screen() ), 36 Key([MOD], "s", lazy.next_screen() ),
37 Key([mod], "space", lazy.layout.next(), 37 Key([MOD], "space", lazy.window.toggle_floating(),
38 desc="Move window focus to other window"), 38 desc="Move window focus to other window"),
39 39
40 Key([mod, "shift"], "h", lazy.layout.shuffle_left(), 40 Key([MOD, "shift"], "h", lazy.layout.shuffle_left(),
41 desc="Move window to the left"), 41 desc="Move window to the left"),
42 Key([mod, "shift"], "l", lazy.layout.shuffle_right(), 42 Key([MOD, "shift"], "l", lazy.layout.shuffle_right(),
43 desc="Move window to the right"), 43 desc="Move window to the right"),
44 Key([mod, "shift"], "j", lazy.layout.shuffle_down(), 44 Key([MOD, "shift"], "j", lazy.layout.shuffle_down(),
45 desc="Move window down"), 45 desc="Move window down"),
46 Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"), 46 Key([MOD, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
47 47
48 Key([mod, "control"], "h", lazy.layout.grow_left(), 48 Key([MOD, "control"], "h", lazy.layout.grow_left(),
49 desc="Grow window to the left"), 49 desc="Grow window to the left"),
50 Key([mod, "control"], "l", lazy.layout.grow_right(), 50 Key([MOD, "control"], "l", lazy.layout.grow_right(),
51 desc="Grow window to the right"), 51 desc="Grow window to the right"),
52 Key([mod, "control"], "j", lazy.layout.grow_down(), 52 Key([MOD, "control"], "j", lazy.layout.grow_down(),
53 desc="Grow window down"), 53 desc="Grow window down"),
54 Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), 54 Key([MOD, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
55 Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), 55 Key([MOD], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
56 56
57 Key([mod, "shift"], "Return", lazy.layout.toggle_split(), 57 Key([MOD, "shift"], "Return", lazy.layout.toggle_split(),
58 desc="Toggle between split and unsplit sides of stack"), 58 desc="Toggle between split and unsplit sides of stack"),
59 Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), 59 Key([MOD], "Return", lazy.spawn(TERMINAL), desc="Launch terminal"),
60 60
61 Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), 61 Key([MOD], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
62 Key([mod], "c", lazy.window.kill(), desc="Kill focused window"), 62 Key([MOD], "c", lazy.window.kill(), desc="Kill focused window"),
63 63
64 Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"), 64 Key([MOD, "control"], "r", lazy.restart(), desc="Restart Qtile"),
65 Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), 65 Key([MOD, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
66 66
67 Key([mod], "F12", os.system("xbacklight -inc 10"), desc="Inc backlight"), 67 Key([MOD], "F12", os.system("xbacklight -inc 10"), desc="Inc backlight"),
68 Key([mod], "F11", os.system("xbacklight -dec 10"), desc="Dec backlight"), 68 Key([MOD], "F11", os.system("xbacklight -dec 10"), desc="Dec backlight"),
69 69
70 Key([mod], "r", lazy.spawncmd(), 70 Key([MOD], "r", lazy.spawncmd(),
71 desc="Spawn a command using a prompt widget"), 71 desc="Spawn a command using a prompt widget"),
72 72
73 Key([mod], "p", lazy.run_extension(extension.DmenuRun( 73 Key([MOD], "p", lazy.run_extension(extension.DmenuRun(
74 dmenu_prompt="Run", 74 dmenu_prompt="Run",
75 dmenu_bottom=False, 75 dmenu_bottom=False,
76 dmenu_lines=56, 76 dmenu_lines=56,
@@ -79,17 +79,18 @@ keys = [
79 foreground=CYAN, 79 foreground=CYAN,
80 ))), 80 ))),
81 81
82 Key([mod, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), 82 Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"),
83 Key([mod, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), 83 Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"),
84 Key([mod, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), 84 Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"),
85 Key([mod, "mod1"], "e", lazy.spawn("emacs"), desc="Spawn emacs"), 85 Key([MOD, "mod1"], "e", lazy.spawn("emacs"), desc="Spawn emacs"),
86 Key([mod, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), 86 Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"),
87 Key([mod, "mod1"], "c", lazy.spawn("alacritty -e cmus"), desc="Spawn cmus (music player)"), 87 Key([MOD, "mod1"], "c", lazy.spawn("alacritty -e cmus"), desc="Spawn cmus (music player)"),
88 Key([mod, "mod1"], "g", lazy.spawn("alacritty -e /home/jakub/.config/qtile/mdt_shell"), desc="connect to google coral device"), 88 Key([MOD, "mod1"], "g", lazy.spawn("alacritty -e /home/jakub/.config/qtile/mdt_shell"), desc="connect to google coral device"),
89 Key([mod, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"), 89 Key([MOD, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"),
90 Key([mod, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"), 90 Key([MOD, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"),
91 Key([mod, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), 91 Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"),
92] 92]
93
93groups_names = [ 94groups_names = [
94 "dev", 95 "dev",
95 "www", 96 "www",
@@ -102,13 +103,20 @@ groups_names = [
102groups = [Group(i) for i in groups_names] 103groups = [Group(i) for i in groups_names]
103for i, group in enumerate(groups): 104for i, group in enumerate(groups):
104 keys.extend([ 105 keys.extend([
105 Key([mod], str(i+1), lazy.group[group.name].toscreen(), 106 Key([MOD], str(i+1), lazy.group[group.name].toscreen(),
106 desc="Switch to group {}".format(group.name)), 107 desc="Switch to group {}".format(group.name)),
107 108
108 Key([mod, "shift"], str(i+1), lazy.window.togroup(group.name, switch_group=True), 109 Key([MOD, "shift"], str(i+1), lazy.window.togroup(group.name, switch_group=True),
109 desc="Switch to & move focused window to group {}".format(group.name)), 110 desc="Switch to & move focused window to group {}".format(group.name)),
110 ]) 111 ])
111 112
113mouse = [
114 Drag([MOD], "Button1", lazy.window.set_position_floating(),
115 start=lazy.window.get_position()),
116 Drag([MOD], "Button3", lazy.window.set_size_floating(),
117 start=lazy.window.get_size()),
118 Click([MOD], "Button2", lazy.window.bring_to_front())
119]
112 120
113layout_cfg = { 121layout_cfg = {
114 'border_width': 2, 122 'border_width': 2,
@@ -118,12 +126,12 @@ layout_cfg = {
118} 126}
119 127
120layouts = [ 128layouts = [
121 layout.Columns(**layout_cfg), 129 # layout.Columns(**layout_cfg),
122 # layout.Max(), 130 # layout.Max(),
123 layout.Stack(num_stacks=1, **layout_cfg), 131 layout.Stack(num_stacks=1, **layout_cfg),
124 # layout.Bsp(), 132 # layout.Bsp(),
125 # layout.Matrix(), 133 # layout.Matrix(),
126 # layout.MonadTall(), 134 layout.MonadTall(**layout_cfg),
127 # layout.MonadWide(), 135 # layout.MonadWide(),
128 # layout.RatioTile(), 136 # layout.RatioTile(),
129 # layout.Tile(), 137 # layout.Tile(),
@@ -137,7 +145,6 @@ widget_defaults = dict(
137 fontsize=12, 145 fontsize=12,
138 padding=6, 146 padding=6,
139) 147)
140extension_defaults = widget_defaults.copy()
141 148
142transparent_sep = { 149transparent_sep = {
143 'foreground': BAR, 150 'foreground': BAR,
@@ -195,19 +202,6 @@ screens = [
195 ), 202 ),
196] 203]
197 204
198mouse = [
199 Drag([mod], "Button1", lazy.window.set_position_floating(),
200 start=lazy.window.get_position()),
201 Drag([mod], "Button3", lazy.window.set_size_floating(),
202 start=lazy.window.get_size()),
203 Click([mod], "Button2", lazy.window.bring_to_front())
204]
205
206dgroups_key_binder = None
207dgroups_app_rules = [] # type: List
208follow_mouse_focus = True
209bring_front_click = False
210cursor_warp = False
211floating_layout = layout.Floating(float_rules=[ 205floating_layout = layout.Floating(float_rules=[
212 # Run the utility of `xprop` to see the wm class and name of an X client. 206 # Run the utility of `xprop` to see the wm class and name of an X client.
213 *layout.Floating.default_float_rules, 207 *layout.Floating.default_float_rules,
@@ -218,6 +212,13 @@ floating_layout = layout.Floating(float_rules=[
218 Match(title='branchdialog'), # gitk 212 Match(title='branchdialog'), # gitk
219 Match(title='pinentry'), # GPG key password entry 213 Match(title='pinentry'), # GPG key password entry
220]) 214])
215
216dgroups_key_binder = None
217dgroups_app_rules = []
218
219follow_mouse_focus = True
220bring_front_click = False
221cursor_warp = False
221auto_fullscreen = True 222auto_fullscreen = True
222focus_on_window_activation = "smart" 223focus_on_window_activation = "smart"
223reconfigure_screens = True 224reconfigure_screens = True