wsdfhjxc / virtual-desktop-bar

A pager panel widget for KDE Plasma
GNU General Public License v3.0
322 stars 29 forks source link

Virtual Desktop Bar

This is an applet for KDE Plasma panel (or Latte Dock) that lets you switch between virtual desktops and also invoke some actions to dynamically manage them in a convenient way. In order to do it, you can use the mouse, the context menu or user-defined keyboard shortcuts. There are also some extra features related to virtual desktops.

The plasmoid displays virtual desktops as text labels with indicators in various styles. That means there's no graphical icons and window previews like in the Plasma's default Pager applet. Although the intention is to keep it simple, the applet has several configuration options regarding its behavior and visuals. These should be more than enough for desktop customization enthusiasts and folks at /r/unixporn who want to make their panels aesthetic.

And actually, the whole reason for creating this plasmoid was about the aesthetics in the first place, as I consider the Plasma's default Pager applet, with its fixed-size rectangles and window shapes, to be quite ugly, to put it straight.

Features

and a few more not mentioned options...

Screenshots

Adding, renaming, moving, removing a desktop:

Various desktop label styles:

Various desktop indicator styles:

Partial support also for vertical panels:

Installation

To install the applet, either get it as a distro-specific package, or build it from source by yourself.

Packages

From source

First, you need to install some required dependencies:

Then, to compile the source code and install the applet run: ./scripts/install-applet.sh

Note: This also applies if you want to upgrade to a newer version.

Note: If you want to remove the applet run: ./scripts/uninstall-applet.sh

After that, you should be able to find Virtual Desktop Bar in the Add Widgets menu.

Configuration

The applet has some options regarding its behavior and visuals. You'll find them in the configuration dialog.

Don't get fooled by an empty Keyboard Shortcuts section though. It's an imposed thing, common for all plasmoids.

There are global keyboard shortcuts, but you have to configure them in the Global Shortcuts System Settings Module. They should be available under KWin, Plasma or Latte Dock component, depending on the Plasma's mood and where have you placed the applet. All of the shortcuts have the Virtual Desktop Bar prefix for easier recognition.

Known issues

Compatibility with KWin scripts

The plasmoid does some things which results of are not exposed through the KWin scripting API. This is related to dynamic desktops, moving desktops, removing desktops other than the last one. These are non-native features. Because of that, KWin scripts tracking desktops or windows (for example tiling scripts) in most cases will be confused and will not react properly to performed actions (maybe except the dynamic desktops feature, depends on the script).

Nothing can be done about it, as long as KWin scripting API does not support signals like:

To avoid issues while using KWin scripts, do not use the features mentioned above.

Compatibility with window managers other than KWin

Some features, even the basic ones, like adding or removing desktops, might not work if KWin is replaced with a different window manager, be it i3, bspwm or any other. Such issues are unlikely to be addressed. However, the plasmoid should still display desktops and their state, so it can act as a visual addition with labels and indicators.