syntax = "proto3";

option java_package = "de.mm20.launcher2.preferences";
option java_multiple_files = true;

message Settings {
  uint32 version = 1;
  message AppearanceSettings {
    enum Theme {
      Light = 0;
      Dark = 1;
      System = 2;
    }
    Theme theme = 1;
    enum ColorScheme {
      Default = 0;
      BlackAndWhite = 1;
      DebugMaterialYouCompat = 2;
      Custom = 3;
      EasterEgg = 4;
    }
    ColorScheme color_scheme = 6;
    message CustomColors {
      bool advanced_mode = 1;
      message BaseColors {
        uint32 accent1 = 1;
        uint32 accent2 = 2;
        uint32 accent3 = 3;
        uint32 neutral1 = 4;
        uint32 neutral2 = 5;
        uint32 error = 6;
      }
      BaseColors base_colors = 2;
      message Scheme {
        uint32 primary = 1;
        uint32 on_primary = 2;
        uint32 primary_container = 3;
        uint32 on_primary_container = 4;
        uint32 secondary = 5;
        uint32 on_secondary = 6;
        uint32 secondary_container = 7;
        uint32 on_secondary_container = 8;
        uint32 tertiary = 9;
        uint32 on_tertiary = 10;
        uint32 tertiary_container = 11;
        uint32 on_tertiary_container = 12;
        uint32 background = 13;
        uint32 on_background = 14;
        uint32 surface = 15;
        uint32 on_surface = 16;
        uint32 surface_variant = 17;
        uint32 on_surface_variant = 18;
        uint32 outline = 19;
        uint32 inverse_surface = 20;
        uint32 inverse_on_surface = 21;
        uint32 inverse_primary = 22;
        uint32 error = 23;
        uint32 on_error = 24;
        uint32 error_container = 25;
        uint32 on_error_container = 26;
        uint32 outline_variant = 27;
        uint32 scrim = 28;
        uint32 surface_tint = 29;
      }
      Scheme light_scheme = 3;
      Scheme dark_scheme = 4;
    }
    CustomColors custom_colors = 8;
    bool dim_wallpaper = 7;

    /**
     * Deprecated, use layout instead
     */
    LayoutSettings.Layout layout = 9 [deprecated = true];

    enum Font {
      Outfit = 0;
      SystemDefault = 1;
    }
    Font font = 10;

    bool blur_wallpaper = 11;
  }
  AppearanceSettings appearance = 2;

  message WeatherSettings {
    enum WeatherProvider {
      MetNo = 0;
      OpenWeatherMap = 1;
      Here = 2;
      BrightSky = 3;
    }
    WeatherProvider provider = 1;
    bool imperial_units = 2;
  }
  WeatherSettings weather = 5;

  message MusicWidgetSettings {
    bool filter_sources = 1;
  }
  MusicWidgetSettings music_widget = 6;

  message ClockWidgetSettings {
    enum ClockWidgetLayout {
      Vertical = 0;
      Horizontal = 1;
    }
    ClockWidgetLayout layout = 1;
    enum ClockStyle {
      DigitalClock1 = 0;
      DigitalClock2 = 1;
      OrbitClock = 5;
      BinaryClock = 2;
      AnalogClock = 3;
      EmptyClock = 4;
    }
    ClockStyle clock_style = 2;
    bool date_part = 3;
    bool music_part = 4;
    bool battery_part = 5;
    bool alarm_part = 6;
    bool favorites_part = 7;
    bool fill_height = 8;

    enum ClockWidgetColors {
      Auto = 0;
      Light = 1;
      Dark = 2;
    }
    ClockWidgetColors color = 9;
  }
  ClockWidgetSettings clock_widget = 7;

  message FavoritesSettings {
    bool enabled = 1;
    bool frequently_used = 2;
    int32 frequently_used_rows = 3;
    bool edit_button = 4;
  }
  FavoritesSettings favorites = 8;

  message FilesSearchSettings {
    bool local_files = 1;
    bool gdrive = 2;
    bool onedrive = 3;
    bool nextcloud = 4;
    bool owncloud = 5;
  }
  FilesSearchSettings file_search = 9;

  message ContactsSearchSettings {
    bool enabled = 1;
  }
  ContactsSearchSettings contacts_search = 10;

  message CalendarSearchSettings {
    bool enabled = 1;
  }
  CalendarSearchSettings calendar_search = 11;

  message CalculatorSearchSettings {
    bool enabled = 1;
  }
  CalculatorSearchSettings calculator_search = 12;

  message UnitConverterSearchSettings {
    bool enabled = 1;
    bool currencies = 2;
  }
  UnitConverterSearchSettings unit_converter_search = 13;

  message WikipediaSearchSettings {
    bool enabled = 1;
    bool images = 2;
    string custom_url = 3;
  }
  WikipediaSearchSettings wikipedia_search = 14;

  message WebsiteSearchSettings {
    bool enabled = 1;
  }
  WebsiteSearchSettings website_search = 15;

  message WebSearchSettings {
    bool enabled = 1;
  }
  WebSearchSettings web_search = 16;

  message CalendarWidgetSettings {
    bool hide_allday_events = 1;
    repeated int64 exclude_calendars = 2;
  }
  CalendarWidgetSettings calendar_widget = 17;

  message BadgeSettings {
    bool notifications = 1;
    bool suspended_apps = 2;
    bool cloud_files = 3;
    bool shortcuts = 4;
  }
  BadgeSettings badges = 18;

  message GridSettings {
    uint32 column_count = 1;
    uint32 icon_size = 2;
    bool show_labels = 3;
  }
  GridSettings grid = 19;

  message SearchBarSettings {
    enum SearchBarStyle {
      Transparent = 0;
      Solid = 1;
      Hidden = 2;
    }
    SearchBarStyle search_bar_style = 1;
    bool auto_focus = 2;
    enum SearchBarColors {
      Auto = 0;
      Light = 1;
      Dark = 2;
    }
    SearchBarColors color = 3;
  }
  SearchBarSettings search_bar = 20;

  message IconSettings {
    enum IconShape {
      PlatformDefault = 0;
      Circle = 1;
      Square = 2;
      RoundedSquare = 3;
      Triangle = 4;
      Squircle = 5;
      Hexagon = 6;
      Pentagon = 7;
      EasterEgg = 8;
      Teardrop = 9;
      Pebble = 10;
    }
    IconShape shape = 1;
    bool themed_icons = 2;
    string icon_pack = 3;
    reserved 4;
    bool adaptify = 5;
    bool force_themed = 6;
  }
  IconSettings icons = 21;

  bool easter_egg = 22;

  message SystemBarsSettings {
    enum SystemBarColors {
      // Light icons
      Auto = 0;
      // Dark icons
      Dark = 1;
      // Wallpaper based
      Light = 2;
    }
    SystemBarColors statusBarColor = 1;
    SystemBarColors navBarColor = 2;
    bool hideStatusBar = 3;
    bool hideNavBar = 4;
  }
  SystemBarsSettings system_bars = 23;

  message CardSettings {
    float opacity = 1;
    uint32 radius = 2;
    uint32 border_width = 3;
    Shape shape = 4;
    enum Shape {
      Rounded = 0;
      Cut = 1;
    }
  }
  CardSettings cards = 24;

  message AppShortcutSearchSettings {
    bool enabled = 1;
  }
  AppShortcutSearchSettings app_shortcut_search = 25;

  message WidgetSettings {
    bool edit_button = 1;
  }
  WidgetSettings widgets = 26;

  message LayoutSettings {
    enum Layout {
      PullDown = 0;
      Pager = 1;
      PagerReversed = 2;
    }

    Layout base_layout = 1;
    bool bottom_search_bar = 2;
    bool reverse_search_results = 3;
  }
  LayoutSettings layout = 27;

  message GestureSettings {
    enum GestureAction {
      None = 0;
      OpenSearch = 1;
      OpenNotificationDrawer = 2;
      LockScreen = 3;
      OpenQuickSettings = 4;
      OpenRecents = 5;
      OpenPowerDialog = 6;
    }
    GestureAction swipe_down = 1;
    GestureAction swipe_left = 2;
    GestureAction swipe_right = 3;
    GestureAction double_tap = 4;
    GestureAction long_press = 5;
  }
  GestureSettings gestures = 28;
}