tiiuae / ghaf

TII SSRC Secure Technologies: Ghaf Framework
https://tiiuae.github.io/ghaf/
Apache License 2.0
39 stars 58 forks source link

EWW: Taskbar workspaces control #864

Closed kajusnau closed 1 week ago

kajusnau commented 1 week ago

Description of changes

  1. Added Workspaces Control Script:

    • Introduced a new control script for managing ghaf workspaces in packages/ghaf-workspace.
    • This script is necessary because labwc does not provide commands to control or monitor workspaces directly, apart from keybind functionality.
    • The script keeps track of current workspace and max number of workspaces in separate files under ~/.config/labwc;
    • Active workspace should be remembered between system reboots;
  2. Added Workspaces Widget to Taskbar:

    • Added to the top-left section of the taskbar.
    • Displays the active workspace index and allows users to switch workspaces directly from the taskbar.
  3. Configured Keybindings for Workspace Switching:

    • Added keybindings for workspace switching:
      • Super + [number] — Switches to the numbered workspace.
      • Super + Alt + Right Arrow — Switches to the next workspace.
      • Super + Alt + Left Arrow — Switches to the previous workspace.
  4. Defined Workspaces in Labwc Configuration:

    • Currently limited to two workspaces;
    • Workspaces popup dialog disabled;
    • Disabled default mouse keybind that allowed scrolling through workspaces;
  5. Other changes:

    • Reduced the height of the taskbar to match Ghaf UI design (46px -> 36px);

Checklist for things done

Instructions for Testing

leivos-unikie commented 1 week ago

Tested on Lenovo-X1 (built fresh image)

humaidq-tii commented 1 week ago

Some observations:

kajusnau commented 1 week ago

Some observations:

  • It isn't clear what the number means, and no indication that the workspace is switched. I can imagine users accidentally switching to workspace 2, thinking that their apps closed.
  • I don't see why we persist workspace after reboot/relogin? We don't preserve opened windows like on Mac either.