Skip to content

Workspace Grid: initial submission - #1891

Closed
RobertAlexanderH wants to merge 5 commits into
linuxmint:masterfrom
RobertAlexanderH:workspace-grid-initial
Closed

Workspace Grid: initial submission#1891
RobertAlexanderH wants to merge 5 commits into
linuxmint:masterfrom
RobertAlexanderH:workspace-grid-initial

Conversation

@RobertAlexanderH

Copy link
Copy Markdown

Summary

  • New desklet: a clickable grid of workspaces with their names, highlighting the active workspace
  • UUID: cinnamon-workspace-grid-desklet@curbsoftware
  • Workspaces are added, removed and renamed via a per-tile right-click menu (or the trailing "+" tile), all through Main._addWorkspace / Main._removeWorkspace / Main.setWorkspaceName
  • Layout is auto (near-square) or fixed rows x columns; optional index prefixes; optional scroll-wheel switching by column or row
  • Workspace editing can be turned off for a read-only grid
  • Not related to the workspace-grid@hernejj applet (which remaps keys and forces a 2D grid); this desklet only displays and switches workspaces

Validation

  • ./validate-spice cinnamon-workspace-grid-desklet@curbsoftware — no errors
  • .pot generated with ./cinnamon-spices-makepot
  • Headless unit tests for the layout/guard helpers pass under gjs

Test plan

  • Add desklet, switch workspaces by clicking tiles
  • Add / rename / remove via tile menu, remove confirmation on named workspaces
  • 36-workspace ceiling respected; last workspace cannot be removed
  • Settings: auto vs fixed layout, index prefixes, scroll switching, editing off
  • Light and dark Cinnamon themes

Tested on Cinnamon 6.6.9 (Mint 22.x), Mint-L-Dark and Mint-Y, single and dual monitor.

@github-actions

Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 11 potential issue(s):

⚠️ WARNING

⚠️ hardcoded_data_dir

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:14

Gettext.bindtextdomain(uuid, GLib.get_home_dir() + "/.local/share/locale");

Avoid hardcoding .local/share in paths. Use GLib.get_user_data_dir() instead,
which respects the XDG_DATA_HOME environment variable.

⚠️ lang_bind

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:98

this.switch_id = global.window_manager.connect('switch-workspace', Lang.bind(this, this._update));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:110

this._destroyId = this.connect('destroy', Lang.bind(this, this._cleanup));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:173

this.scroll_id = this.mainContainer.connect('scroll-event', Lang.bind(this, this._onScrollEvent));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:279

button.connect('clicked', Lang.bind(this, this._onWorkspaceButtonClicked));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:297

button.connect('clicked', Lang.bind(this, this._onAddWorkspace));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:329

renameItem.connect('activate', Lang.bind(this, function () {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:336

removeItem.connect('activate', Lang.bind(this, function () {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:345

addItem.connect('activate', Lang.bind(this, this._onAddWorkspace));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:471

this.ws_added_id = global.workspace_manager.connect('workspace-added', Lang.bind(this, this._onWorkspacesChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

cinnamon-workspace-grid-desklet@curbsoftware/files/cinnamon-workspace-grid-desklet@curbsoftware/desklet.js:472

this.ws_removed_id = global.workspace_manager.connect('workspace-removed', Lang.bind(this, this._onWorkspacesChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.


Automated pattern check.

RobertAlexanderH and others added 4 commits August 15, 2026 20:05
@rcalixte rcalixte closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants