Meconopsis changes for Wayland and general refactoring/optimizations
This commit is contained in:
parent
1e65025045
commit
2860100089
9 changed files with 697 additions and 1185 deletions
34
kuro/base.py
34
kuro/base.py
|
@ -2,6 +2,9 @@ from libqtile import layout as libqtile_layout, layout, bar, widget
|
|||
from libqtile.command import lazy
|
||||
from libqtile.config import Key, Group, Screen, Drag, Click, Match
|
||||
|
||||
# Initialize logging
|
||||
from libqtile.log_utils import logger
|
||||
|
||||
|
||||
class BaseConfig:
|
||||
@classmethod
|
||||
|
@ -15,10 +18,11 @@ class BaseConfig:
|
|||
class BaseTheme:
|
||||
# Changing variables initialized by function
|
||||
keys = None
|
||||
mouse = None
|
||||
groups = None
|
||||
layouts = None
|
||||
widget_defaults = None
|
||||
screens = None
|
||||
screens = []
|
||||
qtile = None
|
||||
|
||||
# 'Static' variables
|
||||
|
@ -41,6 +45,7 @@ class BaseTheme:
|
|||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
extensions = []
|
||||
reconfigure_screens = True
|
||||
|
||||
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
|
||||
# string besides java UI toolkits; you can see several discussions on the
|
||||
|
@ -56,11 +61,17 @@ class BaseTheme:
|
|||
wmname = "LG3D"
|
||||
|
||||
def initialize(self):
|
||||
logger.info("Initializing widget defaults...")
|
||||
self.widget_defaults = self.init_widget_defaults()
|
||||
logger.info("Initializing keys...")
|
||||
self.keys = self.init_keys()
|
||||
logger.info("Initializing groups...")
|
||||
self.groups = self.init_groups()
|
||||
logger.info("Initializing layouts...")
|
||||
self.layouts = self.init_layouts()
|
||||
logger.info("Initializing screens...")
|
||||
self.screens = self.init_screens()
|
||||
logger.info("Initializing mouse...")
|
||||
self.mouse = self.init_mouse()
|
||||
|
||||
def init_keys(self):
|
||||
|
@ -95,6 +106,15 @@ class BaseTheme:
|
|||
Key(["mod4"], "r", lazy.spawncmd()),
|
||||
]
|
||||
|
||||
def init_mouse(self):
|
||||
return [
|
||||
Drag(["mod4"], "Button1", lazy.window.set_position_floating(),
|
||||
start=lazy.window.get_position()),
|
||||
Drag(["mod4"], "Button3", lazy.window.set_size_floating(),
|
||||
start=lazy.window.get_size()),
|
||||
Click(["mod4"], "Button2", lazy.window.bring_to_front())
|
||||
]
|
||||
|
||||
def init_groups(self):
|
||||
groups = [Group(i) for i in "asdfuiop"]
|
||||
for i in groups:
|
||||
|
@ -138,15 +158,6 @@ class BaseTheme:
|
|||
),
|
||||
]
|
||||
|
||||
def init_mouse(self):
|
||||
return [
|
||||
Drag(["mod4"], "Button1", lazy.window.set_position_floating(),
|
||||
start=lazy.window.get_position()),
|
||||
Drag(["mod4"], "Button3", lazy.window.set_size_floating(),
|
||||
start=lazy.window.get_size()),
|
||||
Click(["mod4"], "Button2", lazy.window.bring_to_front())
|
||||
]
|
||||
|
||||
# Callbacks
|
||||
def callback_startup_once(self, *args, **kwargs):
|
||||
pass
|
||||
|
@ -220,5 +231,8 @@ class BaseTheme:
|
|||
def callback_screen_change(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def callback_screens_reconfigured(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def callback_current_screen_change(self, *args, **kwargs):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue