Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

COSMIC Workspaces Applets

Panel applets for the COSMIC desktop environment that open the workspaces overview with pointer gestures.

Applets

Hot Corner

Moving the pointer to the top-left corner of the screen shows the workspaces overview, like the GNOME hot corner.

The corner is a tiny transparent surface on the overlay layer, above panels and the dock, so it works with any panel layout. Clicking the panel button opens a small menu with an on/off toggle and a manual trigger.

Swipe to Workspaces

A three-finger swipe up on the touchpad shows the workspaces overview; a swipe down hides it.

Gestures are read directly from the touchpad's multitouch evdev device, because the compositor consumes multi-finger gestures and does not forward them to clients. Reading /dev/input requires membership of the input group:

sudo usermod -aG input $USER

Then log out and back in. Until then the applet's menu shows the command as selectable text with a button that copies it to the clipboard.

Requirements

  • COSMIC desktop environment (developed and tested against 1.7.0)
  • Rust toolchain (rustup is sufficient; no system build dependencies)

Installation

Build both applets in release mode and install them for the current user:

./install.sh

The script:

  • builds both applets with cargo build --release (the release profile uses thin LTO),
  • installs the binaries to ~/.local/bin ($XDG_BIN_HOME when set),
  • installs the desktop files and icons to ~/.local/share ($XDG_DATA_HOME when set), where cosmic-panel discovers applets.

The applets do not run as standalone applications: they are started by cosmic-panel when they are added to a panel. After installing, open cosmic-settings, go to Desktop -> Panel, and add "Hot Corner" and "Swipe to Workspaces" to a panel. They start automatically with the panel from then on.

To build a single applet without installing it:

cargo build --release -p cosmic-applet-hot-corner
cargo build --release -p cosmic-applet-swipe-to-workspaces

Uninstallation

./install.sh --uninstall

Remove the applets from your panel in cosmic-settings as well if they were added.

Configuration

Both applets can be installed and used independently. When both are installed they share a single settings file, ~/.config/cosmic/io.github.lethevimlet.CosmicWorkspacesGestures (hot_corner and swipe keys), so there is one place to configure them. Each applet's panel button also opens a menu with its toggle and a manual trigger.

Behavior notes

  • Both applets toggle the workspaces view through the com.system76.CosmicWorkspaces D-Bus interface, the same component the panel's workspaces button uses.
  • A swipe must travel about 10% of the touchpad height and be mostly vertical, so scrolling and the compositor's horizontal workspace swipes never trigger it.
  • The applets are idle when not used: the corner monitor blocks on the Wayland socket and the gesture monitor blocks on the touchpad device.

Development

cargo build --release
cargo test

The swipe recognizer is a pure state machine covered by unit tests; run cargo test after changing it.

License

GPL-3.0-only. The swipe applet's panel icons are adapted from GNOME's Adwaita icon theme (LGPL-2.1-or-later).

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages