menu "Application"
    config POI_NAME
        string "Application name"
        default "smolbote"
    config POI_ICON
        string "Path to icon"
        default ":/icons/poi.svg"
    config POI_CFG_PATH
        string "Configuration location"
        default "~/.config/smolbote/smolbote.cfg"
endmenu

menu "Keyboard shortcuts"
    comment "Main Window shortcuts"
    config shortcuts.session.save
        string "Save Session shortcut"
        default "Ctrl+S,S"
    config shortcuts.session.open
        string "Load Session shortcut"
        default "Ctrl+S,O"
    config shortcuts.window.newgroup
        string "New Group shortcut"
        default "Ctrl+G"
    config shortcuts.window.newwindow
        string "New Window shortcut"
        default "Ctrl+N"
    config shortcuts.window.about
        string "Show About Dialog"
        default "F1"
    config shortcuts.window.quit
        string "Quit shortcut"
        default "Ctrl+Q"
    config shortcuts.window.search
        string "Show or hide search box"
        default "F3"
    config shortcuts.window.downloads.show
        string "Show downloads dialog in this window"
        default "Ctrl+D"

    comment "Navigation Bar shortcuts"
    config navigationbar.show
        string "Toggle navigation bar"
        default "Ctrl+Shift+N"
    config shortcuts.navigation.back
        string "Go back in history"
        default "Ctrl+Left"
    config shortcuts.navigation.backmenu
        string "Show Back history menu"
        default "Ctrl+Down"
    config shortcuts.navigation.forward
        string "Go forward in history"
        default "Ctrl+Right"
    config shortcuts.navigation.forwardmenu
        string "Show Forward history menu"
        default "Ctrl+Up"
    config shortcuts.navigation.refresh
        string "Refresh the page"
        default "F5"
    config shortcuts.navigation.reload
        string "Reload the page"
        default "Ctrl+F5"
    config shortcuts.navigation.home
        string "Load homepage"
        default "Ctrl+Home"

    comment "Address Bar shortcuts"
    config shortcuts.address.focus
        string "Focus the Address Bar"
        default "F4"
    config shortcuts.address.menu
        string "Show Address Bar menu"
        default "F2"

    comment "Subwindow shortcuts"
    config shortcuts.subwindow.close
        string "Close Subwindow shortcut"
        default "Ctrl+Shift+W"
    config shortcuts.subwindow.fullscreen
        string "Make current subwindow fullscreen"
        default "F11"
    config shortcuts.subwindow.newtab
        string "Create new tab"
        default "Ctrl+T"
    config shortcuts.subwindow.closetab
        string "Close current tab"
        default "Ctrl+W"
    config shortcuts.subwindow.restoretab
        string "Restore last closed tab"
        default "Ctrl+Shift+T"
    config shortcuts.subwindow.tableft
        string "Switch to the tab on the left"
        default "Ctrl+O"
    config shortcuts.subwindow.movetableft
        string "Move tab to the left"
        default "Ctrl+Shift+O"
    config shortcuts.subwindow.tabright
        string "Switch to the tab on the right"
        default "Ctrl+P"
    config shortcuts.subwindow.movetabright
        string "Move tab to the right"
        default "Ctrl+Shift+P"

endmenu

menu "Main Window"
    config mainwindow.title
        string "Main window title"
        default "smolbote"
    config mainwindow.width
        int "Main window width"
        default 1280
    config mainwindow.height
        int "Main window height"
        default 720
endmenu

menu "Bookmarks"
    config bookmarks.path
        string "Bookmarks location"
        default "~/.config/smolbote/bookmarks.xbel"
    config shortcuts.window.bookmarks.show
        string "Show bookmarks dialog in this window"
        default "Ctrl+B"
    config bookmarks.toolbar.show
        string "Toggle bookmarks toolbar visibility"
        default "Ctrl+Shift+B"
    config bookmarks.toolbar.movable
        bool "Default bookmarks toolbar movable"
        default n
    config bookmarks.toolbar.visible
        bool "Default bookmarks toolbar visibility"
        default n
endmenu

menu "Profile Settings"
    config profile.path
        string "Profile load location"
        default "~/.config/smolbote/profiles.d"
    config profile.default
        string "Default profile"
        default ""
    config profile.search
        string "Search engine"
        default "https://duckduckgo.com/?q=%1&ia=web"
    config profile.homepage
        string "Homepage"
        default "about:blank"
    config profile.newtab
        string "New tab page"
        default "about:blank"
endmenu

config USEPLUGINS
    bool "Enable plugins"
    default y

menu "Plugin Settings"
    depends on USEPLUGINS
    config PLUGINS_PATH
        string "Plugin load location"
        default "~/.config/smolbote/plugins.d"
    choice PLUGINS_SIGNATURE_CHECK
        bool "Plugin Signature enforcement"
        default PLUGINS_SIGNATURE_CHECKED
        config PLUGINS_SIGNATURE_IGNORED
            bool "Don't check plugin signatures"
        config PLUGINS_SIGNATURE_CHECKED
            bool "Don't load plugins with invalid signatures"
        config PLUGINS_SIGNATURE_ENFORCED
            bool "Only load plugins with valid signatures"
    endchoice
    config PLUGINS_SIGNATURE_HASH
        string "Hashing algorithm used by the signature"
        default "SHA256"
endmenu

comment "Default paths"
config filter.path
    string "Host filter path"
    default "~/.config/smolbote/hosts.d"
config downloads.path
    string "Downloads location"
    default "~/Downloads"
config session.path
    string "Session location"
    default "~/.config/smolbote/session.d"

config USEPLASMA
    bool "Enable KDE Frameworks integration"
    default n

menu "KDE Integration"
    depends on USEPLASMA

    config PLASMA_BLUR
        bool "Enable translucent background and blur behind window"
        default n

    config WALLET_FOLDER
        string "KDE Wallet folder name"
        default "smolbote"
endmenu

config USEBREAKPAD
    bool "Enable Breakpad integration"
    default n

menu "Breakpad Integration"
    depends on USEBREAKPAD

    config PATH_CRASHDUMP
        string "Crash dump location"
        default "~/.config/smolbote/crash.d"

    config PATH_CRASHHANDLER
        string "Crash handler location"
        default "poi-crash"
endmenu

menu "Workarounds"
    config QTBUG_65223
        bool "Manually emit loadFinished"
        default y
        help
            See QTBUG-65223: loadStarted is emitted twice when loading link with anchor
endmenu