from kuro.base import BaseConfig


# Config variables used in the main configuration
class Config(BaseConfig):
    # Show debug bar and messages
    debug = False
    verbose = False

    # Colors
    foreground = "#ffffff"
    background = "#000000"
    highlight = "#1793d0"
    inactive_light = "#777777"
    inactive_dark = "#333333"

    # Predefined commands
    cmd_brightness_up = "sudo /usr/bin/xbacklight -inc 10"
    cmd_brightness_down = "sudo /usr/bin/xbacklight -dec 10"
    cmd_screenshot = "/home/kevin/bin/screenshot.sh"
    cmd_alt_screenshot = "/home/kevin/bin/screenshot.sh"

    app_terminal = "terminator"
    web_browser = "firefox"
    file_manager = "thunar"
    app_launcher = "wofi --show drun,run"
    lock_command = "bash /home/kevin/bin/lock.sh"
    cliphistory_command = "/home/kevin/bin/cliphistory.sh"

    # 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 = [
        # ["ulauncher", "--hide-window", "--no-window-shadow"],  # App launcher background daemon
        ["mako"],                       # Notification daemon
        ["kanshi"],                     # Display hotplug
        ["wl-paste", "--watch", "cliphist", "store"],  # Clipboard manager
        ["/usr/lib/kdeconnectd"],       # KDE Connect daemon
        ["kdeconnect-indicator"],       # KDE Connect tray
        ["vorta"],                      # Vorta backup scheduler
    ]

    # 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_monitor_mode_3s144 = "bash /home/kevin/.screenlayout/3scrns_144_rrot.sh"
    cmd_monitor_mode_3s60 = "bash /home/kevin/.screenlayout/3scrns_60_rrot.sh"
    cmd_monitor_mode_day = "bash /home/kevin/bin/monitor_day.sh"
    cmd_monitor_mode_night = "bash /home/kevin/bin/monitor_night.sh"
    cmd_monitor_mode_alt = "bash /home/kevin/bin/monitor_gamenight.sh"
    cmd_reconfigure_screens = "kanshictl reload"

    # Commands
    wallpaper_config_command = "/bin/true"

    # Images
    desktop_bg = "/home/kevin/Pictures/wallpapers/desktop.png"
    desktop_bg_folder = "/home/kevin/Pictures/wallpapers/desktop_rotation"
    # 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 = "wlp3s0"
    wifi_theme_path = "/home/kevin/.config/qtile/kuro/resources/wifi"
    wifi_update_interval = 5
    wired_interface = "enp4s0"

    # 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_sink = "alsa_output.usb-CSCTEK_USB_Audio_and_HID_A34004801402-00.analog-stereo"
    volume_pulse_sink2 = None

    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

    # Comma-separated list of ignored players in the media widget
    media_ignore_players = "kdeconnect"