diff options
-rw-r--r-- | .config/qtile/config.py | 26 | ||||
-rw-r--r-- | Qtile.org (renamed from .config/qtile/config.org) | 32 |
2 files changed, 32 insertions, 26 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py index abd9549..9106731 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py | |||
@@ -4,7 +4,7 @@ import subprocess | |||
4 | from typing import List | 4 | from typing import List |
5 | 5 | ||
6 | from libqtile import bar, layout, widget | 6 | from libqtile import bar, layout, widget |
7 | from libqtile.config import Click, Drag, Group, Key, Match, Screen | 7 | from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord |
8 | from libqtile import extension | 8 | from libqtile import extension |
9 | from libqtile.lazy import lazy | 9 | from libqtile.lazy import lazy |
10 | from libqtile.utils import guess_terminal | 10 | from libqtile.utils import guess_terminal |
@@ -14,6 +14,8 @@ MOD = "mod4" | |||
14 | 14 | ||
15 | TERMINAL = guess_terminal() | 15 | TERMINAL = guess_terminal() |
16 | 16 | ||
17 | DMENU_FLAGS = '-l 16 -p run -c -i' | ||
18 | |||
17 | BAR = '#282a36' | 19 | BAR = '#282a36' |
18 | LIGHT_BAR = '#393b37' | 20 | LIGHT_BAR = '#393b37' |
19 | YELLOW = '#f1fa8c' | 21 | YELLOW = '#f1fa8c' |
@@ -70,22 +72,22 @@ keys = [ | |||
70 | Key([MOD], "r", lazy.spawncmd(), | 72 | Key([MOD], "r", lazy.spawncmd(), |
71 | desc="Spawn a command using a prompt widget"), | 73 | desc="Spawn a command using a prompt widget"), |
72 | 74 | ||
73 | Key([MOD], "p", lazy.run_extension(extension.DmenuRun( | 75 | KeyChord([MOD], "p", [ |
74 | dmenu_prompt="Run", | 76 | Key([], "p", lazy.spawn(f"dmenu_run {DMENU_FLAGS}"), desc="Spawn dmenu run"), |
75 | dmenu_bottom=False, | 77 | Key([], "n", lazy.spawn(f"networkmanager_dmenu {DMENU_FLAGS}"), desc="Spawn dmenu for network manager"), |
76 | dmenu_lines=56, | 78 | ]), |
77 | dmenu_ignorecase=True, | ||
78 | background=BAR, | ||
79 | foreground=CYAN, | ||
80 | ))), | ||
81 | 79 | ||
82 | Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), | 80 | Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), |
83 | Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), | 81 | Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), |
84 | Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), | 82 | Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), |
85 | Key([MOD, "mod1"], "e", lazy.spawn("emacs"), desc="Spawn emacs"), | 83 | |
84 | KeyChord([MOD], "e", [ | ||
85 | Key([], "e", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Spawn Emacsclient"), | ||
86 | Key([], "d", lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"), desc='Emacsclient Dired'), | ||
87 | Key([], "m", lazy.spawn("emacsclient -c -a 'emacs' --eval '(emms-browser)'"), desc='Emacsclient Dired'), | ||
88 | ]), | ||
89 | |||
86 | Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), | 90 | 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)"), | ||
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"), | 91 | 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)"), | 92 | 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"), | 93 | Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), |
diff --git a/.config/qtile/config.org b/Qtile.org index be587dc..132bbe5 100644 --- a/.config/qtile/config.org +++ b/Qtile.org | |||
@@ -1,5 +1,5 @@ | |||
1 | #+title: Config | 1 | #+title: Config |
2 | #+PROPERTY: header-args:python :tangle config.py | 2 | #+PROPERTY: header-args:python :tangle .config/qtile/config.py |
3 | #+OPTIONS: TOC:3 | 3 | #+OPTIONS: TOC:3 |
4 | 4 | ||
5 | * Table of contents :TOC: | 5 | * Table of contents :TOC: |
@@ -21,7 +21,7 @@ import subprocess | |||
21 | from typing import List | 21 | from typing import List |
22 | 22 | ||
23 | from libqtile import bar, layout, widget | 23 | from libqtile import bar, layout, widget |
24 | from libqtile.config import Click, Drag, Group, Key, Match, Screen | 24 | from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord |
25 | from libqtile import extension | 25 | from libqtile import extension |
26 | from libqtile.lazy import lazy | 26 | from libqtile.lazy import lazy |
27 | from libqtile.utils import guess_terminal | 27 | from libqtile.utils import guess_terminal |
@@ -39,6 +39,11 @@ MOD = "mod4" | |||
39 | TERMINAL = guess_terminal() | 39 | TERMINAL = guess_terminal() |
40 | #+end_src | 40 | #+end_src |
41 | 41 | ||
42 | *** Dmenu flags | ||
43 | #+begin_src python | ||
44 | DMENU_FLAGS = '-l 16 -p run -c -i' | ||
45 | #+end_src | ||
46 | |||
42 | *** Color scheme | 47 | *** Color scheme |
43 | #+begin_src python | 48 | #+begin_src python |
44 | BAR = '#282a36' | 49 | BAR = '#282a36' |
@@ -51,7 +56,6 @@ CYAN = '#8be9fd' | |||
51 | LIGHT_CYAN = '#abfbff' | 56 | LIGHT_CYAN = '#abfbff' |
52 | #+end_src | 57 | #+end_src |
53 | 58 | ||
54 | |||
55 | ** Startup script executor | 59 | ** Startup script executor |
56 | #+begin_src python | 60 | #+begin_src python |
57 | @hook.subscribe.startup_once | 61 | @hook.subscribe.startup_once |
@@ -105,22 +109,22 @@ keys = [ | |||
105 | Key([MOD], "r", lazy.spawncmd(), | 109 | Key([MOD], "r", lazy.spawncmd(), |
106 | desc="Spawn a command using a prompt widget"), | 110 | desc="Spawn a command using a prompt widget"), |
107 | 111 | ||
108 | Key([MOD], "p", lazy.run_extension(extension.DmenuRun( | 112 | KeyChord([MOD], "p", [ |
109 | dmenu_prompt="Run", | 113 | Key([], "p", lazy.spawn(f"dmenu_run {DMENU_FLAGS}"), desc="Spawn dmenu run"), |
110 | dmenu_bottom=False, | 114 | Key([], "n", lazy.spawn(f"networkmanager_dmenu {DMENU_FLAGS}"), desc="Spawn dmenu for network manager"), |
111 | dmenu_lines=56, | 115 | ]), |
112 | dmenu_ignorecase=True, | ||
113 | background=BAR, | ||
114 | foreground=CYAN, | ||
115 | ))), | ||
116 | 116 | ||
117 | Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), | 117 | Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), |
118 | Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), | 118 | Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), |
119 | Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), | 119 | Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), |
120 | Key([MOD, "mod1"], "e", lazy.spawn("emacs"), desc="Spawn emacs"), | 120 | |
121 | KeyChord([MOD], "e", [ | ||
122 | Key([], "e", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Spawn Emacsclient"), | ||
123 | Key([], "d", lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"), desc='Emacsclient Dired'), | ||
124 | Key([], "m", lazy.spawn("emacsclient -c -a 'emacs' --eval '(emms-browser)'"), desc='Emacsclient Dired'), | ||
125 | ]), | ||
126 | |||
121 | Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), | 127 | Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), |
122 | Key([MOD, "mod1"], "c", lazy.spawn("alacritty -e cmus"), desc="Spawn cmus (music player)"), | ||
123 | Key([MOD, "mod1"], "g", lazy.spawn("alacritty -e /home/jakub/.config/qtile/mdt_shell"), desc="connect to google coral device"), | ||
124 | Key([MOD, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"), | 128 | Key([MOD, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"), |
125 | Key([MOD, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"), | 129 | Key([MOD, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"), |
126 | Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), | 130 | Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), |