Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement desktop window actions #697

Merged
merged 13 commits into from
Dec 19, 2024
Merged

Conversation

o-sdn-o
Copy link
Collaborator

@o-sdn-o o-sdn-o commented Dec 19, 2024

Changes

  • Try to fix floating point exception. New versions (0.9.99.56/7) crashes #696
  • Fix directvt protocol deadlock on unix platforms. Renaming window titles #430 (comment)
  • Implement focused window actions.
    Action Parameters Description
    AlwaysOnTopWindow none, boolean Toggle AlwaysOnTop window flag.
    WarpWindow l, r, t, b Move left, right, top, bottom window sides by corresponding integer deltas l, r, t, b.
    CloseWindow Close window.
    MinimizeWindow Minimize window.
    MaximizeWindow Maximize window.
    FullscreenWindow Make focused window fullscreen.

Default settings:

<config>
    <hotkeys>
        <desktop key*>  <!-- Desktop layer key bindings. -->
            <key="Ctrl+PageUp"   action=FocusPrevWindow/>  <!-- Switch focus to the next desktop window. -->
            <key="Ctrl+PageDown" action=FocusNextWindow/>  <!-- Switch focus to the previous desktop window. -->
            <key="Shift+F7"      action=Disconnect/>       <!-- Disconnect from the desktop. -->
            <key="F10" preview   action=TryToQuit/>        <!-- Shut down the desktop server if no applications are running. -->
            <key="Alt+Shift+N"   action=RunApplication/>   <!-- Run default application. -->
            <key=""              action=AlwaysOnTopWindow/><!-- Toggle AlwaysOnTop flag on all focused windows. -->
            <key=""              action=CloseWindow/>      <!-- Close all focused desktop windows. -->
            <key=""              action=MinimizeWindow/>   <!-- Minimize all focused desktop windows. -->
            <key="Esc+F11"       action=MaximizeWindow/>   <!-- Maximize all focused desktop windows. -->
            <key="Esc+F12"       action=FullscreenWindow/> <!-- Fullscreen the first focused desktop window. -->

            <key=""><action=WarpWindow data="0,0,0,0"/></key> <!-- Warp desktop window. The data parameter specifies four deltas for the left, right, top and bottom window sides. -->
            <key="Esc+LeftArrow">                                        <action=WarpWindow data=" 1,-1, 0, 0"/></key> <!-- Move window to the left. -->
            <key="Esc+RightArrow">                                       <action=WarpWindow data="-1, 1, 0, 0"/></key> <!-- Move window to the right. -->
            <key="Esc+UpArrow">                                          <action=WarpWindow data=" 0, 0, 1,-1"/></key> <!-- Move window up. -->
            <key="Esc+DownArrow">                                        <action=WarpWindow data=" 0, 0,-1, 1"/></key> <!-- Move window down. -->

            <key="Esc+LeftArrow+UpArrow">                                <action=WarpWindow data=" 0, 0, 0,-1"/></key> <!-- Move the bottom window side up. -->
            <key="Esc+LeftArrow+DownArrow">                              <action=WarpWindow data=" 0, 0, 0, 1"/></key> <!-- Move the bottom window side down. -->
            <key="Esc+RightArrow+UpArrow">                               <action=WarpWindow data=" 0, 0, 1, 0"/></key> <!-- Move the top window side up. -->
            <key="Esc+RightArrow+DownArrow">                             <action=WarpWindow data=" 0, 0,-1, 0"/></key> <!-- Move the top window side down. -->

            <key="Esc+UpArrow+LeftArrow">                                <action=WarpWindow data=" 1, 0, 0, 0"/></key> <!-- Move the left window side to the left. -->
            <key="Esc+UpArrow+RightArrow">                               <action=WarpWindow data="-1, 0, 0, 0"/></key> <!-- Move the left window side to the right. -->
            <key="Esc+DownArrow+RightArrow">                             <action=WarpWindow data=" 0, 1, 0, 0"/></key> <!-- Move the right window side to the right. -->
            <key="Esc+DownArrow+LeftArrow">                              <action=WarpWindow data=" 0,-1, 0, 0"/></key> <!-- Move the right window side to the left. -->

            <key="Ctrl+LeftArrow+DownArrow  | Ctrl+DownArrow+LeftArrow"> <action=WarpWindow data=" 1, 0, 0, 1"/></key> <!-- Move the left bottom corner to outside. -->
            <key="Ctrl+RightArrow+DownArrow | Ctrl+DownArrow+RightArrow"><action=WarpWindow data=" 0, 1, 0, 1"/></key> <!-- Move the right bottom corner to outside. -->
            <key="Ctrl+LeftArrow+UpArrow    | Ctrl+UpArrow+LeftArrow">   <action=WarpWindow data=" 1, 0, 1, 0"/></key> <!-- Move the left top corner to outside. -->
            <key="Ctrl+RightArrow+UpArrow   | Ctrl+UpArrow+RightArrow">  <action=WarpWindow data=" 0, 1, 1, 0"/></key> <!-- Move the right top corner to outside. -->

            <key="Alt+LeftArrow+DownArrow   | Alt+DownArrow+LeftArrow">  <action=WarpWindow data=" 0,-1,-1, 0"/></key> <!-- Move the left top corner to inside. -->
            <key="Alt+RightArrow+DownArrow  | Alt+DownArrow+RightArrow"> <action=WarpWindow data="-1, 0,-1, 0"/></key> <!-- Move the right top corner to inside. -->
            <key="Alt+LeftArrow+UpArrow     | Alt+UpArrow+LeftArrow">    <action=WarpWindow data=" 0,-1, 0,-1"/></key> <!-- Move the left bottom corner to inside. -->
            <key="Alt+RightArrow+UpArrow    | Alt+UpArrow+RightArrow">   <action=WarpWindow data="-1, 0, 0,-1"/></key> <!-- Move the right bottom corner to inside. -->
        </desktop>
    </hotkeys>
</config>

@o-sdn-o o-sdn-o merged commit 61e7b63 into directvt:master Dec 19, 2024
8 checks passed
@o-sdn-o o-sdn-o deleted the gui-bridge branch December 19, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant