config.py 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971
  1. # -*- coding: utf-8 -*-
  2. import os
  3. import re
  4. import socket
  5. import subprocess
  6. from typing import List
  7. from libqtile import bar, layout, widget, hook
  8. from libqtile.config import Click, Drag, Group, Key, Screen, KeyChord, Match
  9. from libqtile.lazy import lazy
  10. from libqtile import qtile
  11. from libqtile.backend.base import Internal
  12. ##### IMPORTs of my modules #####
  13. from modules import memory
  14. from modules import all_windows_count
  15. from modules import syncthing
  16. from modules import show_updates
  17. from colors.materia_manjaro import colors
  18. # from colors.darcula import colors
  19. # from colors.palenight import colors
  20. # from colors.gruvbox_material import colors
  21. def get_all_netifaces(path_to_state="/sys/class/net/"):
  22. """
  23. Get all netifaces in the /sys/class/net/ and
  24. add all to the list except 'lo'.
  25. """
  26. netifaces_list = []
  27. for dir in os.listdir(path_to_state):
  28. if os.path.isdir(f"{path_to_state}{dir}"):
  29. if dir != "lo":
  30. netifaces_list.append(dir)
  31. return netifaces_list
  32. def get_upped_netiface(netifaces=[]):
  33. """
  34. Check which interface is upped for widget.Net.
  35. Returns the first upped netiface.
  36. """
  37. if netifaces:
  38. for netiface in netifaces:
  39. state = subprocess.check_output(["cat", f"{path_to_state}{netiface}/operstate"]).decode("utf-8").rstrip()
  40. if state == "up":
  41. return netiface
  42. return None
  43. def parse_windowname(text):
  44. """Return parsed window name for WindowName widget."""
  45. text_lst = text.split()
  46. if len(text_lst) > 2:
  47. # text = text_lst[-1] + " : " + " ".join(text_lst[:-2])
  48. text = f"{text_lst[-1]} : {' '.join(text_lst[:-2])}"
  49. return text.replace("—", "-")
  50. ##### VARIABLES #####
  51. mod = "mod4"
  52. alt = "mod1"
  53. my_term = "alacritty"
  54. my_term_extra = "xfce4-terminal"
  55. # my_term_extra = "terminator"
  56. my_font = "Ubuntu"
  57. my_nerd_font = "Ubuntu Nerd Font"
  58. my_nerd_font_extra = "Sarasa Mono SC Nerd"
  59. my_mono_font = "Ubuntu Mono"
  60. my_mono_bold_font = "Ubuntu Mono Bold"
  61. SHELL = os.getenv("SHELL")
  62. HOME = os.path.expanduser("~")
  63. my_config = f"{HOME}/.config/qtile/config.py"
  64. # Check which network iface is upped.
  65. path_to_state = "/sys/class/net/" # enp2s0/operstate"
  66. # default_upped_netiface = "wlo1"
  67. netifaces = get_all_netifaces(path_to_state)
  68. upped_netiface = get_upped_netiface(netifaces)
  69. ##### COLORS #####
  70. # All color schemes are in dir colors. This theme is for example.
  71. # # Materia Manjaro
  72. # colors = {
  73. # "bg_panel": "#263238", # background
  74. # "bg_current_screentab": "#585E72", # 00
  75. # "fg_group_names": "#dbdcd5", # 00 (08)
  76. # "bg_current_tab": "#009185", # 00 (foreground)
  77. # "bg_other_tabs_and_odd_widgets": "#6182b8", # 5
  78. # "bg_even_widgets": "#82aaff", # 13
  79. # "fg_windowname": "#24d2af", # 00 (06)
  80. # "fg_cpu": "#89ddff", # 15
  81. # "fg_memory": "#ffcb6b", # 12
  82. # "fg_netspeed": "#c3e88d", # 11
  83. # "fg_layout": "#eeffff", # foreground (08)
  84. # "fg_keyboard": "#39adb5", # 7
  85. # "fg_date": "#39adb5", # 7
  86. # "bg_systray": "#263238", # background
  87. # "fg_updates": "#e2e0a5", # 00
  88. # "fg_weather": "#eb7bef", # 00 (14)
  89. # "bg_chord_dmenu": "#ffcb6b", # 12
  90. # "fg_chord_dmenu": "#000000", # 1
  91. # "fg_syncthing_active": "#91b859", # 3
  92. # "fg_syncthing_inactive": "#ff5370", # 10
  93. # "fg_active_group": "#e4c962", # 00 (04)
  94. # "border_focus": "#2eb398", # 00 (foreground)
  95. # "border_normal": "#1d2330", # 00
  96. # "fg_textbox": "#89ddff" # 15
  97. # }
  98. ##### KEYBINDINGS #####
  99. keys = [
  100. # <SUPER> + FUNCTION KEYS
  101. # Key([mod], "Return", lazy.spawn(f"{HOME}/.myScripts/runAlacrittyDiscreteGr.sh"), desc="Launch terminal"),
  102. Key([mod], "Return", lazy.spawn(my_term), desc="Launch terminal"),
  103. Key([mod], "r", lazy.spawn("rofi run -show drun -show-icons"), desc="Run App Lancher"),
  104. Key([mod], "d", lazy.spawn(f"dmenu_run -i -l 10 -nb '#263238' -nf '#24d2af' -sb '#009185' -p 'Run: ' -fn 'Ubuntu-18:normal'"), desc="Run dmenu"), # Materia Manjaro
  105. # Key([mod], "d", lazy.spawn("dmenu_run -nb #282828 -nf #e3a84e -sb #665c54 -p 'Run: ' -fn 'Ubuntu-18:normal'"), desc="Run dmenu"), # Gruvbox
  106. Key([mod], "Print", lazy.spawn("flameshot gui"), desc="Launch flameshot (take screenshot)"),
  107. Key([mod], "w", lazy.spawn("/usr/bin/firefox"), desc="Launch Firefox"),
  108. Key([mod], "u", lazy.spawn("qutebrowser"), desc="Launch qutebrowser"),
  109. Key([mod], "e", lazy.spawn("dolphin"), desc="Launch File Manager"),
  110. Key([mod], "n", lazy.spawn("thunar"), desc="Launch File Manager"),
  111. Key([mod], "i", lazy.spawn("/usr/bin/octopi"), desc="Launch Octopi"),
  112. Key([mod], "a", lazy.spawn(f"{my_term} -e {SHELL} -c ranger"), desc="Launch ranger"),
  113. Key([mod], "t", lazy.spawn(f"{HOME}/Programs/Telegram/Telegram -workdir {HOME}/.local/share/TelegramDesktop/ -- %u"), desc="Launch Telegram"),
  114. Key([mod], "v", lazy.spawn(f"{my_term} -e {HOME}/.config/vifm/scripts/vifmrun"), desc="Launch vifm"),
  115. Key([mod], "p", lazy.spawn(f"{HOME}/Programs/PyCharm-Community/bin/pycharm.sh"), desc="Launch PyCharm"),
  116. Key([mod], "c", lazy.spawn("code"), desc="Launch VSCodium"),
  117. Key([mod], "g", lazy.spawn("goldendict"), desc="Launch GoldenDict"),
  118. Key([mod], "m", lazy.spawn("gvim"), desc="Launch GVim"),
  119. Key([mod], "s", lazy.spawn(f"{HOME}/Programs/SublimeText/sublime_text"), desc="Run Sublime Text"),
  120. Key([mod], "b", lazy.spawn("brave"), desc="Run Brave"),
  121. # Key([mod], "m", lazy.spawn("/usr/bin/emacsclient -c -a 'emacs'"), desc="Launch Emacsclient"),
  122. # Key([mod], "w", lazy.spawn(f"{HOME}/.myScripts/runFirefoxDiscreteGr.sh"), desc="Launch Firefox"),
  123. # Key([mod], "g", lazy.spawn(f"{HOME}/.myScripts/runGimpDiscreteGr.sh"), desc="Run GIMP DiscreteGraphics"),
  124. # Key([mod], "a", lazy.spawn(f"{my_term} -e {SHELL} -c {HOME}/.myScripts/runRangerDiscreteGr.sh"), desc="Run ranger DiscreteGraphics"),
  125. # Key([mod], "x", lazy.spawn("xterm"), desc="Run XTerm"),
  126. # TOGGLE FULLSCREEN
  127. Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"),
  128. # SWITCH BETWEEN GROUPS (DESKTOPS)
  129. Key([mod], "Right", lazy.screen.next_group(), desc="Switch to the right group"),
  130. Key([mod], "Left", lazy.screen.prev_group(), desc="Switch to the left group"),
  131. # SWITCH BETWEEN LAYOUTS
  132. Key([mod], "Tab", lazy.next_layout(), desc="Switch to the next layout"),
  133. Key([mod, "shift"], "Tab", lazy.prev_layout(), desc="Switch to the previous layout"),
  134. # CHANGE FOCUS
  135. Key([mod], "k", lazy.layout.up(), desc="Move focus up in stack pane"),
  136. Key([mod], "j", lazy.layout.down(), desc="Move focus down in stack pane"),
  137. Key([mod], "h", lazy.layout.left(), desc="Move focus left in stack pane"),
  138. Key([mod], "l", lazy.layout.right(), desc="Move focus right in stack pane"),
  139. # Key([mod], "Up", lazy.layout.up(), desc="Move focus up in stack pane"),
  140. # Key([mod], "Down", lazy.layout.down(), desc="Move focus down in stack pane"),
  141. # Key([mod], "Left", lazy.layout.left(), desc="Move focus left in stack pane"),
  142. # Key([mod], "Right", lazy.layout.right(), desc="Move focus right in stack pane"),
  143. Key([mod], "space", lazy.layout.next(), desc="Switch window focus to other pane(s) of stack"),
  144. # <SUPER> + <SHIFT> + KEYS
  145. Key([mod, "shift"], "Return", lazy.spawn(my_term_extra), desc="Launch extra terminal"),
  146. # Key([mod, "shift"], "a", lazy.spawn(f"{my_term} -e pkexec ranger"), desc="Launch ranger as root"),
  147. # Key([mod, "shift"], "a", lazy.spawn(f"{my_term} -e sudo ranger"), desc="Launch ranger as root"),
  148. Key([mod, "shift"], "v", lazy.spawn(f"{HOME}/.myScripts/runVifmAsRoot.sh"), desc="Launch Vifm as root"),
  149. Key([mod, "shift"], "a", lazy.spawn(f"{HOME}/.myScripts/runRangerAsRoot.sh"), desc="Launch ranger as root"),
  150. Key([mod, "shift"], "n", lazy.spawn(f"{HOME}/.myScripts/runThunarAsRoot.sh"), desc="Launch Thunar as root"),
  151. # Key([mod, "shift"], "p", lazy.spawn(f"{HOME}/.myScripts/runThunarAsRoot.sh"), desc="Launch Thunar as root"),
  152. Key([mod, "shift"], "w", lazy.spawn("google-chrome-stable"), desc="Launch Chrome"),
  153. # Key([mod, "shift"], "y", lazy.spawn(f"{HOME}/.config/qtile/scripts/start-stop_syncthing.sh"), desc="Start-Stop Syncthing (for Dropbox sync)"),
  154. # QTILE: reload_config, restart, quit WINDOW: kill, xkill
  155. Key([mod, "shift"], "c", lazy.window.kill(), desc="Kill focused window"),
  156. Key([mod, "shift"], "x", lazy.spawn("xkill"), desc="Kill not answered window"),
  157. Key([mod, "shift", "control"], "r", lazy.restart(), desc="Restart qtile"),
  158. Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload qtile config"),
  159. Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown qtile"),
  160. # TOGGLE FLOATING LAYOUT
  161. Key([mod, "shift"], "f", lazy.window.toggle_floating(), lazy.window.center(), desc="Toggle floating"),
  162. # MOVE WINDOWS UP OR DOWN IN CURRENT STACK
  163. Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up in current stack "),
  164. Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down in current stack "),
  165. # Key([mod, "shift"], "h", lazy.layout.swap_left(), desc="Move window left in current stack "),
  166. # Key([mod, "shift"], "l", lazy.layout.swap_right(), desc="Move window right in current stack "),
  167. Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window left in current stack "),
  168. Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window right in current stack "),
  169. # Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc="Move window up in current stack "),
  170. # Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="Move window down in current stack "),
  171. # Key([mod, "shift"], "Left", lazy.layout.shuffle_left(), desc="Move window left in current stack "),
  172. # Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc="Move window right in current stack "),
  173. # FLIP LAYOUT FOR MONADTALL/WIDE
  174. Key([mod, "shift"], "space", lazy.layout.flip(), desc="Flip main (left) panel with others"),
  175. # <SUPER> + <ALT> + KEYS
  176. Key([mod, alt], "space", lazy.spawn(f"{HOME}/.myScripts/touchpadONOFF.sh"), desc="Touchpad On/Off"),
  177. # FLIP LAYOUT FOR BSP LAYOUT
  178. Key([mod, alt], "k", lazy.layout.flip_up(), desc=""),
  179. Key([mod, alt], "j", lazy.layout.flip_down(), desc=""),
  180. Key([mod, alt], "h", lazy.layout.flip_left(), desc=""),
  181. Key([mod, alt], "l", lazy.layout.flip_right(), desc=""),
  182. # <SUPER> + <CTRL> + KEYS
  183. Key([mod, "control"], "Return", lazy.spawn("terminator"), desc="Launch terminator terminal"),
  184. # RESIZE UP, DOWN, LEFT, RIGHT
  185. Key([mod, "control"], "i",
  186. lazy.layout.shrink_main(),
  187. ),
  188. Key([mod, "control"], "u",
  189. lazy.layout.grow_main(),
  190. ),
  191. Key([mod, "control"], "l",
  192. lazy.layout.grow_right(),
  193. lazy.layout.grow(),
  194. lazy.layout.increase_ratio(),
  195. lazy.layout.delete()
  196. ),
  197. # Key([mod, "control"], "Right",
  198. # lazy.layout.grow_right(),
  199. # lazy.layout.grow(),
  200. # lazy.layout.increase_ratio(),
  201. # lazy.layout.delete()
  202. # ),
  203. Key([mod, "control"], "h",
  204. lazy.layout.grow_left(),
  205. lazy.layout.shrink(),
  206. lazy.layout.decrease_ratio(),
  207. lazy.layout.add()
  208. ),
  209. # Key([mod, "control"], "Left",
  210. # lazy.layout.grow_left(),
  211. # lazy.layout.shrink(),
  212. # lazy.layout.decrease_ratio(),
  213. # lazy.layout.add()
  214. # ),
  215. Key([mod, "control"], "k",
  216. lazy.layout.grow_up(),
  217. lazy.layout.grow(),
  218. lazy.layout.decrease_nmaster()
  219. ),
  220. # Key([mod, "control"], "Up",
  221. # lazy.layout.grow_up(),
  222. # lazy.layout.grow(),
  223. # lazy.layout.decrease_nmaster()
  224. # ),
  225. Key([mod, "control"], "j",
  226. lazy.layout.grow_down(),
  227. lazy.layout.shrink(),
  228. lazy.layout.increase_nmaster()
  229. ),
  230. # Key([mod, "control"], "Down",
  231. # lazy.layout.grow_down(),
  232. # lazy.layout.shrink(),
  233. # lazy.layout.increase_nmaster()
  234. # ),
  235. # NORMALIZE, MINIMIZE, MAXIMIZE
  236. Key([mod, "control"], "n", lazy.layout.normalize(), desc="Normalize window size ratios"),
  237. Key([mod, "control"], "d", lazy.window.toggle_minimize(), desc="Toggle window between minimumize and normal sizes"),
  238. Key([mod, "control"], "m", lazy.layout.maximize(), desc="Toggle window between minimum and maximum sizes (for MonadTall/MonadWide)"),
  239. Key([mod, "control"], "r", lazy.layout.reset()),
  240. Key([mod, "control"], "w", lazy.spawn(f"{HOME}/Programs/Tor/Browser/start-tor-browser --detach"), desc="Launch Tor"),
  241. # <SUPER> + <SHIFT> + <CTRL> + KEYS
  242. # <ALT> + KEYS
  243. # KeyChords
  244. # Dmenu
  245. KeyChord([alt], "m", [
  246. # Key([], "c", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-edit-configs.sh"), desc="Run dmenu script for editing config files"),
  247. # Key([], "e", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-unicode.sh"), desc="Choose an emoji"),
  248. # Key([], "g", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-GoogleDrive.sh"), desc="Mount-Unmount GoogleDrive"),
  249. # Key([], "k", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-kill.sh"), desc="Kill chosen process"),
  250. # Key([], "l", lazy.spawn(f"{HOME}/.myScripts/system_exit/lock.sh"), desc="Lock screen"),
  251. # Key([], "m", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-change-alacritty-colors.sh"), desc="Run dmenu script for changing colors for Alacritty"),
  252. # Key([], "n", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-passmenu-name.sh"), desc="Run dmenu script for getting username"),
  253. # Key([], "p", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-passmenu.sh"), desc="Run dmenu script for getting password"),
  254. # Key([], "u", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-passmenu-url.sh"), desc="Run dmenu script for getting url"),
  255. # Key([], "r", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-run-programs.sh"), desc="Run choice of most used utils"),
  256. # Key([], "p", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-run-programs.sh"), desc="Run choice of most used utils"),
  257. # Key([], "s", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-search.sh"), desc="Run chosen search engine"),
  258. # Key([], "t", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-transcription.sh"), desc="Choose a transcription's symbol"),
  259. # Key([], "x", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-system-exit.sh"), desc="System exit menu"),
  260. # Key([], "w", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-mountUnmountWinDisks.sh"), desc="Mount/Unmount Windows disks")],
  261. Key([], "c", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-edit-configs.sh"), desc="Run dmenu script for editing config files"),
  262. Key([], "l", lazy.spawn(f"{HOME}/.myScripts/system_exit/lock.sh"), desc="Lock screen"),
  263. Key([], "p", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-run-programs.sh"), desc="Run choice of most used utils"),
  264. Key([], "s", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-run-scripts.sh"), desc="Run chosen search engine"),
  265. Key([], "x", lazy.spawn(f"{HOME}/.myScripts/dmscripts/dm-system-exit.sh"), desc="System exit menu")],
  266. mode=False,
  267. name="Dmenu"
  268. ),
  269. Key([alt], "w", lazy.spawn("rofi run -show window -show-icons"), desc="Switch between opened windows"),
  270. Key([alt], "F4", lazy.spawn("ByeBye"), desc="Launch logout app 'ByeBye'"),
  271. Key([alt], "Tab", lazy.group.next_window(), desc="Switch to the next window"),
  272. # <ALT> + <SHIFT> + KEYS
  273. Key([alt, "shift"], "Tab", lazy.group.prev_window(), desc="Switch to the previous window"),
  274. # <CONTROL> + <ALT> + KEYS
  275. # TREETAB CONTROLS
  276. Key(["control", alt], "j", lazy.layout.section_down(), desc="Move up a section in TreeTab"),
  277. Key(["control", alt], "k", lazy.layout.section_up(), desc="Move down a section in TreeTab"),
  278. # <CONTROL> + <SHIFT> + KEYS
  279. Key(["control", "shift"], "Escape", lazy.spawn(f"{my_term} -e htop"), desc="Run htop"),
  280. # MULTIMEDIA KEYS
  281. # <Fn> + <F1-F12>
  282. Key([], "XF86Display", lazy.spawn("lxrandr"), desc="Run lxrandr (choose monitor)"),
  283. Key([], "XF86ScreenSaver", lazy.spawn(f"{HOME}/.myScripts/system_exit/lock.sh"), desc="Lock screen"),
  284. Key([], "XF86Battery", lazy.spawn("xfce4-power-manager-settings"), desc="Power manager settings"),
  285. Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle"), desc="Toggle audio mute"),
  286. Key([mod], "F7", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle"), desc="Toggle audio mute"),
  287. # <SUPER> + <F1-F12>
  288. # Brightness & Volume (extra step 5)
  289. Key([mod], "F2", lazy.spawn(f"{HOME}/.myScripts/brightness_down.sh"), desc="Brightness Down (5-)"),
  290. # lazy.spawn("brightnessctl set 5-"),
  291. Key([mod], "F3", lazy.spawn(f"{HOME}/.myScripts/brightness_up.sh"), desc="Brightness Up (+5)"),
  292. # lazy.spawn("brightnessctl set +5"),
  293. Key([mod], "F8", lazy.spawn(f"{HOME}/.myScripts/volume_down.sh"), desc="Volume Down"),
  294. Key([mod], "F9", lazy.spawn(f"{HOME}/.myScripts/volume_up.sh"), desc="Volume Up more than 100%"),
  295. ]
  296. # MOVE/RESIZE FLOATING WINDOW
  297. for key, x, y in [
  298. ("Left", -10, 0),
  299. ("Right", 10, 0),
  300. ("Up", 0, -10),
  301. ("Down", 0, 10)]:
  302. keys.append(Key([mod, "shift"], key, lazy.window.move_floating(x, y)))
  303. keys.append(Key([mod, "control"], key, lazy.window.resize_floating(x, y)))
  304. ##### GROUPS #####
  305. #       v                
  306. #     🌐♬ 🌡 🖬  ⟳ ₿  ⮋⮉🡇 🡅 ⇓⇑      
  307. group_names = [
  308. (" ", {"layout": "columns"}), # WWW
  309. (" ", {"layout": "columns"}), # DEV
  310. # (" ", {"layout": "monadtall"}), # DEV
  311. (" ", {"layout": "max"}), # FM
  312. (" ", {"layout": "columns"}), # SYS
  313. (" ", {"layout": "columns"}), # VIRT
  314. (" ", {"layout": "max"}), # CHAT
  315. (" ", {"layout": "columns"}), # GFX
  316. (" ", {"layout": "max"}), # VID
  317. (" ", {"layout": "columns"}) # MULT
  318. ]
  319. # groups = [Group(name, **kwargs, label="{}{}".format(name, i)) for i, (name, kwargs) in enumerate(group_names, 1)]
  320. groups = [Group(name, **kwargs, label=f"{name}{i}") for i, (name, kwargs) in enumerate(group_names, 1)]
  321. for i, group_name in enumerate(group_names, 1):
  322. keys.extend([
  323. Key([mod], str(i),
  324. lazy.group[group_name[0]].toscreen(toggle=True),
  325. desc="Switch to another group"), # (toggle=True) to toggle groups since Qtile 0.19.0
  326. Key([mod, "shift"], str(i),
  327. lazy.window.togroup(group_name[0], switch_group=True),
  328. # lazy.group[group_name[0]].toscreen(toggle=True), # follow the
  329. # window when it moves to another group DOESN'T NEED ANY MORE
  330. # BECAUSE OF switch_group=True
  331. desc="Send current window to another group")
  332. ])
  333. ##### LAYOUTS #####
  334. layout_theme = {
  335. "border_width": 3,
  336. "margin": 4,
  337. "border_focus": colors["border_focus"],
  338. "border_normal": colors["border_normal"]
  339. }
  340. layouts = [
  341. # layout.Columns(**layout_theme, border_on_single=False, margin_on_single=False),
  342. layout.Columns(**layout_theme, border_on_single=True),
  343. layout.TreeTab(
  344. font=my_font,
  345. fontsize=14,
  346. bg_color=colors["bg_panel"],
  347. active_bg=colors["bg_current_tab"],
  348. active_fg=colors["fg_active_group"],
  349. inactive_bg=colors["bg_systray"],
  350. inactive_fg=colors["fg_group_names"],
  351. border_width=2,
  352. padding_y=5,
  353. sections=["FIRST", "SECOND"],
  354. section_fontsize=12,
  355. section_fg=colors["fg_group_names"],
  356. section_top=10,
  357. panel_width=320
  358. ),
  359. # layout.Max(**layout_theme),
  360. layout.Max(
  361. margin=0,
  362. border_width=0,
  363. border_focus=colors["border_focus"],
  364. border_normal=colors["border_normal"]
  365. ),
  366. # layout.MonadTall(**layout_theme, single_border_width=False, single_margin=False),
  367. # layout.MonadWide(**layout_theme, single_border_width=False, single_margin=False),
  368. layout.MonadTall(**layout_theme),
  369. layout.MonadWide(**layout_theme),
  370. # layout.Bsp(**layout_theme),
  371. # layout.Tile(shift_windows=True, **layout_theme),
  372. # layout.Stack(stacks=2, **layout_theme),
  373. # layout.Stack(num_stacks=2),
  374. # layout.RatioTile(**layout_theme),
  375. # layout.VerticalTile(**layout_theme),
  376. # layout.Matrix(**layout_theme),
  377. # layout.Zoomy(**layout_theme),
  378. # layout.Floating(**layout_theme)
  379. ]
  380. ##### DEFAULT WIDGET SETTINGS #####
  381. widget_defaults = {
  382. "font": my_font,
  383. "fontsize": 12,
  384. "padding": 2,
  385. "background": colors["bg_panel"],
  386. "foreground": colors["fg_group_names"]
  387. }
  388. def init_widgets_list():
  389. prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
  390. widgets_list = [
  391. widget.GroupBox(
  392. font=my_nerd_font,
  393. fontsize=14,
  394. margin_y=3,
  395. margin_x=0,
  396. padding_y=7,
  397. padding_x=3,
  398. borderwidth=3,
  399. active=colors["fg_active_group"],
  400. inactive=colors["fg_group_names"],
  401. rounded=False,
  402. highlight_color=colors["bg_panel"],
  403. highlight_method="block",
  404. urgent_alert_method="block",
  405. this_current_screen_border=colors["bg_current_tab"],
  406. this_screen_border=colors["bg_other_tabs_and_odd_widgets"],
  407. other_current_screen_border=colors["bg_panel"],
  408. other_screen_border=colors["bg_panel"]
  409. ),
  410. widget.Chord(
  411. fontsize=14,
  412. padding = 10,
  413. background=colors["bg_chord_dmenu"],
  414. foreground=colors["fg_chord_dmenu"]
  415. ),
  416. widget.WindowName(
  417. # # font=my_mono_bold_font,
  418. fontsize=14,
  419. foreground=colors["fg_windowname"],
  420. padding=0,
  421. # parse_text=parse_windowname
  422. ),
  423. widget.CheckUpdates(
  424. foreground=colors["fg_updates"],
  425. colour_have_updates=colors["fg_updates"],
  426. # no_update_string="No updates",
  427. font=my_nerd_font,
  428. fontsize=14,
  429. # distro="Arch_checkupdates",
  430. custom_command="checkupdates+aur",
  431. # distro="Arch_yay",
  432. # custom_command="yay -Qu",
  433. display_format=" {updates}", # ⟳ 
  434. mouse_callbacks={
  435. "Button1": lambda: qtile.cmd_spawn(f"{HOME}/.config/qtile/scripts/show_updates.sh"),
  436. "Button2": lambda: qtile.cmd_spawn(f"{my_term_extra} -e 'yay -Syu && $SHELL'"),
  437. "Button3": lambda: show_updates.show_updates_arch()
  438. },
  439. update_interval=10800 # 3 hours (60*60*3)
  440. ),
  441. widget.Sep(
  442. linewidth=1,
  443. padding=10
  444. ),
  445. widget.TextBox(
  446. # text="⇆ ",
  447. text="🗘",
  448. font=my_nerd_font,
  449. fontsize=16,
  450. foreground=colors["fg_textbox"],
  451. padding=0
  452. ),
  453. syncthing.Syncthing(
  454. path_to_script=f"{HOME}/.config/qtile/scripts/get_syncthing_status.sh",
  455. font=my_nerd_font,
  456. label="Syncthing\n ",
  457. update_interval=60,
  458. active_color=colors["fg_syncthing_active"],
  459. inactive_color=colors["fg_syncthing_inactive"],
  460. padding=0
  461. ),
  462. widget.Sep(
  463. linewidth=1,
  464. padding=10
  465. ),
  466. widget.TextBox(
  467. # text="⛅",
  468. text="🌡",
  469. fontsize=16,
  470. foreground=colors["fg_weather"],
  471. padding=0
  472. ),
  473. widget.OpenWeather(
  474. foreground=colors["fg_weather"],
  475. coordinates={"longitude": "30.9754", "latitude": "52.4345"},
  476. # format="{location_city}: {temp}°{units_temperature}\n{weather_0_icon} {weather_details}",
  477. format="{location_city}: {temp}°{units_temperature}\n{weather_details}",
  478. update_interval=1800,
  479. mouse_callbacks={
  480. "Button3": lambda: qtile.cmd_spawn("xdg-open https://openweathermap.org/city/627907"),
  481. }
  482. ),
  483. widget.Sep(
  484. linewidth=1,
  485. padding=10
  486. ),
  487. widget.TextBox(
  488. text="",
  489. # text=" ",
  490. font=my_nerd_font,
  491. fontsize=16,
  492. foreground=colors["fg_cpu"],
  493. padding=0,
  494. mouse_callbacks={
  495. "Button1": lambda: qtile.cmd_spawn(f"{HOME}/.config/qtile/scripts/top5_cpu_usage.sh"),
  496. # "Button3": lambda: qtile.cmd_spawn(f"{my_term} -e htop")
  497. "Button3": lambda: qtile.cmd_spawn(f"{my_term} -e {SHELL} -c htop")
  498. }
  499. ),
  500. widget.CPU(
  501. foreground=colors["fg_cpu"],
  502. padding=0,
  503. format="{freq_current}GHz\n{load_percent: .0f}%",
  504. mouse_callbacks={
  505. "Button1": lambda: qtile.cmd_spawn(f"{HOME}/.config/qtile/scripts/top5_cpu_usage.sh"),
  506. "Button3": lambda: qtile.cmd_spawn(f"{my_term} -e {SHELL} -c htop")
  507. }
  508. ),
  509. widget.Sep(
  510. linewidth=1,
  511. padding=10
  512. ),
  513. widget.TextBox(
  514. text="",
  515. font=my_nerd_font,
  516. fontsize=16,
  517. foreground=colors["fg_memory"],
  518. padding=0,
  519. mouse_callbacks={
  520. "Button1": lambda: qtile.cmd_spawn(f"{HOME}/.config/qtile/scripts/top5_mem_usage.sh"),
  521. "Button3": lambda: qtile.cmd_spawn(f"{my_term} -e {SHELL} -c htop")
  522. }
  523. ),
  524. memory.Memory(
  525. foreground=colors["fg_memory"],
  526. padding=0,
  527. format="{MemUsed: .2f}{mm}\n{MemPercent: .0f}%",
  528. measure_mem="G",
  529. mouse_callbacks={
  530. "Button1": lambda: qtile.cmd_spawn(f"{HOME}/.config/qtile/scripts/top5_mem_usage.sh"),
  531. "Button3": lambda: qtile.cmd_spawn(f"{my_term} -e {SHELL} -c htop")
  532. }
  533. ),
  534. widget.Sep(
  535. linewidth=1,
  536. padding=10
  537. ),
  538. # widget.Net(
  539. # interface=upped_netiface,
  540. # # format=upped_netiface + ":{down} ↓↑{up}",
  541. # # format="{down} ⇓⇑{up}",
  542. # # format="{down} ⤋⤊{up}",
  543. # # format="{down} ⬇⬆{up}",
  544. # # format="{down} 🡇🡅{up}",
  545. # # format="{down}  {up}",
  546. # font=my_nerd_font,
  547. # format="{up} \n{down} ",
  548. # foreground=colors["fg_netspeed"],
  549. # padding=0
  550. # ),
  551. # widget.Sep(
  552. # linewidth=1,
  553. # padding=10
  554. # ),
  555. widget.KeyboardKbdd(
  556. configured_keyboards=["🇺🇸", "🇷🇺"],
  557. # configured_keyboards=["US", "RU"],
  558. # display_map={"us": "🇺🇸", "ru": "🇷🇺"},
  559. # option="grp:alt_shift_toggle",
  560. # option="grp:caps_toggle",
  561. foreground=colors["fg_keyboard"],
  562. fontsize=16,
  563. padding=1
  564. ),
  565. widget.Systray(
  566. padding=5
  567. ),
  568. widget.CurrentLayoutIcon(
  569. # custom_icon_paths=[f"{HOME}/.config/qtile/icons/layouts"],
  570. foreground=colors["fg_layout"],
  571. padding=0,
  572. scale=0.6,
  573. mouse_callbacks={
  574. "Button1": qtile.cmd_next_layout,
  575. "Button3": qtile.cmd_prev_layout,
  576. }
  577. ),
  578. widget.WindowCount(
  579. text_format="{num}/",
  580. fontsize=14,
  581. padding=0,
  582. foreground=colors["fg_layout"],
  583. ),
  584. all_windows_count.WindowCount(
  585. text_format="{num}",
  586. fontsize=14,
  587. padding=0,
  588. foreground=colors["fg_layout"],
  589. ),
  590. widget.Sep(
  591. linewidth=1,
  592. padding=10
  593. ),
  594. widget.TextBox(
  595. text="",
  596. font=my_nerd_font,
  597. fontsize=16,
  598. foreground=colors["fg_date"],
  599. padding=0,
  600. mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("gsimplecal")}
  601. ),
  602. widget.Clock(
  603. foreground=colors["fg_date"],
  604. padding=3,
  605. # mouse_callbacks={"Button1": lambda qtile: qtile.cmd_spawn("gsimplecal")},
  606. mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("gsimplecal")},
  607. format="%a, %d %b\n%H:%M:%S"
  608. )
  609. ]
  610. return widgets_list
  611. def init_widgets_screen1():
  612. """Returns widgets_list for Monitor 1."""
  613. widgets_screen1 = init_widgets_list()
  614. return widgets_screen1 # Slicing removes unwanted widgets on Monitors 1,3
  615. def init_widgets_screen2():
  616. """Returns widgets_list for Monitor 2."""
  617. widgets_screen2 = init_widgets_list()
  618. return widgets_screen2 # Monitor 2 will display all widgets in widgets_list
  619. def init_screens():
  620. return [
  621. Screen(
  622. # wallpaper=f"{HOME}/Picturies/Wallpapers/NewWallpapers/0314_1280x1024.jpg",
  623. # wallpaper_mode="fill",
  624. top=bar.Bar(
  625. widgets=init_widgets_screen1(),
  626. opacity=1.0,
  627. size=32)),
  628. # Screen(
  629. # top=bar.Bar(
  630. # widgets=init_widgets_screen2(),
  631. # opacity=1.0,
  632. # size=32)),
  633. # Screen(
  634. # top=bar.Bar(
  635. # widgets=init_widgets_screen1(),
  636. # opacity=1.0,
  637. # size=32))
  638. ]
  639. # return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=1.0, size=32))]
  640. # For several Monitors.
  641. # return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=1.0, size=30)),
  642. # Screen(top=bar.Bar(widgets=init_widgets_screen2(), opacity=1.0, size=30)),
  643. # Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=1.0, size=30))]
  644. # lazy functions can be bound to keybindings.
  645. @lazy.function
  646. def window_to_prev_group(qtile):
  647. if qtile.currentWindow is not None:
  648. i = qtile.groups.index(qtile.currentGroup)
  649. qtile.currentWindow.togroup(qtile.groups[i - 1].name)
  650. @lazy.function
  651. def window_to_next_group(qtile):
  652. if qtile.currentWindow is not None:
  653. i = qtile.groups.index(qtile.currentGroup)
  654. qtile.currentWindow.togroup(qtile.groups[i + 1].name)
  655. @lazy.function
  656. def window_to_previous_screen(qtile):
  657. i = qtile.screens.index(qtile.current_screen)
  658. if i != 0:
  659. group = qtile.screens[i - 1].group.name
  660. qtile.current_window.togroup(group)
  661. @lazy.function
  662. def window_to_next_screen(qtile):
  663. i = qtile.screens.index(qtile.current_screen)
  664. if i + 1 != len(qtile.screens):
  665. group = qtile.screens[i + 1].group.name
  666. qtile.current_window.togroup(group)
  667. @lazy.function
  668. def switch_screens(qtile):
  669. i = qtile.screens.index(qtile.current_screen)
  670. group = qtile.screens[i - 1].group
  671. qtile.current_screen.set_group(group)
  672. ##### DRAG AND RESIZE FLOATING LAYOUTS BY MOUSE #####
  673. mouse = [
  674. Drag([mod], "Button1", lazy.window.set_position_floating(),
  675. start=lazy.window.get_position()),
  676. Drag([mod], "Button3", lazy.window.set_size_floating(),
  677. start=lazy.window.get_size()),
  678. # Click([mod], "Button2", lazy.window.bring_to_front())
  679. ]
  680. ##### MY FLOATING APPS #####
  681. floating_layout = layout.Floating(float_rules=[
  682. # Run the utility of `xprop` to see the wm class and name of an X client.
  683. # from libqtile.layout.floating class Floating
  684. # add (unpack *) default_float_rules
  685. *layout.Floating.default_float_rules,
  686. Match(wm_class="BreakTimer"),
  687. Match(title="Tor Browser", wm_class="Tor Browser"),
  688. Match(title="О Tor Browser", wm_class="Tor Browser"),
  689. Match(title="About Mozilla Firefox", wm_class="Browser"),
  690. Match(title="Execute File", wm_class="pcmanfm"),
  691. Match(title="Close Button Action", wm_class="tixati"), # Tixati
  692. Match(title="Confirm File Replacing", wm_class="pcmanfm"),
  693. Match(title="Terminator Preferences", wm_class="terminator"),
  694. Match(title="Терминатор Параметры", wm_class="terminator"),
  695. Match(title="File Operation Progress", wm_class="Thunar"),
  696. Match(title="Действия над файлами", wm_class="Thunar"),
  697. # Match(title="win0", wm_class="jetbrains-webstorm"), # WebStorm
  698. # Match(title="Import WebStorm Settings", wm_class="jetbrains-webstorm"),
  699. Match(title="splash"), # PyCharm
  700. Match(title="Update"), # PyCharm
  701. # Match(title="win0", wm_class="jetbrains-pycharm-ce"), # PyCharm
  702. # Match(title="Welcome to PyCharm", wm_class="jetbrains-pycharm-ce"),
  703. # Match(title="License Activation", wm_class="jetbrains-pycharm-ce"), # PyCharm
  704. # Match(title="Settings", wm_class="jetbrains-pycharm-ce"), # PyCharm
  705. # Match(title="Python Interpreters", wm_class="jetbrains-pycharm-ce"), # PyCharm
  706. # Match(title="Open Project", wm_class="jetbrains-pycharm-ce"), # PyCharm
  707. # Match(title="Update", wm_class="com-intellij-updater-Runner"), # PyCharm's updates
  708. Match(wm_class="nm-connection-editor"),
  709. Match(wm_class="megasync"),
  710. Match(wm_class="minitube"),
  711. Match(wm_class="CheckEmail"),
  712. # Match(wm_class="GParted"),
  713. # Match(wm_class="keepass2"),
  714. Match(wm_class="pinentry-gtk-2"),
  715. # Match(wm_class="vlc"),
  716. # Match(wm_class="smplayer"),
  717. Match(wm_class="deadbeef"),
  718. Match(wm_class="galculator"),
  719. # {"wmclass": "VirtualBox Manager"},
  720. Match(title="branchdialog"), # gitk
  721. Match(title="Open File"),
  722. Match(title="pinentry"), # GPG key password entry
  723. Match(wm_class="gnome-font-viewer"),
  724. Match(wm_class="fluxgui"),
  725. Match(wm_class="xfce4-power-manager-settings"),
  726. Match(wm_class="pavucontrol"),
  727. Match(wm_class="gdebi-gtk"),
  728. Match(wm_class="volumeicon"),
  729. Match(wm_class="gcolor3"),
  730. # Match(wm_class="gvim"),
  731. Match(wm_class="qt5ct"),
  732. Match(wm_class="lxappearance"),
  733. Match(wm_class="confirmreset"), # gitk
  734. Match(wm_class="makebranch"), # gitk
  735. Match(wm_class="maketag"), # gitk
  736. Match(wm_class="ssh-askpass") # ssh-askpass
  737. ], border_focus=colors["bg_current_tab"])
  738. dgroups_key_binder = None
  739. dgroups_app_rules = [] # type: List
  740. main = None # WARNING: this is deprecated and will be removed soon
  741. follow_mouse_focus = True
  742. cursor_warp = False
  743. bring_front_click = False
  744. # bring_front_click = "floating_only"
  745. auto_fullscreen = True
  746. focus_on_window_activation = "focus"
  747. # focus_on_window_activation = "urgent"
  748. # focus_on_window_activation = "smart"
  749. # focus_on_window_activation = "never"
  750. @hook.subscribe.client_new
  751. def move_new_window_to_certain_group(c):
  752. if c.name == "Mozilla Thunderbird":
  753. c.togroup(" ")
  754. ##### AUTOSTART #####
  755. @hook.subscribe.startup_once
  756. def start_once():
  757. subprocess.call([f"{HOME}/.config/qtile/scripts/autostart.sh"])
  758. # XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
  759. # string besides java UI toolkits; you can see several discussions on the
  760. # mailing lists, GitHub issues, and other WM documentation that suggest setting
  761. # this string if your java app doesn't work correctly. We may as well just lie
  762. # and say that we're a working one by default.
  763. #
  764. # We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
  765. # java that happens to be on java's whitelist.
  766. wmname = "LG3D"
  767. if __name__ in ["config", "__main__"]:
  768. screens = init_screens()
  769. widgets_list = init_widgets_list()
  770. # widgets_screen1 = init_widgets_screen1()
  771. # widgets_screen2 = init_widgets_screen2()
  772. ##### SOME WHAT I DID BEFORE BUT DON'T NEED ANY MORE. BUT SAVED FOR SOME REASONS #####
  773. # # @hook.subscribe.float_change
  774. # # @hook.subscribe.client_new
  775. # @hook.subscribe.client_focus
  776. # def set_hint(window):
  777. # window.window.set_property("IS_FLOATING", str(window.floating), type="STRING", format=8)
  778. # # subprocess.check_output(["notify-send", "-i", "dialog-information", "{} {}".format(window.name, window.floating)])
  779. # # window.window.set_property("IS_FLOATING", int(window.floating))
  780. # # # Does what I wanted perfectly!!!
  781. # # # @hook.subscribe.client_mouse_enter
  782. # @hook.subscribe.client_focus
  783. # @hook.subscribe.client_new
  784. # def focus_new_floating_window(window):
  785. # """ Bring a new floating window to the front. """
  786. # # subprocess.check_output(["notify-send", "-i", "dialog-information", "{}".format(window.name)])
  787. # if window.floating:
  788. # window.cmd_bring_to_front()
  789. # TODO: show amount of opened windows (DONE!!!)
  790. # @hook.subscribe.client_new
  791. # def increase_opened_windows_counter(window):
  792. # """ Increase counter of opened windows. """
  793. # global opened_windows_counter
  794. # opened_windows_counter += 1
  795. # subprocess.check_output(["notify-send", "-i", "dialog-information", "{}\nOpened windows: {}".format(window.name, opened_windows_counter)])
  796. #
  797. #
  798. # @hook.subscribe.client_killed
  799. # def decrease_opened_windows_counter(window):
  800. # """ Decrease counter of opened windows. """
  801. # global opened_windows_counter
  802. # opened_windows_counter -= 1
  803. # subprocess.check_output(["notify-send", "-i", "dialog-information", "{}\nOpened windows: {}".format(window.name, opened_windows_counter)])
  804. # TODO: delete later if these below two functions don't need any more!!!
  805. # @lazy.function
  806. # def float_to_front(qtile):
  807. # """
  808. # Bring all floating windows of the group to front
  809. # """
  810. # global floating_windows
  811. # floating_windows = []
  812. # for window in qtile.currentGroup.windows:
  813. # if window.floating:
  814. # window.cmd_bring_to_front()
  815. # floating_windows.append(window)
  816. # floating_windows[-1].cmd_focus()
  817. # @hook.subscribe.client_new
  818. # def floating_dialogs(window):
  819. # dialog = window.window.get_wm_type() == "dialog"
  820. # transient = window.window.get_wm_transient_for()
  821. # if dialog or transient:
  822. # window.floating = True
  823. ###############################################################################
  824. # New EXAMPLE from qtile 0.17.0 for float_rules[]!!!
  825. #
  826. # rules specified in `layout.Floating`'s `float_rules` are now evaluated with
  827. # AND-semantics instead of OR-semantics, i.e. if you specify 2 different
  828. # property rules, both have to match
  829. #
  830. # from libqtile.config import Match
  831. # Match(title=WM_NAME, wm_class=WM_CLASS, role=WM_WINDOW_ROLE)
  832. #
  833. #
  834. # Match(wm_type="utility"),
  835. # Match(wm_type="notification"),
  836. # Match(wm_type="toolbar"),
  837. # Match(wm_type="splash"),
  838. # Match(wm_type="dialog"),
  839. # Match(wm_class="file_progress"),
  840. # Match(wm_class="confirm"),
  841. # Match(wm_class="dialog"),
  842. # Match(wm_class="download"),
  843. # Match(wm_class="error"),
  844. # Match(wm_class="notification"),
  845. # Match(wm_class="splash"),
  846. # Match(wm_class="toolbar"),
  847. # Match(func=lambda c: c.has_fixed_size()),
  848. ###############################################################################
  849. # float_rules for qtile version < 0.17.0
  850. # floating_layout = layout.Floating(float_rules=[
  851. # # Run the utility of `xprop` to see the wm class and name of an X client.
  852. # {"wname": "synaptic"}, # Synaptic (Preinstall dialog)
  853. # {"wname": "Summary"}, # Synaptic (Summary dialog)
  854. # {"wmclass": "Polkit-gnome-authentication-agent-1"}, # Polkit-gnome-authentication-agent-1
  855. # {"wname": "Properties for *"}, # Dolphin (properties dialog)
  856. # {"wname": "Delete Permanently"}, # Dolphin (delete dialog)
  857. # {"wname": "Preference"}, # Haroopad (md editor)
  858. # {"wname": "Terminator Preferences"},
  859. # {"wname": "Close Button Action"}, # Tixati
  860. # {"wmclass": "com-intellij-updater-Runner"},
  861. # {"wmclass": "minitube"},
  862. # {"wmclass": "CheckEmail"},
  863. # {"wmclass": "GParted"},
  864. # {"wmclass": "keepass2"},
  865. # {"wmclass": "vlc"},
  866. # {"wmclass": "smplayer"},
  867. # {"wmclass": "deadbeef"},
  868. # {"wmclass": "galculator"},
  869. # # {"wmclass": "VirtualBox Manager"},
  870. # {"wname": "win0"}, # PyCharm
  871. # {"wmclass": "gnome-font-viewer"},
  872. # {"wmclass": "fluxgui"},
  873. # {"wmclass": "xfce4-power-manager-settings"},
  874. # {"wmclass": "pavucontrol"},
  875. # {"wmclass": "gdebi-gtk"},
  876. # {"wmclass": "volumeicon"},
  877. # {"wmclass": "gcolor3"},
  878. # {"wmclass": "gvim"},
  879. # {"wmclass": "qt5ct"},
  880. # {"wmclass": "lxappearance"},
  881. # {"wmclass": "confirm"},
  882. # {"wmclass": "dialog"},
  883. # {"wmclass": "download"},
  884. # {"wmclass": "error"},
  885. # {"wmclass": "file_progress"},
  886. # {"wmclass": "notification"},
  887. # {"wmclass": "splash"},
  888. # {"wmclass": "toolbar"},
  889. # {"wmclass": "confirmreset"}, # gitk
  890. # {"wmclass": "makebranch"}, # gitk
  891. # {"wmclass": "maketag"}, # gitk
  892. # {"wname": "branchdialog"}, # gitk
  893. # {'wname': 'Open File'},
  894. # {"wname": "pinentry"}, # GPG key password entry
  895. # {"wmclass": "ssh-askpass"}, # ssh-askpass
  896. # ])