kuro-qtile-theme/kuro/config/__init__.py

268 lines
8.8 KiB
Python

from kuro.base import BaseConfig
from libqtile.log_utils import logger
from libqtile.lazy import lazy
# Config variables used in the main configuration
class Config(BaseConfig):
config_name = "KuroGeneral"
# Show debug bar and messages
debug = False
verbose = False
# General variables
homedir = "/home/kevin"
use_fake_screens = False
# Screen configs (empty = autoconfig, otherwise list of Screen() kwarg dicts)
screen_kwargs = []
# Colors
foreground = "#ffffff"
background = "#000000"
highlight = "#1793d0"
inactive_light = "#777777"
inactive_dark = "#333333"
# Predefined commands
cmd_screenshot = "/home/kevin/bin/screenshot.sh"
cmd_alt_screenshot = "/home/kevin/bin/screenshot.sh"
lock_command = "bash /home/kevin/bin/lock.sh"
cliphistory_command = "/home/kevin/bin/cliphistory.sh"
# Default Applications
app_terminal = "terminator"
app_launcher = "wofi --show run,drun"
app_launcer_x11 = "/home/kevin/bin/dmenu_wal.sh"
file_manager = "thunar"
visualizer_app = "glava"
web_browser = "firefox"
network_config = None
# Group definitions
groups = [
{'name': ''},
{'name': ''},
{'name': ''},
{'name': ''},
{'name': ''},
{'name': ''},
{'name': ''},
{'name': ''},
{'name': ''},
{'name': '', 'layout': 'floating', 'options': {'border_focus': '#990000', 'border_normal': '#440000'}}
]
# Extra keybind definitions
extra_keys = [
# Display modes
{'modifiers': ['mod'], 'key': "Prior", 'action': lazy.spawn("bash /home/kevin/.screenlayout/3scrns_144_rrot.sh")},
{'modifiers': ['mod'], 'key': "Next", 'action': lazy.spawn("bash /home/kevin/.screenlayout/3scrns_60_rrot.sh")},
{'modifiers': ['mod'], 'key': "Home", 'action': lazy.spawn("bash /home/kevin/bin/monitor_day.sh")},
{'modifiers': ['mod'], 'key': "End", 'action': lazy.spawn("bash /home/kevin/bin/monitor_night.sh")},
{'modifiers': ['mod'], 'key': "Insert", 'action': lazy.spawn("bash /home/kevin/bin/monitor_gamenight.sh")},
# Backlight keys
{'modifiers': [], 'key': "XF86MonBrightnessUp", 'action': lazy.spawn("sudo /usr/bin/xbacklight -inc 10")},
{'modifiers': [], 'key': "XF86MonBrightnessDown", 'action': lazy.spawn("sudo /usr/bin/xbacklight -dec 10")},
]
# Extra floating window rules
extra_float_rules = [
# Wine Origin game launcher
{'title': 'origin.exe', 'wm_class': 'Wine'},
# Homebank popups
{'title': 'Add transaction', 'wm_class': 'homebank'},
{'title': 'Edit transaction', 'wm_class': 'homebank'},
{'title': 'Inherit transaction', 'wm_class': 'homebank'},
{'title': 'Multiple edit transactions', 'wm_class': 'homebank'},
{'title': 'Transaction splits', 'wm_class': 'homebank'},
]
# Autostart applications
apps_autostart_group = [
{'group': "", 'command': ["firefox"]},
{'group': "", 'command': ["terminator"]},
{'group': "", 'command': ["/usr/bin/rambox"]},
{'group': "", 'command': ["thunar"]},
{'group': "", 'command': ["thunderbird"]},
{'group': "", 'command': ["spotify"]},
]
apps_autostart = {
'common': [
["/usr/lib/kdeconnectd"], # KDE Connect daemon
["kdeconnect-indicator"], # KDE Connect tray
["vorta"], # Vorta backup scheduler
],
'x11': [
["dunst"], # Notification daemon
["picom", "-b"], # Compositor
["xfce4-clipman"], # Clipboard manager
["xiccd"], # Color profile manager
],
'wayland': [
["mako"], # Notification daemon
["wl-paste", "--watch", "cliphist", "store"], # Clipboard manager
["kanshi"], # Display hotplugging
]
}
# Keyboard commands
cmd_media_play = "playerctl -i kdeconnect play-pause"
cmd_media_next = "playerctl -i kdeconnect next"
cmd_media_mute = "pamixer -t"
cmd_media_volume_down = "pamixer -i 2"
cmd_media_volume_up = "pamixer -d 2"
# Display mode commands
cmd_reconfigure_screens = "kanshictl reload"
cmd_wal = ["wallust", "run"]
# Commands
x11_wallpaper_config_command = "/home/kevin/bin/wal-nitrogen-noupdate" # TODO: Remove
# Images
desktop_bg = "/home/kevin/Pictures/wallpapers/desktop.png"
desktop_bg_folder = "/home/kevin/Pictures/wallpapers/desktop_rotation/day"
desktop_bg_night_folder = "/home/kevin/Pictures/wallpapers/desktop_rotation/night"
# desktop_bg_override = "/home/kevin/Pictures/safe_wallpaper.jpg"
applauncher_image = "/home/kevin/.config/qtile/kuro/resources/arch.png"
custom_layout_icon_paths = ['/home/kevin/.config/qtile/kuro/resources/layout_icons/']
glava_color_file_path = "/home/kevin/.config/glava/kurobars_color.glsl"
# Fonts
font_default = "Noto Sans"
font_topbar = "Noto Sans"
font_clock = "Noto Sans"
font_titlebar = "Noto Sans"
# Font sizes
fontsize_default = 11
fontsize_topbar = 11
fontsize_clock = 11
fontsize_titlebar = 11
# Sizes
width_border = 1
margin_layout = 8
width_spacer = 1
padding_spacer = 4
grow_amount = 5
width_zoomy_column = 300
# Colours
colour_border_normal = inactive_dark
colour_border_focus = foreground
colour_border_urgent = highlight
colour_spacer_background = inactive_light
# Bar variables
bar_background = background
bar_rgba_opacity = "AA"
bar_opacity = 1.0
bar_hover_opacity = 1
# Groupbox variables
font_groupbox = "Font Awesome 5 Pro"
fontsize_groupbox = 15
width_groupbox_border = 1
height_groupbox = 24
margin_groupbox = 0
bool_groupbox_disable_drag = True
bool_groupbox_rounded_borders = True
colour_groupbox_border_normal = inactive_dark
colour_groupbox_border_focus = foreground
colour_groupbox_icon_active = foreground
colour_groupbox_icon_inactive = inactive_light
# Tasklist variables
tasklist_border = foreground
tasklist_urgent_border = highlight
tasklist_font = "Noto Sans"
tasklist_fontsize = 11
tasklist_rounded = False
# Thermal indicator variables
thermal_threshold = 75
thermal_sensor = "Package id 0"
thermal_chip = "coretemp-isa-0000"
# CPU graph variables
cpu_graph_colour = '#ff0000'
# Memory graph variables
mem_graph_colour = '#ff00ff'
# HDD graph variables
hdd_graph_colour = '#ffff00'
# Battery variables
battery_theme_path = "/home/kevin/.config/qtile/kuro/resources/battery"
battery_update_delay = 5
# Network variables
wifi_interface = "wifi0"
wifi_theme_path = "/home/kevin/.config/qtile/kuro/resources/wifi"
wifi_update_interval = 5
wired_interface = "eth0"
# GPU variables
gpu_theme_path = "/home/kevin/.config/qtile/kuro/resources/gpu"
# Normal volume icon variables
volume_font = "Noto Sans"
volume_fontsize = 11
volume_theme_path = "/home/kevin/.config/qtile/kuro/resources/volume"
volume_pulse_sinks = []
volume_is_bluetooth_icon = False
volume_update_interval = 0.2
# Bluetooth volume icon variables
bluevol_font = "Noto Sans"
bluevol_fontsize = 11
bluevol_theme_path = "/home/kevin/.config/qtile/kuro/resources/bluetooth_volume"
bluevol_get_command = "pamixer --sink {bsink} --get-volume".split()
bluevol_mute_command = "pamixer --sink {bsink} -t".split()
bluevol_up_command = "pamixer --sink {bsink} -i 2".split()
bluevol_down_command = "pamixer --sink {bsink} -d 2".split()
bluevol_is_bluetooth_icon = True
bluevol_update_interval = 0.2
# CheckUpdates variables
updates_display_format = "{updates}"
updates_execute_command = "terminator -e 'echo Updating\ via\ yay...; yay'"
updates_colour_available = '#f4d742'
# Screen organization
laptop_screen_nvidia = "eDP-1-1"
laptop_screen_intel = "eDP1"
# Show audio visualizer
show_audio_visualizer = False
kill_unnecessary_glava_processes = True
# Show thermal widget
show_temperature = True
# Show GPU widget
show_gpu_widget = False
# Show battery widget
show_battery_widget = False
# Show media widget
show_media_widget = True
# Comma-separated list of ignored players in the media widget
media_ignore_players = "kdeconnect"
@classmethod
def initialize(cls, qtile):
# Can do extra initialization based on qtile instance here
super(Config, cls).initialize(qtile=qtile)
# Replace some apps if launched in X11 mode
if qtile.core.name == "x11":
logger.warning("Launched in X11 mode, overriding some apps in Config to xorg-variants.")
cls.app_launcher = cls.app_launcer_x11