<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2023 Christian Hergert

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  SPDX-License-Identifier: GPL-3.0-or-later
-->
<schemalist gettext-domain="ptyxis">

  <enum id="org.gnome.Ptyxis.CjkAmbiguousWidth">
    <value nick="narrow" value="1"/>
    <value nick="wide" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.CursorBlinkMode">
    <value nick="system" value="0"/>
    <value nick="on" value="1"/>
    <value nick="off" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.CursorShape">
    <value nick="block" value="0"/>
    <value nick="ibeam" value="1"/>
    <value nick="underline" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.EraseBinding">
    <value nick="auto" value="0"/>
    <value nick="ascii-backspace" value="1"/>
    <value nick="ascii-delete" value="2"/>
    <value nick="delete-sequence" value="3"/>
    <value nick="tty" value="4"/>
  </enum>

  <enum id="org.gnome.Ptyxis.ExitAction">
    <value nick="none" value="0"/>
    <value nick="restart" value="1"/>
    <value nick="close" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.InterfaceStyle">
    <!-- ADW_COLOR_SCHEME_DFEAULT -->
    <value nick="system" value="0"/>
    <!-- ADW_COLOR_SCHEME_FORCE_LIGHT -->
    <value nick="light" value="1"/>
    <!-- ADW_COLOR_SCHEME_FORCE_DARK -->
    <value nick="dark" value="4"/>
  </enum>

  <enum id="org.gnome.Ptyxis.PreserveContainer">
    <value nick="never" value="0"/>
    <value nick="always" value="1"/>
  </enum>

  <enum id="org.gnome.Ptyxis.PreserveDirectory">
    <value nick="never" value="0"/>
    <value nick="safe" value="1"/>
    <value nick="always" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.NewTabPosition">
    <value nick="last" value="0"/>
    <value nick="next" value="1"/>
  </enum>

  <enum id="org.gnome.Ptyxis.ScrollbarPolicy">
    <value nick="never" value="0"/>
    <value nick="system" value="1"/>
    <value nick="always" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.TabMiddleClickBehavior">
    <value nick="close" value="0"/>
    <value nick="paste" value="1"/>
    <value nick="nothing" value="2"/>
  </enum>

  <enum id="org.gnome.Ptyxis.TextBlinkMode">
    <value nick="never" value="0"/>
    <value nick="focused" value="1"/>
    <value nick="unfocused" value="2"/>
    <value nick="always" value="3"/>
  </enum>

  <schema id="org.gnome.Ptyxis" path="/org/gnome/Ptyxis/">

    <key name="default-profile-uuid" type="s">
      <default>''</default>
      <summary>Default Profile UUID</summary>
      <description>The UUID of the default profile</description>
    </key>

    <key name="profile-uuids" type="as">
      <default>[]</default>
      <summary>UUIDs of all Profiles</summary>
      <description>A list of UUID for every profile</description>
    </key>

    <key name="new-tab-position" enum="org.gnome.Ptyxis.NewTabPosition">
      <default>'last'</default>
      <summary>New Tab Position</summary>
      <description>Where to place new tabs</description>
    </key>

    <key name="audible-bell" type="b">
      <default>true</default>
      <summary>Audible Bell</summary>
      <description>If an audible bell should be used</description>
    </key>

    <key name="visual-bell" type="b">
      <default>true</default>
      <summary>Visible Bell</summary>
      <description>If a visual bell should be used</description>
    </key>

    <key name="visual-process-leader" type="b">
      <default>true</default>
      <summary>Visual Process Leader</summary>
      <description>Display a visual window highlight when process leader is SSH, sudo, or other specialized tooling</description>
    </key>

    <key name="use-system-font" type="b">
      <default>true</default>
      <summary>Use System Font</summary>
      <description>If the default system monospace font should be used</description>
    </key>

    <key name="font-name" type="s">
      <default>'Monospace 10'</default>
      <summary>Font Name</summary>
      <description>The font description to use if use-system-font is set to False</description>
    </key>

    <key name="cursor-shape" enum="org.gnome.Ptyxis.CursorShape">
      <default>'block'</default>
      <summary>Cursor Shape</summary>
      <description>The default shape of the cursor</description>
    </key>

    <key name="cursor-blink-mode" enum="org.gnome.Ptyxis.CursorBlinkMode">
      <default>'system'</default>
      <summary>Cursor Blink Mode</summary>
      <description>The default blink mode cursor</description>
    </key>

    <key name="word-char-exceptions" type="ms">
      <default>nothing</default>
      <summary>List of punctuation characters that are treated as word characters</summary>
      <description>By default, when doing word-wise selection, most punctuation breaks up word boundaries. This list of exceptions will instead be treated as part of the word.</description>
    </key>

    <key name="scrollbar-policy" enum="org.gnome.Ptyxis.ScrollbarPolicy">
      <default>'system'</default>
      <summary>Scrollbar Policy</summary>
      <description>If scrollbars should be displayed</description>
    </key>

    <key name="tab-middle-click" enum="org.gnome.Ptyxis.TabMiddleClickBehavior">
      <default>'close'</default>
    </key>

    <key name="text-blink-mode" enum="org.gnome.Ptyxis.TextBlinkMode">
      <default>'always'</default>
      <summary>Text Blink Mode</summary>
      <description>When text blinking is allowed</description>
    </key>

    <key name="interface-style" enum="org.gnome.Ptyxis.InterfaceStyle">
      <default>'dark'</default>
      <summary>Interface Style</summary>
      <description>If light or dark interface style should be used</description>
    </key>

    <key name="restore-session" type="b">
      <default>true</default>
      <summary>Restore Session</summary>
      <description>Restore tabs from previous session when starting Ptyxis</description>
    </key>

    <key name="restore-window-size" type="b">
      <default>true</default>
      <summary>Restore Window Size</summary>
      <description>Restore the previous window size when creating new windows</description>
    </key>

    <key name="window-size" type="(uu)">
      <default>(0,0)</default>
    </key>

    <key name="default-columns" type="u">
      <default>80</default>
      <range min="1" max="65535"/>
      <summary>Default Column Size</summary>
      <description>Default window size when restore-window-size is not true.</description>
    </key>

    <key name="default-rows" type="u">
      <default>24</default>
      <range min="1" max="65535"/>
      <summary>Default Row Size</summary>
      <description>Default window size when restore-window-size is not true.</description>
    </key>

    <key name="toast-on-copy-clipboard" type="b">
      <default>true</default>
      <summary>Toast on Copy Clipboard</summary>
      <description>Show the user when text has copied to the clipboard.</description>
    </key>

    <key name="enable-a11y" type="b">
      <default>false</default>
      <summary>Enable Accessibility</summary>
      <description>Currently experimental feature to send accessibility information to screen readers.</description>
    </key>

    <key name="disable-padding" type="b">
      <default>false</default>
      <summary>Disable Padding around Terminal Emulator</summary>
      <description>Do not pad around the terminal emulator widget. Setting to true may have significant performance impacts.</description>
    </key>

    <key name="prompt-on-close" type="b">
      <default>true</default>
      <summary>Prompt when active tab is closed</summary>
      <description>If a tab (or window) is closed with active foreground processes, prompt the user for confirmation.</description>
    </key>

    <key name="ignore-osc-title" type="b">
      <default>false</default>
      <!-- Translators: OSC stands for "Operating System Command" and is referencing in-band escape sequences from the child process to set the title -->
      <summary>Ignore OSC Title</summary>
      <description>If OSC title should be ignored in tab titles.</description>
    </key>

  </schema>

  <schema id="org.gnome.Ptyxis.Profile">

    <key name="label" type="s">
      <default>''</default>
      <summary>Label</summary>
      <description>The label for the profile</description>
    </key>

    <key name="login-shell" type="b">
      <default>false</default>
      <summary>Login Shell</summary>
      <description>Use a login shell</description>
    </key>

    <key name="limit-scrollback" type="b">
      <default>true</default>
      <summary>Limit Scrollback</summary>
      <description>Limit the number of lines to keep for scrollback</description>
    </key>

    <key name="scrollback-lines" type="i">
      <default>10000</default>
      <range min="0" max="2147483647"/>
      <summary>Scrollback Lines</summary>
      <description>The number of lines to keep in the scrollback, zero for no scrollback</description>
    </key>

    <key name="scroll-on-output" type="b">
      <default>false</default>
      <summary>Scroll on Output</summary>
      <description>Scroll to the bottom upon new output</description>
    </key>

    <key name="scroll-on-keystroke" type="b">
      <default>true</default>
      <summary>Scroll on Keystroke</summary>
      <description>Scroll to the bottom upon user keystroke</description>
    </key>

    <key name="use-custom-command" type="b">
      <default>false</default>
      <summary>Use Custom Command</summary>
      <description>If a custom command should be used</description>
    </key>

    <key name="use-proxy" type="b">
      <default>true</default>
      <summary>Use Proxy</summary>
      <description>Apply proxy settings from the host in the container</description>
    </key>

    <key name="custom-command" type="s">
      <default>''</default>
      <summary>Custom Command</summary>
      <description>A custom command for the shell</description>
    </key>

    <key name="default-container" type="s">
      <default>'session'</default>
      <summary>Default Container</summary>
      <description>The default container to run the command in</description>
    </key>

    <key name="preserve-container" enum="org.gnome.Ptyxis.PreserveContainer">
      <default>'always'</default>
      <summary>Preserve Container</summary>
      <description>Preserve the active container when creating new tabs and windows</description>
    </key>

    <key name="exit-action" enum="org.gnome.Ptyxis.ExitAction">
      <default>'close'</default>
      <summary>Exit Action</summary>
      <description>The action to take when the shell exits</description>
    </key>

    <key name="preserve-directory" enum="org.gnome.Ptyxis.PreserveDirectory">
      <default>'safe'</default>
      <summary>Preserve Directory</summary>
      <description>If the directory should be preserved for new terminals</description>
    </key>

    <key name="palette" type="s">
      <default>'gnome'</default>
      <summary>Palette</summary>
      <description>The color palette to use for the profile, by name</description>
    </key>

    <key name="opacity" type="d">
      <range min="0" max="1"/>
      <default>1</default>
      <summary>Opacity</summary>
      <description>The opacity of the palette background</description>
    </key>

    <key name="bold-is-bright" type="b">
      <default>false</default>
      <summary>Bold is Bright</summary>
      <description>Setting bold on one of the lower 8 colors in the palette will use bright variant (upper 8 colors)</description>
    </key>

    <key name="cell-height-scale" type="d">
      <default>1.0</default>
      <range min="1.0" max="2.0"/>
      <summary>Line Spacing</summary>
      <description>The terminal’s cell height scale</description>
    </key>

    <key name="cjk-ambiguous-width" enum="org.gnome.Ptyxis.CjkAmbiguousWidth">
      <default>'narrow'</default>
      <summary>CJK Ambiguous Width</summary>
      <description>The size to apply to ambiguous width characters</description>
    </key>

    <key name="backspace-binding" enum="org.gnome.Ptyxis.EraseBinding">
      <default>'ascii-delete'</default>
      <summary>Backspace Binding</summary>
      <description>What to send to the PTY when a backspace is entered</description>
    </key>

    <key name="delete-binding" enum="org.gnome.Ptyxis.EraseBinding">
      <default>'delete-sequence'</default>
      <summary>Backspace Binding</summary>
      <description>What to send to the PTY when a backspace is entered</description>
    </key>

    <key name="custom-links" type="a(ss)">
      <default>[]</default>
      <summary>Custom Links</summary>
      <description>A list of custom hyperlinks, each defined by a regular expression matching the text, and a replacement pattern</description>
    </key>

  </schema>

  <schema id="org.gnome.Ptyxis.Shortcuts" path="/org/gnome/Ptyxis/Shortcuts/">

    <key name="copy-clipboard" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;c'</default>
      <summary>Copy to Clipboard</summary>
      <description>The shortcut to copy to clipboard</description>
    </key>

    <key name="paste-clipboard" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;v'</default>
      <summary>Paste from Clipboard</summary>
      <description>The shortcut to paste from the clipboard</description>
    </key>

    <key name="new-tab" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;t'</default>
      <summary>New Tab</summary>
      <description>The shortcut to create a new tab in the current window</description>
    </key>

    <key name="new-window" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;n'</default>
      <summary>New Window</summary>
      <description>The shortcut to create a new tab in a new window</description>
    </key>

    <key name="tab-overview" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;o'</default>
      <summary>Tab Overview</summary>
      <description>The shortcut to show the tab overview</description>
    </key>

    <key name="preferences" type="s">
      <default>'&lt;ctrl&gt;comma'</default>
      <summary>Preferences</summary>
      <description>The shortcut to show application preferences</description>
    </key>

    <key name="zoom-out" type="s">
      <default>'&lt;ctrl&gt;minus'</default>
      <summary>Zoom Out</summary>
      <description>The shortcut to zoom out</description>
    </key>

    <key name="zoom-one" type="s">
      <default>'&lt;ctrl&gt;0'</default>
      <summary>Reset Zoom</summary>
      <description>The shortcut to reset zoom</description>
    </key>

    <key name="zoom-in" type="s">
      <default>'&lt;ctrl&gt;plus'</default>
      <summary>Zoom In</summary>
      <description>The shortcut to zoom in</description>
    </key>

    <key name="toggle-fullscreen" type="s">
      <default>'F11'</default>
      <summary>Toggle Fullscreen</summary>
      <description>The shortcut to toggle fullscreen</description>
    </key>

    <key name="reset" type="s">
      <default>''</default>
      <summary>Reset Terminal</summary>
      <description>Reset the terminal state for misbehaving clients</description>
    </key>

    <key name="reset-and-clear" type="s">
      <default>''</default>
      <summary>Reset Terminal and Clear History</summary>
      <description>Reset the terminal state and clear history for misbehaving clients</description>
    </key>

    <key name="search" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;f'</default>
      <!-- Translators: Refers to searching the terminal scrollback -->
      <summary>Search History</summary>
      <description>Shortcut to begin searching the terminal history</description>
    </key>

    <key name="select-all" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;a'</default>
      <summary>Select All</summary>
      <description>Shortcut to select all the entire terminal scrollback</description>
    </key>

    <key name="select-none" type="s">
      <default>''</default>
      <summary>Select None</summary>
      <description>Shortcut to clear the terminal selection</description>
    </key>

    <key name="popup-menu" type="s">
      <default>'&lt;shift&gt;F10'</default>
      <summary>Popup Menu</summary>
      <description>Shortcut to show the popup menu for the terminal</description>
    </key>

    <key name="primary-menu" type="s">
      <default>'F10'</default>
      <summary>Primary Menu</summary>
      <description>Shortcut to show the primary menu for the window</description>
    </key>

    <key name="tab-menu" type="s">
      <default>'&lt;alt&gt;comma'</default>
      <summary>Tab Menu</summary>
      <description>Shortcut to show the new tab menu</description>
    </key>

    <key name="move-previous-tab" type="s">
      <default>'&lt;ctrl&gt;Page_Up'</default>
      <!-- Translators: in this context, "Move" means to switch tabs -->
      <summary>Move to Previous Tab</summary>
      <!-- Translators: in this context, "Move" means to switch tabs -->
      <description>Shortcut to move to the previous tab</description>
    </key>

    <key name="move-next-tab" type="s">
      <default>'&lt;ctrl&gt;Page_Down'</default>
      <!-- Translators: in this context, "Move" means to switch tabs -->
      <summary>Move to Next Tab</summary>
      <!-- Translators: in this context, "Move" means to switch tabs -->
      <description>Shortcut to move to the next tab</description>
    </key>

    <key name="move-tab-left" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;Page_Up'</default>
      <summary>Move Tab Left</summary>
      <description>Shortcut to move the current tab to the left one position</description>
    </key>

    <key name="move-tab-right" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;Page_Down'</default>
      <summary>Move Tab Right</summary>
      <description>Shortcut to move the current tab to the right one position</description>
    </key>

    <key name="detach-tab" type="s">
      <default>''</default>
      <summary>Move Tab to New Window</summary>
      <description>Shortcut to move the current tab into a new window</description>
    </key>

    <key name="close-tab" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;w'</default>
      <summary>Close Tab</summary>
      <description>Shortcut to close the current tab</description>
    </key>

    <key name="close-other-tabs" type="s">
      <default>''</default>
      <summary>Close Other Tabs</summary>
      <description>Shortcut to close all tabs in the window but the current one</description>
    </key>

    <key name="close-window" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;q'</default>
      <summary>Close Window</summary>
      <description>Shortcut to close the current window</description>
    </key>

    <key name="set-title" type="s">
      <default>''</default>
      <summary>Set Title</summary>
      <description>The shortcut to show set title</description>
    </key>

    <key name="focus-tab-1" type="s">
      <default>'&lt;alt&gt;1'</default>
      <summary>Focus Tab 1</summary>
      <description>Shortcut to focus tab 1</description>
    </key>

    <key name="focus-tab-2" type="s">
      <default>'&lt;alt&gt;2'</default>
      <summary>Focus Tab 2</summary>
      <description>Shortcut to focus tab 2</description>
    </key>

    <key name="focus-tab-3" type="s">
      <default>'&lt;alt&gt;3'</default>
      <summary>Focus Tab 3</summary>
      <description>Shortcut to focus tab 3</description>
    </key>

    <key name="focus-tab-4" type="s">
      <default>'&lt;alt&gt;4'</default>
      <summary>Focus Tab 4</summary>
      <description>Shortcut to focus tab 4</description>
    </key>

    <key name="focus-tab-5" type="s">
      <default>'&lt;alt&gt;5'</default>
      <summary>Focus Tab 5</summary>
      <description>Shortcut to focus tab 5</description>
    </key>

    <key name="focus-tab-6" type="s">
      <default>'&lt;alt&gt;6'</default>
      <summary>Focus Tab 6</summary>
      <description>Shortcut to focus tab 6</description>
    </key>

    <key name="focus-tab-7" type="s">
      <default>'&lt;alt&gt;7'</default>
      <summary>Focus Tab 7</summary>
      <description>Shortcut to focus tab 7</description>
    </key>

    <key name="focus-tab-8" type="s">
      <default>'&lt;alt&gt;8'</default>
      <summary>Focus Tab 8</summary>
      <description>Shortcut to focus tab 8</description>
    </key>

    <key name="focus-tab-9" type="s">
      <default>'&lt;alt&gt;9'</default>
      <summary>Focus Tab 9</summary>
      <description>Shortcut to focus tab 9</description>
    </key>

    <key name="focus-tab-10" type="s">
      <default>'&lt;alt&gt;0'</default>
      <summary>Focus Tab 10</summary>
      <description>Shortcut to focus tab 10</description>
    </key>

    <key name="undo-close-tab" type="s">
      <default>'&lt;ctrl&gt;&lt;shift&gt;&lt;alt&gt;t'</default>
      <summary>Undo Close Tab</summary>
      <description>Undo closing of last tab</description>
    </key>

  </schema>

</schemalist>
