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

EWW Taskbar adjustments and additional EWW widgets #814

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

kajusnau
Copy link
Contributor

@kajusnau kajusnau commented Oct 1, 2024

Description of changes

  1. Moved Taskbar to the Top:

    • Based on user feedback, the taskbar has been relocated to the top of the screen.
  2. Added Quick Settings Widget:

    • Introduced a new Quick Settings widget that allows users quick access to essential system settings.
    • The widget can be opened by clicking on the controls area in the taskbar (WiFi, Battery, Brightness, Volume).
  3. Added Power Menu Widget:

    • Implemented a Power Menu widget that includes options for shutdown, restart, and suspend.
  4. Added Bluetooth & WiFi Buttons:

    • Added dedicated buttons for Bluetooth and WiFi in the Quick Settings widget.
    • The WiFi button is dynamic - the icon and subtitle represent different connection strengths and statuses.
    • Clicking on the Bluetooth and WiFi buttons will open their respective settings apps for more detailed control.
  5. Introduced Volume and Brightness Sliders:

    • Added Volume and Brightness sliders, located in the Quick Settings widget, allowing users to adjust these settings quickly and conveniently.
  6. Changed Utility Scripts to Use writeShellApplication

  7. Adjusted Utility Scripts' Output to JSON:

    • Modified the output format of utility scripts to return data in JSON format, enabling better integration with widgets and system monitoring tools.
  8. Expanded functionality of bt-launcher and audio-ctrl Scripts

Known Issues:

  1. Display Brightness Limitation:

    • Display brightness can only be adjusted for the built-in display, not for external monitors.
  2. Not functional on VM

    • Likely due to givc not being available in VM.
    • Update: Addressed using a config check for gvic.
      VM and Orin builds will no longer include ewwbar as a result.
  3. Missing Mute Switch:

    • The volume adjustment feature is currently missing a mute switch.
  4. Volume Adjustment Responsiveness:

    • Volume adjustment is slightly delayed, which may feel unresponsive when changes are made quickly.

Notes:

  • AudioVM seems to be slow to respond to multiple requests (e.g. ${pkgs.bt-launcher}/bin/bt-launcher status & ${eww-volume}/bin/eww-volume set repeated at 1s intervals results in unusable operation)
    Upon further inspection, this seems to be due to bt-launcher opening an ssh tunnel every time a command is issued.
  • Some minor testing done to check feasibility of adding hotkey indicator "open" and "close" commands within modules/desktop/graphics/labwc.config.nix - at first try this didn't seem to call eww properly, which resulted in nothing happening.
    To be investigated further in the future.

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run make-checks and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status
  • Change requires full re-installation
  • Change can be updated with nixos-rebuild ... switch

Instructions for Testing

  • List all targets that this applies to:
    Lenovo X1
  • Is this a new feature
    • List the test steps to verify:
      Can be tested on Lenovo X1 following usual installation or nixos-rebuild ... switch
  • If it is an improvement how does it impact existing functionality?
    Increased usability and introduced functionality offered by common operating systems.

@kajusnau kajusnau temporarily deployed to internal-build-workflow October 1, 2024 14:08 — with GitHub Actions Inactive
@kajusnau kajusnau temporarily deployed to internal-build-workflow October 2, 2024 07:31 — with GitHub Actions Inactive
@kajusnau kajusnau temporarily deployed to internal-build-workflow October 2, 2024 11:48 — with GitHub Actions Inactive
@kajusnau kajusnau changed the title Eww more widgets EWW Taskbar adjustments and additional EWW widgets Oct 2, 2024
@kajusnau kajusnau marked this pull request as ready for review October 2, 2024 12:08
@juliuskoskela
Copy link
Contributor

72k line error message at https://github.com/tiiuae/ghaf/actions/runs/11143204688/job/30967768174?pr=814 😅

But I guess the last lines are the important ones

error: attribute 'givc-cli' missing
  at /nix/store/q9zfw3gwxalizbf1lz5lgzbssjhg6hy1-source/modules/desktop/graphics/ewwbar.nix:329:23:
    328|     name = "eww-power";
    329|     runtimeInputs = [ pkgs.givc-cli ];
      |                       ^
    330|     bashOptions = [ ];

So the givc-cli package overlay is not activated for the Jetson target and thus the package can't be found from pkgs.givc-cli.

Not sure if we should just feature gate this stuff out from the Jetson target all together...

@milva-unikie
Copy link

Tested on Lenovo-X1 (nixos-rebuild switch)

  • Taskbar works like expected (thank you for writing an extensive description, it was really helpful!)
  • All the old features are available & working
  • Test-automation passes

For Orin targets the builds are failing in Git and pre-merge-pipeline. @johannarautanen checked that they also fail when building locally.

@milva-unikie milva-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon bug on Orin AGX Issues found on NVIDIA Jetson AGX Orin while checking this PR bug on Orin NX Issues found on NVIDIA Jetson NX Orin while checking this PR labels Oct 3, 2024
- Reworked CSS styling to match the UI/UX design
- Added Quick Settings widget
- Added Power Menu widget
- Added Bluetooth & WiFi buttons
- Bluetooth & WiFi buttons open respective settings apps
- Changed utility scripts to use 'writeShellApplication'
- Adjusted utility scripts' output to json

Signed-off-by: Kajus Naujokaitis <[email protected]>
@nesteroff
Copy link
Contributor

Just a couple of things that came to mind:

  1. It would be nice to modularize ewwbar.nix a bit as it currently has over 1000 lines of code. Maybe we could define a set of widgets separately and enable them in the main module. This way we could have different configurations for different targets and it would be easier to maintain in the future.
  2. Most of the eww widgets currently rely on polling. I think that's fine for things that change frequently but it might not be optimal for something like bluetooth info, which doesn't change as often. Maybe we could leverage ghaf rpc for that. For example, instead of requesting the data over ssh every 3 seconds we could have a script listening for d-bus notifications in the audiovm, which would then send the Bluetooth info to the GUI VM where it executes eww update.

These are just things to consider for the future. It's really great work overall and hopefully, it can be merged once the build issue on orin is resolved.

@brianmcgillion brianmcgillion merged commit c818b2c into tiiuae:main Oct 3, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug on Orin AGX Issues found on NVIDIA Jetson AGX Orin while checking this PR bug on Orin NX Issues found on NVIDIA Jetson NX Orin while checking this PR Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants