pre fix
This commit is contained in:
@@ -6,14 +6,14 @@ from libqtile.config import Screen
|
|||||||
|
|
||||||
from themes.colors import gruvbox_dark
|
from themes.colors import gruvbox_dark
|
||||||
|
|
||||||
from modules.keys import keys, mouse
|
from modules.keys import keybinds, mousebinds
|
||||||
from modules.groups import groups
|
from modules.groups import groups
|
||||||
from modules.widgets import widgets_main, widgets_portrait, widgets_media
|
from modules.widgets import widgets_main, widgets_portrait, widgets_media
|
||||||
from modules.hooks import *
|
from modules.hooks import *
|
||||||
from modules.layouts import layouts
|
from modules.layouts import layouts
|
||||||
|
|
||||||
# Application definitions
|
# Application definitions
|
||||||
apps = {
|
APPS = {
|
||||||
"terminal": "kitty",
|
"terminal": "kitty",
|
||||||
"browser": "firefox",
|
"browser": "firefox",
|
||||||
"filebrowser": "nemo",
|
"filebrowser": "nemo",
|
||||||
@@ -55,12 +55,6 @@ screens = [
|
|||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Default definitions
|
|
||||||
layout_defaults = dict(
|
|
||||||
margin=3,
|
|
||||||
border_width=0,
|
|
||||||
grow_amount=2,
|
|
||||||
)
|
|
||||||
|
|
||||||
widget_defaults = dict(
|
widget_defaults = dict(
|
||||||
font="Open Sans",
|
font="Open Sans",
|
||||||
@@ -69,8 +63,8 @@ widget_defaults = dict(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Essentials
|
# Essentials
|
||||||
keys = keys
|
keys = keybinds()
|
||||||
mouse = mouse
|
mouse = mousebinds()
|
||||||
groups = groups
|
groups = groups
|
||||||
layouts = layouts
|
layouts = layouts
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import re
|
import re
|
||||||
from libqtile.lazy import lazy
|
from libqtile.lazy import lazy
|
||||||
from libqtile.config import Group, EzKey as Key, Match, DropDown, ScratchPad
|
from libqtile.config import Group, EzKey as Key, Match, DropDown, ScratchPad
|
||||||
from modules.keys import keys
|
from modules.keys import keybinds
|
||||||
|
|
||||||
mod = "mod4"
|
|
||||||
|
|
||||||
group_screen_map = {
|
group_screen_map = {
|
||||||
"0": 1,
|
|
||||||
"1": 1,
|
"1": 1,
|
||||||
"2": 1,
|
"2": 1,
|
||||||
"3": 1,
|
"3": 1,
|
||||||
@@ -66,7 +63,9 @@ groups = [
|
|||||||
name="f4",
|
name="f4",
|
||||||
label=" ",
|
label=" ",
|
||||||
matches=[
|
matches=[
|
||||||
Match(wm_class=re.compile(r"^(com.github.th_ch.youtube_music)$")),
|
Match(
|
||||||
|
wm_class=re.compile(r"^(com.github.th_ch.youtube_music)$"),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Group(
|
Group(
|
||||||
@@ -92,6 +91,10 @@ groups = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def create_group_keys(groups, go_to_group, go_to_group_and_move_window):
|
||||||
|
additional_keys = []
|
||||||
|
|
||||||
|
|
||||||
def go_to_group(name: str):
|
def go_to_group(name: str):
|
||||||
def _inner(qtile):
|
def _inner(qtile):
|
||||||
screen = group_screen_map.get(name, 0)
|
screen = group_screen_map.get(name, 0)
|
||||||
@@ -131,8 +134,8 @@ for i in groups:
|
|||||||
)
|
)
|
||||||
|
|
||||||
for i in range(1, 12):
|
for i in range(1, 12):
|
||||||
group_name = f"f{i}"
|
group_name = f"<f{i}>"
|
||||||
key = f"F{i}"
|
key = f"<f{i}>"
|
||||||
keys.append
|
keys.append
|
||||||
|
|
||||||
groups.append(
|
groups.append(
|
||||||
@@ -162,4 +165,3 @@ groups.append(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,12 @@ from libqtile.lazy import lazy
|
|||||||
from libqtile.config import EzKey as Key
|
from libqtile.config import EzKey as Key
|
||||||
from libqtile.config import EzClick as Click, EzDrag as Drag
|
from libqtile.config import EzClick as Click, EzDrag as Drag
|
||||||
|
|
||||||
from config import APPS
|
|
||||||
|
|
||||||
keys = [
|
def keybinds():
|
||||||
|
from config import APPS
|
||||||
|
|
||||||
|
keys = (
|
||||||
|
[
|
||||||
# Focus manipulation
|
# Focus manipulation
|
||||||
Key("M-h", lazy.layout.left(), desc="Move focus to the left"),
|
Key("M-h", lazy.layout.left(), desc="Move focus to the left"),
|
||||||
Key("M-l", lazy.layout.right(), desc="Move focus to the right"),
|
Key("M-l", lazy.layout.right(), desc="Move focus to the right"),
|
||||||
@@ -107,9 +110,13 @@ keys = [
|
|||||||
),
|
),
|
||||||
Key("M-b", lazy.spawn(APPS["browser"])),
|
Key("M-b", lazy.spawn(APPS["browser"])),
|
||||||
Key("M-<Return>", lazy.spawn(APPS["terminal"])),
|
Key("M-<Return>", lazy.spawn(APPS["terminal"])),
|
||||||
]
|
],
|
||||||
|
)
|
||||||
|
return keys
|
||||||
|
|
||||||
mouse = [
|
|
||||||
|
def mousebinds():
|
||||||
|
mouse = [
|
||||||
Drag(
|
Drag(
|
||||||
"M-1",
|
"M-1",
|
||||||
lazy.window.set_position_floating(),
|
lazy.window.set_position_floating(),
|
||||||
@@ -121,4 +128,5 @@ mouse = [
|
|||||||
start=lazy.window.get_size(),
|
start=lazy.window.get_size(),
|
||||||
),
|
),
|
||||||
Click("M-2", lazy.window.bring_to_front()),
|
Click("M-2", lazy.window.bring_to_front()),
|
||||||
]
|
]
|
||||||
|
return mouse
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
from libqtile import layout
|
from libqtile import layout
|
||||||
from libqtile.config import Match
|
from libqtile.config import Match
|
||||||
from config import layout_defaults
|
|
||||||
|
|
||||||
floating_layout_defaults = layout_defaults.copy()
|
|
||||||
|
LAYOUT_DEFAULTS = dict(
|
||||||
|
margin=3,
|
||||||
|
border_width=0,
|
||||||
|
grow_amount=2,
|
||||||
|
)
|
||||||
|
|
||||||
|
floating_layout_defaults = LAYOUT_DEFAULTS.copy()
|
||||||
|
|
||||||
layouts = [
|
layouts = [
|
||||||
layout.MonadTall(
|
layout.MonadTall(
|
||||||
@@ -14,10 +20,10 @@ layouts = [
|
|||||||
min_ratio=0.30,
|
min_ratio=0.30,
|
||||||
max_ratio=0.75,
|
max_ratio=0.75,
|
||||||
single_border_width=0,
|
single_border_width=0,
|
||||||
**layout_defaults,
|
**LAYOUT_DEFAULTS,
|
||||||
),
|
),
|
||||||
layout.VerticalTile(
|
layout.VerticalTile(
|
||||||
**layout_defaults,
|
**LAYOUT_DEFAULTS,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user