Adding fixing a few things.

This commit is contained in:
Derek Taylor
2020-11-15 06:16:21 -06:00
parent 3a124db7d7
commit d72c0e0842
9 changed files with 76 additions and 18 deletions
+30 -4
View File
@@ -3,9 +3,10 @@ import os
import re
import socket
import subprocess
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.config import KeyChord, Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
from libqtile.lazy import lazy
from typing import List # noqa: F401
mod = "mod4" # Sets mod key to SUPER/WINDOWS
@@ -144,7 +145,6 @@ keys = [
desc='Passmenu'
),
Key(["mod1", "control"], "r",
lazy.spawn("./.dmenu/dmenu-reddio.sh"),
desc='Dmenu reddio script'
),
Key(["mod1", "control"], "s",
@@ -388,9 +388,8 @@ def init_widgets_list():
background = colors[4],
fontsize = 14
),
widget.CheckUpdates(
widget.Pacman(
update_interval = 1800,
distro = 'Arch',
foreground = colors[2],
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
background = colors[4]
@@ -517,6 +516,33 @@ if __name__ in ["config", "__main__"]:
widgets_screen1 = init_widgets_screen1()
widgets_screen2 = init_widgets_screen2()
def window_to_prev_group(qtile):
if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i - 1].name)
def window_to_next_group(qtile):
if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i + 1].name)
def window_to_previous_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i != 0:
group = qtile.screens[i - 1].group.name
qtile.current_window.togroup(group)
def window_to_next_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i + 1 != len(qtile.screens):
group = qtile.screens[i + 1].group.name
qtile.current_window.togroup(group)
def switch_screens(qtile):
i = qtile.screens.index(qtile.current_screen)
group = qtile.screens[i - 1].group
qtile.current_screen.set_group(group)
mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(),
start=lazy.window.get_position()),