webbb82

Untitled

Apr 8th, 2023
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.06 KB | None | 0 0
  1. import os
  2. import re
  3. import socket
  4. import subprocess, qtile_mutable_scratch
  5. from typing import List # noqa: F401
  6. from libqtile import layout, bar, widget, hook, qtile
  7. from libqtile.config import Click, Drag, Group, Key, Match, Screen, Rule, DropDown, ScratchPad,KeyChord, EzKey
  8. from libqtile.command import lazy
  9. from libqtile.widget import Spacer
  10. from qtile_extras import widget
  11. from qtile_extras.widget.decorations import RectDecoration
  12. from qtile_extras.popup.toolkit import (PopupImage, PopupText,PopupRelativeLayout,PopupWidget)
  13. #mod4 or mod = super key
  14. mod = "mod4"
  15. mod1 = "alt"
  16. mod2 = "control"
  17. mod3 = "shift"
  18. home = os.path.expanduser('~')
  19. hellacritty = "alacritty -e hx"
  20. myTerm = "alacritty"
  21.  
  22.  
  23.  
  24.  
  25. # def show_graphs(qtile):
  26. # controls = [
  27. # PopupWidget(
  28. # widget=widget.CPUGraph(),
  29. # width=0.45,
  30. # height=0.45,
  31. # pos_x=0.05,
  32. # pos_y=0.05
  33. # ),
  34. # tk.PopupWidget(
  35. # widget=widget.NetGraph(),
  36. # width=0.45,
  37. # height=0.45,
  38. # pos_x=0.5,
  39. # pos_y=0.05
  40. # ),
  41. # tk.PopupWidget(
  42. # widget=widget.MemoryGraph(),
  43. # width=0.9,
  44. # height=0.45,
  45. # pos_x=0.05,
  46. # pos_y=0.5
  47. # )
  48. # ]
  49.  
  50. # layout = tk.PopupRelativeLayout(
  51. # qtile,
  52. # width=1000,
  53. # height=200,
  54. # controls=controls,
  55. # background="00000060",
  56. # initial_focus=None,
  57. # close_on_click=False
  58. # )
  59. # layout.show(centered=True)
  60.  
  61. def show_power_menu(qtile):
  62.  
  63. # controls = [
  64. # PopupImage(
  65. # filename="~/Pictures/icons/lock.svg",
  66. # pos_x=0.15,
  67. # pos_y=0.1,
  68. # width=0.1,
  69. # height=0.5,
  70. # mouse_callbacks={
  71. # "Button1": lazy.spawn("/path/to/lock_cmd")
  72. # }
  73. # ),
  74. # PopupImage(
  75. # filename="~/Pictures/icons/sleep.svg",
  76. # pos_x=0.45,
  77. # pos_y=0.1,
  78. # width=0.1,
  79. # height=0.5,
  80. # mouse_callbacks={
  81. # "Button1": lazy.spawn("/path/to/sleep_cmd")
  82. # }
  83. # ),
  84. # PopupImage(
  85. # filename="~/Pictures/icons/shutdown.svg",
  86. # pos_x=0.75,
  87. # pos_y=0.1,
  88. # width=0.1,
  89. # height=0.5,
  90. # highlight="A00000",
  91. # mouse_callbacks={
  92. # "Button1": lazy.shutdown()
  93. # }
  94. # ),
  95. # PopupText(
  96. # text="Lock",
  97. # pos_x=0.1,
  98. # pos_y=0.7,
  99. # width=0.2,
  100. # height=0.2,
  101. # h_align="center"
  102. # ),
  103. # PopupText(
  104. # text="Sleep",
  105. # pos_x=0.4,
  106. # pos_y=0.7,
  107. # width=0.2,
  108. # height=0.2,
  109. # h_align="center"
  110. # ),
  111. # PopupText(
  112. # text="Shutdown",
  113. # pos_x=0.7,
  114. # pos_y=0.7,
  115. # width=0.2,
  116. # height=0.2,
  117. # h_align="center"
  118. # ),
  119. # ]
  120.  
  121. # layout = PopupRelativeLayout(
  122. # qtile,
  123. # width=1000,
  124. # height=200,
  125. # controls=controls,
  126. # background="00000060",
  127. # initial_focus=None,
  128. # )
  129.  
  130. # layout.show(centered=True)
  131.  
  132. @hook.subscribe.startup_once
  133. # def autostart():
  134. # home = os.path.expanduser('~/.config/qtile/autostart.sh') # path to my script, under my user directory
  135. # subprocess.call([home])
  136. # @hook.subscribe.startup_once
  137.  
  138. def autostart():
  139. home = os.path.expanduser('~/.config/qtile/scripts/autostart.sh') # path to my script, under my user directory
  140. subprocess.call([home])
  141.  
  142. keys = [
  143. Key([mod, "shift"], "y", lazy.function(show_power_menu)),
  144. Key([mod, "shift"], "q", lazy.function(show_power_menu)),
  145. Key([mod, "shift"], "g", lazy.function(show_graphs)),
  146. Key([mod3], "space", lazy.spawn('rofi -show run')),
  147. Key([mod2], "tab", lazy.spawn('rofi -show window')),
  148. Key([mod], "f", lazy.window.toggle_fullscreen()),
  149. Key([mod], "q", lazy.window.kill()),
  150. Key([mod], "d", lazy.spawn('nwggrid -p -o 0.4')),
  151. Key([mod], "Escape", lazy.spawn('xkill')),
  152. Key([mod], "Return", lazy.spawn('myTerm')),
  153. Key([mod], "KP_Enter", lazy.spawn('alacritty')),
  154. Key([mod], "x", lazy.shutdown()),
  155. Key([mod, "shift"], "Return", lazy.spawn('pcmanfm')),
  156. Key([mod, "shift"], "d", lazy.spawn("dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'")),
  157. Key([mod, "shift"], "q", lazy.window.kill()),
  158. Key([mod, "shift"], "r", lazy.restart()),
  159. Key([mod, "control"], "r", lazy.restart()),
  160. Key([mod, "shift"], "x", lazy.shutdown()),
  161. Key(["mod1", "control"], "o", lazy.spawn(home + '/.config/qtile/scripts/picom-toggle.sh')),
  162. Key([mod], "o", lazy.spawn('alacritty -e hx ~/.config/qtile/config.py')),
  163. Key(["mod1", "control"], "t", lazy.spawn('xterm')),
  164. Key(["mod1", "control"], "u", lazy.spawn('pavucontrol')),
  165. Key([], "Print", lazy.spawn('flameshot full -p ' + home + '/Pictures')),
  166. Key([mod2], "Print", lazy.spawn('flameshot full -p ' + home + '/Pictures')),
  167. Key([mod], "f", lazy.window.toggle_fullscreen()),
  168. Key([mod], "q", lazy.window.kill()),
  169. Key([mod, "shift"], "q", lazy.window.kill()),
  170. Key([mod, "shift"], "r", lazy.restart()),
  171. Key([mod], "n", lazy.layout.normalize()),
  172. Key([mod], "space", lazy.next_layout()),
  173. Key([mod], "Up", lazy.layout.up()),
  174. Key([mod], "Down", lazy.layout.down()),
  175. Key([mod], "Left", lazy.layout.left()),
  176. Key([mod], "Right", lazy.layout.right()),
  177. Key([mod, "control"], "Right", lazy.layout.increase_ratio(),lazy.layout.delete()),
  178. Key([mod, "control"], "Left", lazy.layout.grow_left(), lazy.layout.shrink(), lazy.layout.decrease_ratio(), lazy.layout.add()),
  179. Key([mod, "control"], "Up", lazy.layout.grow(),
  180. lazy.layout.decrease_nmaster(),
  181. ),
  182. Key([mod, "control"], "Down",
  183. lazy.layout.grow_down(),
  184. lazy.layout.shrink(),
  185. lazy.layout.increase_nmaster(),
  186. ),
  187. Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
  188. Key([mod, "shift"], "Down", lazy.layout.shuffle_down()),
  189. Key([mod, "shift"], "Left", lazy.layout.swap_left()),
  190. Key([mod, "shift"], "Right", lazy.layout.swap_right()),
  191. Key([mod, "shift"], "space", lazy.window.toggle_floating()),
  192.  
  193. ]
  194.  
  195. def window_to_previous_screen(qtile, switch_group=False, switch_screen=False):
  196. i = qtile.screens.index(qtile.current_screen)
  197. if i != 0:
  198. group = qtile.screens[i - 1].group.name
  199. qtile.current_window.togroup(group, switch_group=switch_group)
  200. if switch_screen == True:
  201. qtile.cmd_to_screen(i - 1)
  202.  
  203. def window_to_next_screen(qtile, switch_group=False, switch_screen=False):
  204. i = qtile.screens.index(qtile.current_screen)
  205. if i + 1 != len(qtile.screens):
  206. group = qtile.screens[i + 1].group.name
  207. qtile.current_window.togroup(group, switch_group=switch_group)
  208. if switch_screen == True:
  209. qtile.cmd_to_screen(i + 1)
  210.  
  211. keys.extend([
  212. # MOVE WINDOW TO NEXT SCREEN
  213. Key([mod,"shift"], "Right", lazy.function(window_to_next_screen, switch_screen=True)),
  214. Key([mod,"shift"], "Left", lazy.function(window_to_previous_screen, switch_screen=True)),
  215. ])
  216. groups = []
  217. group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0",]
  218. group_labels = ["", "", "", "", "", "", "", "", "", "",]
  219. group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall",]
  220. for i in range(len(group_names)):
  221. groups.append(
  222. Group(
  223. name=group_names[i],
  224. layout=group_layouts[i].lower(),
  225. label=group_labels[i],
  226. ))
  227.  
  228. for i in groups:
  229. keys.extend([
  230.  
  231. #CHANGE WORKSPACES
  232. Key([mod], i.name, lazy.group[i.name].toscreen()),
  233. Key(["mod1"], "Tab", lazy.screen.next_group()),
  234. Key([mod], "Tab", lazy.screen.prev_group()),
  235. Key([mod, "shift"], i.name, lazy.window.togroup(i.name) , lazy.group[i.name].toscreen()),
  236. ])
  237. def init_layout_theme():
  238. return {"margin":10,
  239. "border_width":2,
  240. "border_focus": "#202022",
  241. "border_normal": "#f4c2c2"
  242. }
  243.  
  244. layout_theme = init_layout_theme()
  245.  
  246. ayouts = [
  247. # layout.Columns(border_focus_stack=['#d75f5f', '#8f3d3d'], border_width=4),
  248. layout.Max(**layout_theme),
  249. # Try more layouts by unleashing below layouts.
  250. # layout.Stack(num_stacks=2, **layout_theme),
  251. layout.Bsp(**layout_theme),
  252. layout.Matrix(**layout_theme),
  253. layout.MonadTall(**layout_theme),
  254. layout.MonadWide(**layout_theme),
  255. layout.RatioTile(**layout_theme),
  256. layout.Tile(**layout_theme),
  257. #layout.TreeTab(
  258. # sections=['FIRST', 'SECOND'],
  259. # bg_color='#3b4252',
  260. # active_bg='#bf616a',
  261. # inactive_bg='#a3be8c',
  262. # padding_y=5,
  263. # section_top=10,
  264. # panel_width=280
  265. #),
  266. # layout.VerticalTile(),
  267. # layout.Zoomy(),
  268. ]
  269.  
  270. #Colors for the bar
  271.  
  272. def init_colors():
  273. return [["#2F343F", "#2F343F"], # color 0def init_colors():
  274. ["#000000" "#000000"], # color 0
  275. ["#cccccc", "#cccccc"], # color 1
  276. ["#121212", "#121212"], # color 2 #
  277. ["#2d3640", "#2d3640"], # color 3i t#omarto
  278. ["#5c6773", "#5c6773"],# color 4 # light red orange
  279. ["#ff8f40", "#ff8f40"], # color 5 #
  280. ["#009669", "#009669"], # color 6 orangw
  281. ["#f7b90c", "#f7b90c"], # color 7 #
  282. ["#cecd19", "#cecd19"], # color 8 #
  283. ["#bd5173", "#bd5173"], # color 9 # ["#6790eb", "#6790eb"], # color 10
  284. ["#32c9fa", "#32c9fa"], #10
  285. ["#00ff80", "#00ff80"], #11c
  286. ["#186800", "#186800"], #12cream color
  287. ["#2B0C02", "#2B0C02"], #13
  288. ["#c32101", "#c32101"], #14ckground left most rectangle Ein bar
  289. ["#2aa899", "#2aa899"], #15
  290. ["#abb2bf", "#abb2bf"],# color 16
  291. ["#81a1c1", "#81a1c1"], #17
  292. ["#56b6c2", "#56b6c2"], #18also blue
  293. ["#00F2F4", "#00F2F4"], #19skyblue
  294. ["#e06c75", "#e06c75"], #20
  295. ["#fb9f7f", "#fb9f7f"], #21
  296. ["#ffd47e", "#ffd47e"]] #22ci
  297.  
  298. colors = init_colors()
  299.  
  300. prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
  301.  
  302. widget_defaults = dict(
  303. font='Ubuntu Nerd Font',
  304. fontsize=34,
  305. padding=3,
  306. background=colors[1],
  307. foreground=colors[15]
  308. )
  309. # return dict(font="Noto Sans",
  310. # fontsize = 24,
  311. # padding = 6,
  312. # background=colors[6])
  313.  
  314. # widget_defaults = init_widgets_defaults()
  315. screens = [
  316. Screen(
  317. top=bar.Bar(
  318. [
  319. widget.Sep(
  320. background=colors[1], #2e3440
  321. foreground=colors[8], #d8dee9
  322. linewidth=1,
  323. padding=10
  324. ),
  325.  
  326. widget.Image(
  327. filename = "~/.config/qtile/icons/garuda-red.png",
  328. iconsize = 22,
  329. background = colors[1],
  330. mouse_callbacks = {'Button1': lambda : qtile.spawn('jgmenu_run')}
  331. ),
  332. widget.Sep(
  333. linewidth = 1,
  334. padding = 10,
  335. foreground = colors[1],
  336. background = colors[1]
  337. ),
  338. widget.Image(
  339. filename="~/.config/qtile/icons/qtilelogo.png",
  340. iconsize=22,
  341. background=colors[14],
  342. mouse_callbacks={'Button1': lambda : qtile.cmd_spawn('rofi -show run')}
  343. ),
  344. widget.Sep(
  345. background=colors[1],
  346. foreground=colors[14],
  347. linewidth=1,
  348. padding=10
  349. ),
  350. widget.GroupBox(
  351. active=colors[14], #b48ead
  352. borderwidth=2,
  353. disable_drag=True,
  354. font='Ubuntu Nerd Font',
  355. fontsize=30,
  356. hide_unused=False,
  357. highlight_method='line',
  358. inactive=colors[9], #e5e9f0
  359. margin_x=0,
  360. margin_y=3,
  361. padding_x=5,
  362. padding_y=8,
  363. rounded=False,
  364. this_current_screen_border=colors[14], #ebcb8b
  365. urgent_alert_method='line'
  366. ),
  367. widget.Sep(
  368. background=colors[1],
  369. foreground=colors[5],
  370. linewidth=1,
  371. padding=10
  372. ),
  373. widget.CurrentLayoutIcon(
  374. background=colors[1],
  375. custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
  376. foreground=colors[14], #e5e9f0
  377. padding=0,
  378. scale=0.65
  379. ),
  380. widget.Sep(
  381. background=colors[1],
  382. foreground=colors[5],
  383. linewidth=1,
  384. padding=10
  385. ),
  386. widget.CurrentLayout(
  387. background=colors[21],
  388. font='Ubuntu Bold',
  389. foreground=colors[21]
  390. ),
  391. widget.Sep(
  392. background=colors[1],
  393. foreground=colors[5],
  394. linewidth=1,
  395. padding=10
  396. ),
  397. widget.Prompt(
  398. background=colors[1],
  399. font='Ubuntu',
  400. fontsize=22,
  401. foreground=colors[14]
  402. ),
  403. widget.Spacer(),
  404. widget.TextBox(
  405. background=colors[11],
  406. font='Ubuntu Nerd Font',
  407. fontsize=22,
  408. foreground=colors[14],
  409. padding=0,
  410. text=' '
  411. ),
  412. widget.Clock(
  413. foreground = colors[1],
  414. background = colors[14],
  415. fontsize = 22,
  416. format='%I:%M %p'
  417. ),
  418. widget.Sep(
  419. linewidth = 2,
  420. padding = 10,
  421. foreground = colors[1],
  422. background = colors[1]
  423. ),
  424. widget.Image(
  425. filename = "~/.config/qtile/icons/2e8601f1eea99a2c.png",
  426. iconsize = 9,
  427. background = colors[22],
  428. mouse_callbacks = {'Button1': lambda: alacritty}
  429. ),
  430. widget.KeyboardLayout(
  431. background=colors[1],
  432. font='Ubuntu',
  433. fontsize=22,
  434. foreground=colors[4]
  435. ),
  436. widget.CapsNumLockIndicator(
  437. background=colors[1],
  438. font='Ubuntu',
  439. fontsize=22,
  440. foreground=colors[14]
  441. ),
  442. widget.Sep(
  443. background=colors[1],
  444. foreground=colors[5],
  445. linewidth=1,
  446. padding=10
  447. ),
  448. widget.TextBox(
  449. background=colors[1],
  450. font='Ubuntu Nerd Font',
  451. fontsize=22,
  452. foreground=colors[6],
  453. padding=0,
  454. text=' '
  455. ),
  456. widget.Clock(
  457. background=colors[1],
  458. font='Ubuntu',
  459. fontsize=22,
  460. foreground=colors[6],
  461. format='%a %d, (%B) %H:%M:%S '
  462. ),
  463. ],
  464. 38,
  465. opacity=0.9
  466. ),
  467. bottom=bar.Bar(
  468. [
  469. widget.WindowName(
  470. background=colors[1],
  471. foreground=colors[1],
  472. font='Ubuntu',
  473. fontsize = 22,
  474. max_chars=60
  475. ),
  476. widget.Spacer(),
  477. widget.Systray(
  478. background=colors[1],
  479. icon_size=20,
  480. padding=4
  481. ),
  482. widget.Sep(
  483. background=colors[1],
  484. foreground=colors[5],
  485. linewidth=1,
  486. padding=10
  487. ),
  488. widget.TextBox(
  489. background=colors[1],
  490. font='Ubuntu Nerd Font',
  491. fontsize=22,
  492. foreground=colors[6],
  493. padding=0,
  494. text=' '
  495. ),
  496. widget.ThermalSensor(
  497. background=colors[1],
  498. font='Ubuntu',
  499. fontsize=22,
  500. foreground=colors[14],
  501. update_interval=2
  502. ),
  503. widget.Sep(
  504. background=colors[1],
  505. foreground=colors[5],
  506. linewidth=1,
  507. padding=10
  508. ),
  509. widget.TextBox(
  510. background=colors[1],
  511. font='Ubuntu Nerd Font',
  512. fontsize=22,
  513. foreground=colors[6],
  514. padding=0,
  515. text=' '
  516. ),
  517. widget.Memory(
  518. background=colors[1],
  519. font='Ubuntu',
  520. fontsize=22,
  521. foreground=colors[14],
  522. format="{MemUsed: .0f}{mm}",
  523. update_interval=1.0
  524. ),
  525. widget.Sep(
  526. background=colors[1],
  527. foreground=colors[5],
  528. linewidth=1,
  529. padding=10
  530. ),
  531. widget.TextBox(
  532. background=colors[1],
  533. font='Ubuntu Nerd Font',
  534. fontsize=22,
  535. foreground=colors[6],
  536. padding=0,
  537. text=' '
  538. ),
  539. widget.CPU(
  540. background=colors[14],
  541. font='Ubuntu',
  542. fontsize=22,
  543. foreground=colors[1],
  544. format='CPU {load_percent}%',
  545. update_interval=1
  546. ),
  547. #widget.CPUGraph(
  548. # background=colors[1],
  549. # border_color=colors[5],
  550. # border_width=0,
  551. # core='all',
  552. # fill_color=colors[10], #81a1c1
  553. # foreground=colors[5],
  554. # graph_color=colors[10],
  555. # line_width=1,
  556. # type='linefill'
  557. #),
  558. widget.Sep(
  559. background=colors[1],
  560. foreground=colors[5],
  561. linewidth=1,
  562. padding=10
  563. ),
  564. widget.TextBox(
  565. background=colors[21],
  566. font='Ubuntu Nerd Font',
  567. fontsize=22,
  568. foreground=colors[6],
  569. padding=0,
  570. text=' '
  571. ),
  572. widget.Net(
  573. background=colors[1],
  574. font='Ubuntu',
  575. fontsize=22,
  576. foreground=colors[5],
  577. format='{interface}: {down} ↓ ',
  578. interface='all',
  579. padding=0
  580. ),
  581. #widget.NetGraph(
  582. # background=colors[1],
  583. # bandwidth="down",
  584. # border_color=colors[5],
  585. # border_width=0,
  586. # fill_color=colors[9], #88c0d0
  587. # foreground=colors[5],
  588. # graph_color=colors[9],
  589. # interface="auto",
  590. # line_width=1,
  591. # padding=0,
  592. # type='linefill'
  593. #),
  594. ],
  595. 38,
  596. opacity=0.9
  597. ),
  598. ),
  599. ]
  600.  
  601. # def init_widgets_screen1():
  602. # widgets_screen1 = init_widgets_list()
  603. # return widgets_screen1
  604.  
  605. # def init_widgets_screen2():
  606. # widgets_screen2 = init_widgets_list()
  607. # return widgets_screen2
  608.  
  609. #
  610.  
  611. # MOUSE CONFIGURATION
  612. mouse = [
  613. Drag([mod], "Button1", lazy.window.set_position_floating(),
  614. start=lazy.window.get_position()),
  615. Drag([mod], "Button3", lazy.window.set_size_floating(),
  616. start=lazy.window.get_size())
  617. ]
  618.  
  619. dgroups_key_binder = None
  620. dgroups_app_rules = []
  621.  
  622. main = None
  623.  
  624. @hook.subscribe.startup_once
  625. def start_once():
  626. home = os.path.expanduser('~')
  627. subprocess.call([home + '/.config/qtile/scripts/autostart.sh'])
  628.  
  629. @hook.subscribe.startup
  630. def start_always():
  631. # Set the cursor to something sane in X
  632. subprocess.Popen(['xsetroot', '-cursor_name'])
  633.  
  634. @hook.subscribe.client_new
  635. def set_floating(window):
  636. if (window.window.get_wm_transient_for()
  637. or window.window.get_wm_type() in floating_types):
  638. window.floating = True
  639.  
  640. floating_types = ["notification", "toolbar", "splash", "dialog"]
  641.  
  642.  
  643. follow_mouse_focus = True
  644. bring_front_click = False
  645. cursor_warp = False
  646. floating_layout = layout.Floating(float_rules=[
  647. *layout.Floating.default_float_rules,
  648. Match(wm_class='confirm'),
  649. Match(wm_class='dialog'),
  650. Match(wm_class='download'),
  651. Match(wm_class='error'),
  652. Match(wm_class='file_progress'),
  653. Match(wm_class='notification'),
  654. Match(wm_class='splash'),
  655. Match(wm_class='toolbar'),
  656. Match(wm_class='confirmreset'),
  657. Match(wm_class='makebranch'),
  658. Match(wm_class='maketag'),
  659. Match(wm_class='Arandr'),
  660. Match(wm_class='feh'),
  661. Match(wm_class='Galculator'),
  662. Match(title='branchdialog'),
  663. Match(title='Open File'),
  664. Match(title='pinentry'),
  665. Match(wm_class='ssh-askpass'),
  666. Match(wm_class='lxpolkit'),
  667. Match(wm_class='Lxpolkit'),
  668. Match(wm_class='yad'),
  669. Match(wm_class='Yad'),
  670. Match(wm_class='Cairo-dock'),
  671. Match(wm_class='cairo-dock'),
  672.  
  673.  
  674. ], fullscreen_border_width = 0, border_width = 0)
  675. auto_fullscreen = True
  676.  
  677. focus_on_window_activation = "focus" # or smart
  678.  
  679. @lazy.function
  680. def window_to_prev_group(qtile):
  681. if qtile.currentWindow is not None:
  682. i = qtile.groups.index(qtile.currentGroup)
  683. qtile.currentWindow.togroup(qtile.groups[i - 1].name)
  684.  
  685. @lazy.function
  686. def window_to_next_group(qtile):
  687. if qtile.currentWindow is not None:
  688. i = qtile.groups.index(qtile.currentGroup)
  689. qtile.currentWindow.togroup(qtile.groups[i + 1].name)
  690.  
  691. wmname = "LG3D"
  692.  
  693.  
  694.  
  695. mutscr = qtile_mutable_scratch.MutableScratch()
  696. groups.append(Group('')) # Must be after `groups` is created
  697.  
  698. keys.extend( [
  699. EzKey('M-S-<minus>', mutscr.add_current_window()),
  700. EzKey('M-C-<minus>', mutscr.remove_current_window()),
  701. EzKey('M-<minus>', mutscr.toggle()),
  702. ] )
  703.  
  704. hook.subscribe.startup_complete(mutscr.qtile_startup)
  705. # keys.extend( [
  706. # EzKey('M-S-<minus>', mutscr.add_current_window()),
  707. # EzKey('M-C-<minus>', mutscr.remove_current_window()),
  708. # EzKey('M-<minus>', mutscr.toggle()),
  709. # ] )
  710.  
Advertisement
Add Comment
Please, Sign In to add comment