Skip to content

Commit

Permalink
Merge pull request #697 from o-sdn-o/gui-bridge
Browse files Browse the repository at this point in the history
Implement desktop window actions
  • Loading branch information
o-sdn-o authored Dec 19, 2024
2 parents 03077e3 + 8243cec commit 61e7b63
Show file tree
Hide file tree
Showing 21 changed files with 629 additions and 153 deletions.
16 changes: 11 additions & 5 deletions doc/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,10 @@ Tiling Window Manager is a window container that organizes the workspace into mu
<item action=TileEqualizeSplitRatio label=">|<" tooltip=" Equalize split ratio "/>
<item action=TileSetManagerTitle label='"…"' tooltip=" Set tiling window manager title using clipboard data "/>
<item action=TileClosePane label="×" tooltip=" Close active application "/>
<!-- <item action=TileFocusPrevPane label="<" tooltip=" Focus the previous pane or splitting grip "/> -->
<!-- <item action=TileFocusNextPane label=">" tooltip=" Focus the next pane or splitting grip "/> -->
<!-- <item action=TileFocusPrev label="<" tooltip=" Focus the previous pane or the split grip "/> -->
<!-- <item action=TileFocusNext label=">" tooltip=" Focus the next pane or the split grip "/> -->
<!-- <item action=TileFocusPrevPane label="<-" tooltip=" Focus the previous pane "/> -->
<!-- <item action=TileFocusNextPane label="->" tooltip=" Focus the next pane "/> -->
</menu>
</tile>
<hotkeys> <!-- The required key combination sequence can be generated on the Info page, accessible by clicking on the label in the lower right corner of the vtm desktop. -->
Expand All @@ -468,8 +470,10 @@ Tiling Window Manager is a window container that organizes the workspace into mu
<key="Alt+Shift+N" action=RunApplication/> <!-- Run default application. -->
</desktop>
<tile key*>
<key="Ctrl+PageUp" action=TileFocusPrevPane /> <!-- Focus the previous pane or splitting grip. -->
<key="Ctrl+PageDown" action=TileFocusNextPane /> <!-- Focus the next pane or splitting grip. -->
<key="Ctrl+PageUp" action=TileFocusPrev /> <!-- Focus the previous pane or the split grip. -->
<key="Ctrl+PageDown" action=TileFocusNext /> <!-- Focus the next pane or the split grip. -->
<key="" action=TileFocusPrevPane /> <!-- Focus the previous pane. -->
<key="" action=TileFocusNextPane /> <!-- Focus the next pane. -->
<key="Alt+Shift+N" action=TileRunApplicatoin /> <!-- Launch application instances in active empty slots. The app to run can be set by RightClick on the taskbar. -->
<key="Alt+Shift+A" action=TileSelectAllPanes /> <!-- Select all panes. -->
<key="Alt+Shift+'|'" action=TileSplitHorizontally /> <!-- Split active panes horizontally. -->
Expand All @@ -485,7 +489,9 @@ Tiling Window Manager is a window container that organizes the workspace into mu
<key="UpArrow" ><action=TileMoveGrip data=" 0,-1"/></key> <!-- Move the split grip up. -->
<key="DownArrow" ><action=TileMoveGrip data=" 0, 1"/></key> <!-- Move the split grip down. -->
<key="'-'" ><action=TileResizeGrip data="-1" /></key> <!-- Decrease the split grip width. -->
<key="Shift+'+'" ><action=TileResizeGrip data=" 1" /></key> <!-- Increase the split grip width. -->
<key="Shift+'+' | NumpadPlus"><action=TileResizeGrip data="1"/></key> <!-- Increase the split grip width. -->
<key="Shift+Tab" action=TileFocusPrevGrip/> <!-- Focus the next split grip. -->
<key="Tab" action=TileFocusNextGrip/> <!-- Focus the previous split grip. -->
</grips>
</tile>
</hotkeys>
Expand Down
47 changes: 42 additions & 5 deletions doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,10 @@ Notes
<item action=TileEqualizeSplitRatio label=">|<" tooltip=" Equalize split ratio "/>
<item action=TileSetManagerTitle label='"…"' tooltip=" Set tiling window manager title using clipboard data "/>
<item action=TileClosePane label="×" tooltip=" Close active application "/>
<!-- <item action=TileFocusPrevPane label="<" tooltip=" Focus the previous pane or splitting grip "/> -->
<!-- <item action=TileFocusNextPane label=">" tooltip=" Focus the next pane or splitting grip "/> -->
<!-- <item action=TileFocusPrev label="<" tooltip=" Focus the previous pane or the split grip "/> -->
<!-- <item action=TileFocusNext label=">" tooltip=" Focus the next pane or the split grip "/> -->
<!-- <item action=TileFocusPrevPane label="<-" tooltip=" Focus the previous pane "/> -->
<!-- <item action=TileFocusNextPane label="->" tooltip=" Focus the next pane "/> -->
</menu>
</tile>
<defapp>
Expand Down Expand Up @@ -901,10 +903,43 @@ Notes
<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="" action=MaximizeWindow/> <!-- Maximize all focused desktop windows. -->
<key="" 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 bottom corner to outside. -->
<key="Ctrl+RightArrow+UpArrow | Ctrl+UpArrow+RightArrow"> <action=WarpWindow data=" 0, 1, 1, 0"/></key> <!-- Move the right bottom corner to outside. -->

<key="Alt+LeftArrow+DownArrow | Alt+DownArrow+LeftArrow"> <action=WarpWindow data=" 0,-1,-1, 0"/></key> <!-- Move the left bottom corner to inside. -->
<key="Alt+RightArrow+DownArrow | Alt+DownArrow+RightArrow"> <action=WarpWindow data="-1, 0,-1, 0"/></key> <!-- Move the right bottom 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>
<tile key*>
<key="Ctrl+PageUp" action=TileFocusPrevPane /> <!-- Focus the previous pane or splitting grip. -->
<key="Ctrl+PageDown" action=TileFocusNextPane /> <!-- Focus the next pane or splitting grip. -->
<key="Ctrl+PageUp" action=TileFocusPrev /> <!-- Focus the previous pane or the split grip. -->
<key="Ctrl+PageDown" action=TileFocusNext /> <!-- Focus the next pane or the split grip. -->
<key="" action=TileFocusPrevPane /> <!-- Focus the previous pane. -->
<key="" action=TileFocusNextPane /> <!-- Focus the next pane. -->
<key="Alt+Shift+N" action=TileRunApplicatoin /> <!-- Launch application instances in active empty slots. The app to run can be set by RightClick on the taskbar. -->
<key="Alt+Shift+A" action=TileSelectAllPanes /> <!-- Select all panes. -->
<key="Alt+Shift+'|'" action=TileSplitHorizontally /> <!-- Split active panes horizontally. -->
Expand All @@ -920,7 +955,9 @@ Notes
<key="UpArrow" ><action=TileMoveGrip data=" 0,-1"/></key> <!-- Move the split grip up. -->
<key="DownArrow" ><action=TileMoveGrip data=" 0, 1"/></key> <!-- Move the split grip down. -->
<key="'-'" ><action=TileResizeGrip data="-1" /></key> <!-- Decrease the split grip width. -->
<key="Shift+'+'" ><action=TileResizeGrip data=" 1" /></key> <!-- Increase the split grip width. -->
<key="Shift+'+' | NumpadPlus"><action=TileResizeGrip data="1"/></key> <!-- Increase the split grip width. -->
<key="Shift+Tab" action=TileFocusPrevGrip/> <!-- Focus the next split grip. -->
<key="Tab" action=TileFocusNextGrip/> <!-- Focus the previous split grip. -->
</grips>
</tile>
<terminal key*> <!-- Application specific layer key bindings. -->
Expand Down
36 changes: 19 additions & 17 deletions doc/user-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,25 @@
<tr><th>Hotkey ¹</th> <th>Default action</th></tr>
</thead>
<tbody>
<tr><th>Ctrl+PageUp</th> <td>Focus the previous pane or splitting grip.</td></tr>
<tr><th>Ctrl+PageDown</th> <td>Focus the next pane or splitting grip.</td></tr>
<tr><th>Alt+Shift+N</th> <td>Launch application instances in active empty slots. The app to run can be set by RightClick on the taskbar.</td></tr>
<tr><th>Alt+Shift+A</th> <td>Select all panes.</td></tr>
<tr><th>Alt+Shift+'|'</th> <td>Split active panes horizontally.</td></tr>
<tr><th>Alt+Shift+Minus</th> <td>Split active panes vertically.</td></tr>
<tr><th>Alt+Shift+R</th> <td>Change split orientation.</td></tr>
<tr><th>Alt+Shift+S</th> <td>Swap two or more panes.</td></tr>
<tr><th>Alt+Shift+E</th> <td>Equalize split ratio.</td></tr>
<tr><th>Alt+Shift+F2</th> <td>Set tiling window manager title using clipboard data.</td></tr>
<tr><th>Alt+Shift+W</th> <td>Close active application.</td></tr>
<tr><th>LeftArrow</th> <td>Move the split grip to the left.</td></tr>
<tr><th>RightArrow</th> <td>Move the split grip to the right.</td></tr>
<tr><th>UpArrow</th> <td>Move the split grip up.</td></tr>
<tr><th>DownArrow</th> <td>Move the split grip down.</td></tr>
<tr><th>'-'</th> <td>Decrease the split grip width.</td></tr>
<tr><th>Shift+'+'</th> <td>Increase the split grip width.</td></tr>
<tr><th>Ctrl+PageUp</th> <td>Focus the previous pane or the split grip.</td></tr>
<tr><th>Ctrl+PageDown</th> <td>Focus the next pane or the split grip.</td></tr>
<tr><th>Alt+Shift+N</th> <td>Launch application instances in active empty slots. The app to run can be set by RightClick on the taskbar.</td></tr>
<tr><th>Alt+Shift+A</th> <td>Select all panes.</td></tr>
<tr><th>Alt+Shift+'|'</th> <td>Split active panes horizontally.</td></tr>
<tr><th>Alt+Shift+Minus</th> <td>Split active panes vertically.</td></tr>
<tr><th>Alt+Shift+R</th> <td>Change split orientation.</td></tr>
<tr><th>Alt+Shift+S</th> <td>Swap two or more panes.</td></tr>
<tr><th>Alt+Shift+E</th> <td>Equalize split ratio.</td></tr>
<tr><th>Alt+Shift+F2</th> <td>Set tiling window manager title using clipboard data.</td></tr>
<tr><th>Alt+Shift+W</th> <td>Close active application.</td></tr>
<tr><th>LeftArrow</th> <td>Move the split grip to the left.</td></tr>
<tr><th>RightArrow</th> <td>Move the split grip to the right.</td></tr>
<tr><th>UpArrow</th> <td>Move the split grip up.</td></tr>
<tr><th>DownArrow</th> <td>Move the split grip down.</td></tr>
<tr><th>'-'</th> <td>Decrease the split grip width.</td></tr>
<tr><th>Shift+'+'<br>NumpadPlus</th><td>Increase the split grip width.</td></tr>
<tr><th>Shift+Tab</th> <td>Focus the previous split grip.</td></tr>
<tr><th>Tab</th> <td>Focus the next split grip.</td></tr>
</tbody>
</table>

Expand Down
4 changes: 2 additions & 2 deletions src/netxs/apps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,12 +741,12 @@ namespace netxs::app::shared
auto& state_inst = *state_state;
auto& keybd = boss.template plugins<pro::keybd>();
app::shared::base_kb_navigation(keybd, scroll, boss);
keybd.proc("UpdateChordPreview", [&, update_ptr](hids& gear, txts&)
keybd.proc("UpdateChordPreview", [&, update_ptr](hids& gear)
{
if (gear.keystat != input::key::repeated) (*update_ptr)(items_inst, gear, true);
if (rawkbd) gear.set_handled();
});
keybd.proc("ExclusiveKeyboardMode", [&, update_ptr](hids& gear, txts&)
keybd.proc("ExclusiveKeyboardMode", [&, update_ptr](hids& gear)
{
state_inst.bell::signal(tier::release, ui::term::events::rawkbd);
if (gear.keystat != input::key::repeated) (*update_ptr)(items_inst, gear, true);
Expand Down
Loading

0 comments on commit 61e7b63

Please sign in to comment.