Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P Plasma Workspace
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 107
    • Merge requests 107
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • Plasma Workspace
  • Merge requests
  • !2106

Draft: Play notification sound when a USB device is plugged in or unplugged

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Kai Uwe Broulik requested to merge work/kbroulik/device-plugsound into master Sep 12, 2022
  • Overview 23
  • Commits 1
  • Pipelines 6
  • Changes 6

This adds a kded module which will monitor Udev's "usb" subsystem for any USB devices being added/removed and emits a notification as a result.

Compared to device notifier, this reacts on any kind of USB device (e.g. mouse, headset), not just storage devices. It also reacts more quickly, for example with an external hard drive, which needs to spin up first before device notifier scans the partitions.

It checks the sysfs removable property to avoid playing a sound when an internal device that is technically a USB device (e.g. fingerprint reader, bluetooth adapter, etc) gets enabled/disabled.

BUG: 435509


Screenshot_20220912_143021

This popup is not supposed to be shown by default, it's all about the sound. That's also why I didn't invest a lot of effort into generating a pretty name for the device in question.

TODO:

  • We actually need a nice sound for plugging in and unplugging
  • Some notification events need to be added to https://invent.kde.org/frameworks/frameworkintegration/-/blob/master/plasma_workspace.notifyrc
Edited Oct 03, 2022 by Kai Uwe Broulik
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/kbroulik/device-plugsound