Workspace grid (2D) and switcher v0.8
2D workspace grid and switcher for Cinnamon Desktop Environment
Author: Jason J. Herne (email@example.com) Homepage: http://github.com/hernejj/workspace-grid-cinnamon-applet
This is a Cinnamon applet that implements a 2D workspace grid and provides a workspace switcher that understands multiple rows. In addition, the standard keyboard shortcuts for workspace up/down navigation are modified to actually switch workspaces instead of bringing up the Cinnamon Workspace Expo and Overview.
Portions of this code were adapted from the firstname.lastname@example.org applet created by the Cinnamon Team: http://cinnamon.linuxmint.com/
Portions of this code were adapted from the Gnome Shell Frippery Bottom Panel extension created by rmyorston: https://extensions.gnome.org/extension/3/bottom-panel/
This applet has been tested to be compatible with the following versions of Cinnamon and Linux distributions: Linux Mint 17 - Cinnamon 2.2 Linux Mint 16 - Cinnamon 2.0
Place the "workspace-grid@hernejj" folder in the ".local/share/cinnamon/applets" folder in your home directory.
Restart Cinnamon either by using Alt+F2, then hit 'r' then the enter key. Or simply log out and log back in.
- Start the "Cinnamon Settings" program, go to the Applets section and look for the entry named "Workspace grid (2D) and switcher". Check the checkbox to the left of this entry to enable this applet.
Setting the Number of Workspaces
This applet allows you to configure the number or rows and columns in your workspace grid. Just right click on the applet and choose "Configure..." and a dialog will appear. Enter the number of columns and rows you want and click the close button. The maximum number of workspaces supported by this applet is 12 columns by 6 rows.
Choosing the Style
There are currently two visual styles to choose from.
Single Row: Workspaces are shown to you a single row at a time. A Row indicator is present to let you know what row you are in.
Grid: A grid view of all existing workspaces. The workspaces in this style can get quite small if you have more than a few rows.
You can navigate between your workspaces using the standard system keyboard shortcuts. By default they are as listed:
switch-to-workspace-up Ctrl+Alt+Up_Arrow switch-to-workspace-down Ctrl+Alt+Down_Arrow switch-to-workspace-left Ctrl+Alt+Left_Arrow switch-to-workspace-right Ctrl+Alt+Right_Arrow
You can also click on the workspace or the row indicator lines within the switcher to navigate directly to a specific workspace or row.
You can also place your mouse over the switcher and use the scroll wheel to navigate forward and backward in the workspace grid.
By default, this applet conflicts with and disables the Expo and Scale keyboard shortcuts. There is a setting in the settings dialog to disable this behavior.
WARNING: Using Expo (or anything other than this applet) for adding/removing workspaces will cause Cinnamon to crash! While using this applet ONLY add/remove desktops via the applet's settings window.
This application is released under the GNU General Public License v2. A full
copy of the license can be found here: http://www.gnu.org/licenses/gpl.txt
Thank you for using free software!
- Bugfix: Fixed mouse scrolling when scrolling by column. v0.7:
- Added setting to choose direction to move when using mouse wheel
- Bugfix: Stop trying to handle externally +/- desktops. Was broken!
- Bugfix: Deregister event handlers when switching ui styles v0.6:
- Multiple visual styles to choose from: single row and grid
- Maximum number of columns increased from 6 to 12.
- Remove reliance on external stylesheet and performance limiting hack
- Applet colors now based on Cinnamon theme
- Bugfix: Watch for and correct any externally added/removed desktops v0.5:
- Added support for Cinnamon Settings API.
- Added option to keep original scale/expo keyboard shortcuts
- Removed hackish "configuration icon".
- Removed old style key binding registration. Breaks on very old distros. v0.4:
- compat: Remove right-click to configure for Cinnamon 2.2 compatibility
- Compat: Add configuration via left-click on new icon.
- Don't override theme style for better theme integration.
- Workaround for "theme change makes row indicator disappear" bug. v0.3:
- Bugfix: Removed css junk that was messing up bottom panel style.
- Bugfix: Allow applet to properly resize with bottom panel. v0.2:
- Added key binding support for Linux Mint 13 & Cinnamon 1.4.0.
- Added some debug logging to assist with future incompatibility problems. v0.1:
- Initial release.
In 17.2 you can specify the shortcuts for expo and scale. Shouldn't it be possible to keep these user defined shortcuts and still move up and down between workspaces via a shortcut?
What would you set them to? I've never found a better set of keys then Ctrl+arrows. I could consider adding an option to remap them.
Thank you so much for this applet! I adore it.
Screenshots and further info going to your email.
Thanks again for adding much needed functionality to Mint!
For future reference, if you update this applet, it now has an icon to configure it. You no longer right click to access the configuration menu. Just click the "gear" icon to the right of the applet.
- Only the top row of workspaces are shown, e.g. "Expo" shows 4 workspaces in a 2x2 grid (when your applet is removed- you still successfully intercept the ctrl-alt-up keystroke), but your applet shows 1 row by 2 columns without the row switcher to the left.
- Right-clicking does not bring up the dialog to set the dimensions, but gives only the option to remove the applet from the panel.
Restarting Cinnamon does not fix the problem.
Abusing the "switch"-bindings is a severe usability bug in Cinnamon.
Have you already reported this one to the bug tracker?
If I understand correctly you are asking for a preview to be displayed on switch? If so, that is do-able. I'll consider it for future releases.
As far as moving it goes, I turn on panel edit mode and I have no trouble moving it.
2) I used edit in dconf-editor the value of org.cinnamon.enabled-applets with the help of a text editor. Since I use the classic layout (top+bottom panel) I also had to specify "panel2" by hand when editing the value because the applets, for the life of them, don't seem to indulge me when I drag them between panels.
1) cols 1 to 6 works, cols greater than 6 don't.
2) can't move it from the top panel to the bottom panel in Cinnamons Classic View. All applets can be moved except this one!
If it fails, please some how capture and report the debugging output that can be found by pressing Alt+F2 then typing lg in the command line that pops up then hitting enter. Click the "Error" tab and look for any line that starts with "debug ... workspace-grid@hernejj". You can log it to a file with Cinnamon 1.6. using the Cinnamon Settings application, under the General section there is an option titled "Log LookingGlass output to ~/.cinnamon/glass.log (Requires Cinnamon Restart)". Sorry I do not have an easier method for capturing this data.