Load more config from host-specific files, add host-config for work DBO, allow using 'fake-screens', various bugfixes
This commit is contained in:
		
							parent
							
								
									3c72148fcd
								
							
						
					
					
						commit
						8f5e1e282a
					
				
					 5 changed files with 308 additions and 129 deletions
				
			
		
							
								
								
									
										133
									
								
								kuro/config/ppc1006083.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										133
									
								
								kuro/config/ppc1006083.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,133 @@
 | 
			
		|||
from kuro.config import Config as GeneralConfig
 | 
			
		||||
import os
 | 
			
		||||
from libqtile.log_utils import logger
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Config(GeneralConfig):
 | 
			
		||||
    """
 | 
			
		||||
    Kuro QTile configuration overrides for Work DBO laptop
 | 
			
		||||
    """
 | 
			
		||||
    config_name = "DBO Power"
 | 
			
		||||
    homedir = "/home/albek00"
 | 
			
		||||
    #modifier = "mod1"  # Non-existing F13 key used by AutoHotKey script
 | 
			
		||||
    use_fake_screens = True
 | 
			
		||||
    fake_screen_count = 2
 | 
			
		||||
 | 
			
		||||
    # Default Applications
 | 
			
		||||
    app_terminal = "terminator"
 | 
			
		||||
    app_launcher = "/home/albek00/bin/dmenu_wal.sh"
 | 
			
		||||
    app_launcer_x11 = "/home/albek00/bin/dmenu_wal.sh"
 | 
			
		||||
    cmd_brightness_up = "true"
 | 
			
		||||
    cmd_brightness_down = "true"
 | 
			
		||||
    cmd_screenshot = "xfce4-screenshooter -r -c -d 1"
 | 
			
		||||
    cmd_alt_screenshot = "xfce4-screenshooter -w -c -d 0"
 | 
			
		||||
    lock_command = "true"
 | 
			
		||||
    cliphistory_command = "true"
 | 
			
		||||
    cmd_wal = ["wal", "-n", "-s", "-t", "-i"]
 | 
			
		||||
 | 
			
		||||
    # Screen configs (empty = autoconfig, otherwise list of Screen() kwarg dicts)
 | 
			
		||||
    screen_kwargs = [
 | 
			
		||||
        {'x': 0, 'y': 0, 'width': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'height': int(os.getenv("QTILE_HEIGHT", "1080"))},
 | 
			
		||||
        {'x': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'y': 0, 'width': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'height': int(os.getenv("QTILE_HEIGHT", "1080"))},
 | 
			
		||||
    ]
 | 
			
		||||
    margin_layout = [8, 8, 2, 8]
 | 
			
		||||
 | 
			
		||||
    # Group definitions
 | 
			
		||||
    groups = [
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
        {'name': ''},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    # Extra keybind definitions
 | 
			
		||||
    extra_keys = []
 | 
			
		||||
 | 
			
		||||
    # Extra floating window rules
 | 
			
		||||
    extra_float_rules = []
 | 
			
		||||
 | 
			
		||||
    # Autostart applications
 | 
			
		||||
    apps_autostart_group = [
 | 
			
		||||
        {'group': "", 'command': ["firefox"]},
 | 
			
		||||
        {'group': "", 'command': ["terminator"]},
 | 
			
		||||
        {'group': "", 'command': ["subl"]},
 | 
			
		||||
        {'group': "", 'command': ["smerge"]},
 | 
			
		||||
        {'group': "", 'command': ["thunar"]},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    # Hide unnecessary widgets
 | 
			
		||||
    show_temperature = False
 | 
			
		||||
    show_media_widget = False
 | 
			
		||||
 | 
			
		||||
    # Network variables
 | 
			
		||||
    wifi_interface = None
 | 
			
		||||
    wired_interface = "enP20755p0s0"
 | 
			
		||||
 | 
			
		||||
    # Volume widget variables
 | 
			
		||||
    volume_pulse_sinks = [
 | 
			
		||||
        "RDPSink",
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    # Override directories to proper homedir. Half of these are probably not even used but meh
 | 
			
		||||
    x11_wallpaper_config_command = "/home/albek00/bin/wal-nitrogen-noupdate"
 | 
			
		||||
    desktop_bg = "/home/albek00/Pictures/wallpapers/desktop.png"
 | 
			
		||||
    desktop_bg_folder = "/home/albek00/Pictures/wallpapers/desktop_rotation/day"
 | 
			
		||||
    desktop_bg_night_folder = "/home/albek00/Pictures/wallpapers/desktop_rotation/night"
 | 
			
		||||
    # desktop_bg_override = "/home/albek00/Pictures/safe_wallpaper.jpg"
 | 
			
		||||
    applauncher_image = "/home/albek00/.config/qtile/kuro/resources/arch.png"
 | 
			
		||||
    custom_layout_icon_paths = ['/home/albek00/.config/qtile/kuro/resources/layout_icons/']
 | 
			
		||||
    glava_color_file_path = "/home/albek00/.config/glava/kurobars_color.glsl"
 | 
			
		||||
    battery_theme_path = "/home/albek00/.config/qtile/kuro/resources/battery"
 | 
			
		||||
    wifi_theme_path = "/home/albek00/.config/qtile/kuro/resources/wifi"
 | 
			
		||||
    gpu_theme_path = "/home/albek00/.config/qtile/kuro/resources/gpu"
 | 
			
		||||
    volume_theme_path = "/home/albek00/.config/qtile/kuro/resources/volume"
 | 
			
		||||
    bluevol_theme_path = "/home/albek00/.config/qtile/kuro/resources/bluetooth_volume"
 | 
			
		||||
 | 
			
		||||
    @classmethod
 | 
			
		||||
    def initialize(cls, qtile):
 | 
			
		||||
        super(Config, cls).initialize(qtile=qtile)
 | 
			
		||||
        # Add keyboard remapping to autostart apps
 | 
			
		||||
        cls.apps_autostart['common'].append(["xmodmap", "-e", "keycode 191 = Super_L"])
 | 
			
		||||
 | 
			
		||||
        # Determine screens programatically
 | 
			
		||||
        qtile_width = int(os.getenv("QTILE_WIDTH", "3840"))
 | 
			
		||||
        qtile_height = int(os.getenv("QTILE_HEIGHT", "1080"))
 | 
			
		||||
        logger.warning(f"Determining screens for size {qtile_width}x{qtile_height}...")
 | 
			
		||||
 | 
			
		||||
        # Home office, 1920x1080 horizontal right and 1080x1920 vertical left
 | 
			
		||||
        if qtile_width == 3000 and (qtile_height > 1912 and qtile_height <= 1920):
 | 
			
		||||
            cls.screen_kwargs = [
 | 
			
		||||
                {'x': 0, 'y': 840, 'width': 1920, 'height': qtile_height-840},
 | 
			
		||||
                {'x': 1920, 'y': 0, 'width': 1080, 'height': qtile_height},
 | 
			
		||||
            ]
 | 
			
		||||
        # Dual 1680x1050
 | 
			
		||||
        elif qtile_width == 3360 and qtile_height == 1050:
 | 
			
		||||
            cls.screen_kwargs = [
 | 
			
		||||
                {'x': 0, 'y': 0, 'width': 1680, 'height': 1050},
 | 
			
		||||
                {'x': 1680, 'y': 0, 'width': 1680, 'height': 1050},
 | 
			
		||||
            ]
 | 
			
		||||
        # Dual 1920x1080
 | 
			
		||||
        elif qtile_width == 3840 and qtile_height == 1080:
 | 
			
		||||
            cls.screen_kwargs = [
 | 
			
		||||
                {'x': 0, 'y': 0, 'width': 1920, 'height': 1080},
 | 
			
		||||
                {'x': 1920, 'y': 0, 'width': 1920, 'height': 1080},
 | 
			
		||||
            ]
 | 
			
		||||
        # Single 1920x1080
 | 
			
		||||
        elif qtile_width == 1920 and qtile_height == 1080:
 | 
			
		||||
            cls.screen_kwargs = [{'x': 0, 'y': 0, 'width': 1920, 'height': 1080}]
 | 
			
		||||
        # Single 1680x1050
 | 
			
		||||
        elif qtile_width == 1680 and qtile_height == 1050:
 | 
			
		||||
            cls.screen_kwargs = [{'x': 0, 'y': 0, 'width': 1680, 'height': 1050}]
 | 
			
		||||
        # Else, set to autoconfigure
 | 
			
		||||
        else:
 | 
			
		||||
            cls.screen_kwargs = []
 | 
			
		||||
            # {'x': 0, 'y': 0, 'width': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'height': int(os.getenv("QTILE_HEIGHT", "1080"))},
 | 
			
		||||
            # {'x': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'y': 0, 'width': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'height': int(os.getenv("QTILE_HEIGHT", "1080"))},
 | 
			
		||||
 | 
			
		||||
        logger.warning(f"Kwargs: {cls.screen_kwargs}")
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue