Skip to content

Commit

Permalink
Second stable qtile config; fixed groups issues
Browse files Browse the repository at this point in the history
  • Loading branch information
keystroke3 committed Aug 28, 2022
1 parent 552dc79 commit 6a4020f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 75 deletions.
36 changes: 14 additions & 22 deletions .config/qtile/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@


groups = [
Group("1", label="1"),
Group("2", label="2"),
Group("3", label="3"),
Group("4", label="4"),
Group("5", label="5"),
Group("6", label="6"),
Group("7", label="7"),
Group("8", label="8"),
Group("1", label="Group 1"),
Group("2", label="Group 2"),
Group("3", label="Group 3"),
Group("4", label="Group 4"),
Group("5", label="Group 5"),
Group("6", label="Group 6"),
Group("7", label="Group 7"),
Group("8", label="Group 8"),
Group(
"9",
label="9",
label="Group 9",
matches=[
Match(wm_class=["discord"]),
],
),
Group(
"0",
label="0",
label="Group 10",
matches=[
Match(wm_class=["Thunderbird"]),
],
Expand Down Expand Up @@ -63,9 +63,7 @@ def window_to_next_group(qtile):
Key([mod, "shift"], "q", lazy.window.kill()),
Key([mod, "shift"], "x", lazy.shutdown()),
Key([mod, "shift"], "r", lazy.restart()),
# QTILE LAYOUT KEYS
Key([mod], "n", lazy.layout.normalize()),
# Key([mod], "v", lazy.next_layout()),
Key([mod], "v", lazy.next_layout()),
# CHANGE FOCUS
Key([mod], "Up", lazy.layout.up()),
Expand Down Expand Up @@ -199,10 +197,10 @@ def _inner(qtile) -> None:
return

if name in "12345":
qtile.focus_screen(0)
qtile.focus_screen(1) # this was 0 set to zero which corresponded to eDP2
qtile.groups_map[name].cmd_toscreen()
else:
qtile.focus_screen(1)
qtile.focus_screen(0)
qtile.groups_map[name].cmd_toscreen()

return _inner
Expand All @@ -211,21 +209,16 @@ def _inner(qtile) -> None:
for i in groups:
keys.extend(
[
# CHANGE WORKSPACES
# Key([mod], i.name, lazy.group[i.name].toscreen()),
Key([mod], i.name, lazy.function(go_to_group(i.name))),
Key([mod], "Tab", lazy.group.next_window()),
Key([mod, "shift"], "Tab", lazy.group.prev_window()),
Key(["mod1"], "Tab", lazy.group.next_window()),
Key(["mod1", "shift"], "Tab", lazy.group.prev_window()),
# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON CURRENT WORKSPACE
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
# MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND FOLLOW MOVED WINDOW TO WORKSPACE
Key(
[mod, "shift"],
i.name,
lazy.window.togroup(i.name),
lazy.group[i.name].toscreen(),
lazy.function(go_to_group(i.name)),
),
]
)
Expand Down Expand Up @@ -270,7 +263,7 @@ def _inner(qtile) -> None:
dgroups_app_rules = [] # type: List
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
cursor_warp = True
reconfigure_screens = True
wmname = "LG3D"

Expand All @@ -284,4 +277,3 @@ def autostart():
@hook.subscribe.startup
def start_always():
subprocess.Popen(["xsetroot", "-curser_name", "left_ptr"])
# subprocess.Popen(['xsetroot', '-curser_name', 'left_ptr'])
50 changes: 1 addition & 49 deletions .config/qtile/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from qtile_extras.bar import Bar
from qtile_extras import widget

theme = "frappe"
theme = "purple"

colours = {
"purple": [
Expand Down Expand Up @@ -320,54 +320,6 @@
padding=4,
),
]
if len(os.listdir("/sys/class/power_supply")) == 0:
default.extend(
[
widget.CapsNumLockIndicator(
fontsize=xx,
font=xf,
foreground=colours[theme][1],
background=colours[theme][7],
**decor,
),
widget.TextBox(
foreground=colours[theme][7],
text="|",
font=xf,
),
]
)
else:
default.extend(
[
# widget.UPowerWidget(
# font=xf,
# battery_width=27,
# battery_height=14,
# fontsize=xx,
# percentage_low=0.5,
# percentage_critical=0.3,
# fill_critical="#ff0000",
# fill_charge=colours[theme][3],
# fill_low=colours[theme][4],
# fill_normal=colours[theme][1],
# background=colours[theme][7],
# border_colour=colours[theme][1],
# border_critical_colour=colours[theme][1],
# border_charge_colour=colours[theme][1],
# text_charging="",
# text_discharging="",
# text_displaytime="",
# margin=10,
# **decor1,
# ),
# widget.TextBox(
# foreground=colours[theme][7],
# text="|",
# font=xf,
# ),
]
)

screens = [
Screen(
Expand Down
5 changes: 3 additions & 2 deletions .config/qtile/scripts/autostart.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
echo 'qtile' > /tmp/wm &
~/.cache/redpaper/wallpaper.sh &
sxhkd -c ~/
~/.config/sxhkd/sxhkdd &
~/.config/qtile/scripts/xrandr-manager &
LOG_DIR=/home/salvaje/logs
nm-applet & disown
flameshot & disown
Expand All @@ -24,3 +24,4 @@ LIBVA_DRIVER_NAME=i914 discord \
--use-gl=desktop \
--enable-gpu-rasterization \
--enable-zero-copy &

4 changes: 2 additions & 2 deletions .xinitrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ lxsession &> ~/logs/lxsession &
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
xrdb -load ~/.Xresources &> ~/logs/xrdb &
exec bspwm &> ~/logs/bspwm
# exec qtile start -c /home/salvaje/.config/qtile/config.py
# exec bspwm &> ~/logs/bspwm
exec qtile start -c /home/salvaje/.config/qtile/config.py

0 comments on commit 6a4020f

Please sign in to comment.