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

Desktop: Rework idle behavior, fix popups, adjust lock and login screen styling #916

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

kajusnau
Copy link
Contributor

@kajusnau kajusnau commented Nov 26, 2024

Description of Changes

  1. Reworked System Idle Behavior

    • Implemented a multi-stage idle workflow:
      • Dim: Notification is shown on the focused display and screen dims after 80% of autolock.duration (4 minutes, with default autolock.duration of 300 seconds).
      • Lock: Locks session after 100% of duration (5 minutes).
      • Screen Off: Turns off the screen after 150% of duration (7 minutes 30 seconds).
      • Suspend: Suspends the system after 300% of duration (15 minutes).
    • Each stage can be interrupted by user actions, such as moving the mouse or pressing a key, to reset the idle timer.
  2. Lock Screen and Login Screen Enhancements

    • Adjusted the styling of the lock and login screens.
    • Added gtklock powerbar module with the following buttons enabled - poweroff, reboot, suspend, logout.
    • Added a custom layout for the lock screen.
  3. Configuration Improvements

    • Added a separate configuration file for gtklock.
    • Added a separate configuration file for swayidle.
    • Enabled titlebar icons in labwc configuration.
  4. Improved Volume and Brightness Popups

    • Popups now only appear when triggered by function key presses.
    • Prevents unnecessary popups, ensuring they only show when expected by the user.
  5. Taskbar and Power Menu Adjustments

    • Rearranged buttons in the taskbar power menu into a more logical order. (Thanks Milla)
    • Hidden the taskbar keyboard layout indicator while backend support is unavailable.
  6. Package and Script Updates

    • Replaced the unused powercontrol package with the ghaf-powercontrol GIVC wrapper script.
    • Use the new ghaf-powercontrol script wherever applicable.
    • Removed the nm-launcher package, preferring to launch nm-applet directly using a DBUS proxy.
  7. Removed Unused Waybar

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:
  • Is this a new feature
    • Partially.
      • New Features:
        • Multi-stage idle workflow.
        • Separate config files for swayidle and gtklock.
        • Custom lock screen layout.
      • Improvements:
        • Enhanced volume/brightness popups, taskbar power menu order, and system config updates.
    • List the test steps to verify:
      1. Idle Behavior Testing:
        • Ensure the following behaviors occur, based on the default autolock.duration value of 300s:
          • Notification is shown on the focused display and screen dims after 80% of the set duration.
          • Locks session after 100% of the set duration.
          • Turns off the screen after 150% of the set duration.
          • Suspends the system after 300% of the set duration.
        • Confirm user interaction (e.g., mouse movement) interrupts the process at each stage.
      2. Lock Screen Enhancements:
        • Confirm the new look and feel of the lock screen based on the PR description.
        • Confirm powerbar module is visible and functions as expected (should appear near the bottom of the lock screen).
      3. Volume/Brightness Popups:
        • Test triggering popups using function keys (F1, F2, F3, F5, F6).
        • Confirm no unexpected popups appear during normal system usage, especially when opening MS Teams, Chrome, etc.
      4. Taskbar Power Menu and Layout Indicator:
        • Ensure power menu buttons are in the updated logical order.
        • Confirm the keyboard layout indicator is hidden.
      5. Script and Package Updates:
        • Verify no regression in using nm-applet from the system tray.
        • Verify no regression in system power control - taskbar and lock screen power state buttons should function as expected.
  • If it is an improvement how does it impact existing functionality?
    • Simplifies and organizes idle behavior for a more intuitive user experience.
    • Improves lock screen and login screen aesthetics and functionality.

@kajusnau kajusnau temporarily deployed to internal-build-workflow November 26, 2024 13:08 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the fix-popups-rework-idle branch from 2243b07 to 50b4855 Compare November 26, 2024 13:44
@kajusnau kajusnau temporarily deployed to internal-build-workflow November 26, 2024 13:44 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the fix-popups-rework-idle branch from 50b4855 to 1e3230a Compare November 27, 2024 13:09
@kajusnau kajusnau temporarily deployed to internal-build-workflow November 27, 2024 13:09 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the fix-popups-rework-idle branch from 1e3230a to 067aedb Compare November 27, 2024 13:30
@kajusnau kajusnau temporarily deployed to internal-build-workflow November 27, 2024 13:30 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the fix-popups-rework-idle branch from 067aedb to 097131e Compare November 27, 2024 13:30
@kajusnau kajusnau temporarily deployed to internal-build-workflow November 27, 2024 13:30 — with GitHub Actions Inactive
@brianmcgillion brianmcgillion self-requested a review November 27, 2024 14:08
Copy link
Collaborator

@brianmcgillion brianmcgillion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve with prejudice :)

Copy link
Member

@humaidq-tii humaidq-tii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay, needs testing on x1 and orin.

modules/desktop/graphics/waybar.config.nix Outdated Show resolved Hide resolved
@milva-unikie
Copy link

I have with Kajus already done a couple of rounds of testing for this PR with Lenovo-X1. There is one more small popup issue that still needs to be fixed.

Overall I really like the improvements this PR brings to Ghaf!

…en styling

- Reworked system idle behavior, added stages for dim, lock, and suspend
- Added separate config file for swayidle
- Adjusted the styling for lock and login screens
- Added a custom layout for the lock screen
- Added separate config file for gtklock
- Reworked volume and brightness popup behavior to trigger only from key presses
- Adjusted the order of buttons in taskbar power menu
- Use new ghaf-powercontrol script wherever applicable
- Hide taskbar keyboard layout indicator
- Enabled titlebar icons in labwc config
- Added powerbar module to lockscreen

Signed-off-by: Kajus Naujokaitis <[email protected]>
@kajusnau kajusnau force-pushed the fix-popups-rework-idle branch from 097131e to 9dd368d Compare November 28, 2024 08:40
@kajusnau kajusnau temporarily deployed to internal-build-workflow November 28, 2024 08:40 — with GitHub Actions Inactive
@kajusnau kajusnau marked this pull request as ready for review November 28, 2024 08:42
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Nov 28, 2024
@kajusnau kajusnau self-assigned this Nov 28, 2024
@johannarautanen
Copy link

Tested with native Orin AGX and NX. Flashed to memory card

Working:

  • Taskbar Power Menu; power menu buttons are in the updated logical order: lock, suspend, logout, reboot, shudown. Buttons worked ok.

  • In lock-screen were are following buttons enabled - poweroff, reboot, suspend, logout. And there worked as they should.

  • When lock is activated, there appeared first time and after screen activation the lock screen come visible.

  • "win + L" locked the screen

  • there is "caps lock is on" visible in lock screen when caps lock activated and "login failed" comes after entering wrong lock code.

  • there are no any extra staff visible in Orin after this change

  • automated test worked.

  • applications can be launched

@johannarautanen johannarautanen added Tested on Orin AGX This PR has been tested on NVIDIA Jetson AGX Orin Tested on Orin NX This PR has been tested on NVIDIA Jetson NX Orin labels Nov 28, 2024
@johannarautanen
Copy link

Tested with crosscompile Orin AGX and NX. Flashed to memory card

Working:

  • Taskbar Power Menu; power menu buttons are in the updated logical order: lock, suspend, logout, reboot, shudown. Buttons worked ok.
  • In lock-screen were are following buttons enabled - poweroff, reboot, suspend, logout. And there worked as they should.
  • When lock is activated, there appeared first time and after screen activation the lock screen come visible.
  • "win + L" locked the screen
  • there is "caps lock is on"-text visible in lock screen when caps lock activated and "login failed" comes after entering wrong lock code.
  • there are no any extra staff visible in Orin after this change
  • applications can be launched

@johannarautanen johannarautanen added Tested on Orin AGX Cross This PR has been tested on NVIDIA Jetson AGX Orin cross-compiled Tested on Orin NX Cross This PR has been tested on NVIDIA Jetson NX Orin cross-compiled labels Nov 28, 2024
@milva-unikie
Copy link

Tested on Lenovo-X1 (nixos-rebuild switch)

  • Everything mentioned in testing instructions work
  • Test-automation passes
  • Looks great
  • Works well
  • No complaints :)

@milva-unikie milva-unikie removed the Needs Testing CI Team to pre-verify label Nov 28, 2024
@milva-unikie milva-unikie added the Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon label Nov 28, 2024
@brianmcgillion brianmcgillion merged commit 3d83681 into tiiuae:main Nov 28, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on Orin AGX Cross This PR has been tested on NVIDIA Jetson AGX Orin cross-compiled Tested on Orin AGX This PR has been tested on NVIDIA Jetson AGX Orin Tested on Orin NX Cross This PR has been tested on NVIDIA Jetson NX Orin cross-compiled Tested on Orin NX This PR has been tested on NVIDIA Jetson NX Orin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants