Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DesktopCube@yare] Version 2.0.2 #796

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion DesktopCube@yare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 2.0.2

- Added APIs used by the "Smart Panel" applet so it can use Desktop Cube in more cases
- Fixed a case where the Cube was used under the Expo (using the Left/Right arrow keys when the Expo was open). Using the Cube in this case was visually awkward and unnecessary so I disabled using Cube for this scenario
- Fixes issues when attempting to move a window to an adjacent workspace (Shift+Ctrl+Alt+Left/Right) for a window that is visible on all workspaces

## 2.0.1

- Allow Desktop Cube to work with the "Smart Panel" applet

## 2.0.0

* Added ability to use Cube effect when changing the workspace via the "Workspace Switcher" applet
Expand All @@ -23,7 +33,7 @@
## 1.0.2

* Added an option to remove the panels from the animation effect
* Fix the Effect Setting options that were broken when the "tween" option widget was removed starting with cinnamon 5.4
* Fix the Effect Setting options that were broken when the "tween" option widget was removed starting with cinnamon 5.4
* Allow Cinnamon to play the workspace switch sound if it is enabled
* Note: All changed from here on will only be for the Cinnamon 5.4+ version
* Change info.json author to me, since there is currently no maintainer
Expand Down
2 changes: 2 additions & 0 deletions DesktopCube@yare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ There are a number of ways to switch the current workspace, all of following wil

5. When changing the focus to a window on another workspace by using the Window-List or Alt-Tab when they are configured to show windows from other workspaces. (can be disabled in the configuration)

6. When using the "Smart Panel" Applet features that change the workspace (Also plan to change "Desktop Scroller" to use Flipper as well in the near future)

When switching the current workspace using Expo ("workspace selection screen" Default hotkey: Ctrl + Alt + Up_Arrow_Key) by clicking on a different workspace, the Desktop Cube effect will not be used. Since the Expo is not really a "face" on the cube it would break the Cube concept a bit, therefore I left it as is since I felt it was more logical that way.

If you know of other methods of switching the workspace where the Desktop Cube effect is not currently used, please let me know so I can see if I can find a way to enable the Desktop Cube for that path as well.
Expand Down
50 changes: 46 additions & 4 deletions DesktopCube@yare/files/DesktopCube@yare/5.4/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ let bindings = [
let original_mw_moveToWorkspace;
let original_main_activateWindow;

let curDesktopCube;

const isFinalized = function(obj) {
return obj && GObject.Object.prototype.toString.call(obj).indexOf('FINALIZED') > -1;
}
Expand Down Expand Up @@ -193,7 +195,7 @@ Cube.prototype = {
},

moveWindow: function(window, direction) {
if (!window || window.get_window_type() === Meta.WindowType.DESKTOP) {
if (!window || window.is_on_all_workspaces() === true || window.get_window_type() === Meta.WindowType.DESKTOP) {
return false;
}

Expand Down Expand Up @@ -888,9 +890,13 @@ function switchToWorkspace(display, window, binding) {
// Our version of moveToWorkspace() which will be Monkey Patched over the Cinnamon version
// This is how we handle the workspace switching initiated by the "Workspace Switcher" applet
function moveToWorkspace(workspace, direction_hint) {
let [transitions_needed, direction] = getTransitionsAndDirection(workspace);
if (transitions_needed)
new Cube(null, null, null, transitions_needed, direction);
if (Main.expo._shown) {
original_mw_moveToWorkspace(workspace, direction_hint);
} else {
let [transitions_needed, direction] = getTransitionsAndDirection(workspace);
if (transitions_needed)
new Cube(null, null, null, transitions_needed, direction);
}
}

// Our version of activateWindow which will be Monkey Patched over the cinnamon version
Expand All @@ -910,6 +916,42 @@ function activateWindow(window, time, workspaceNum) {
original_main_activateWindow(window, time, workspaceNum);
}
}
// Extension Workspace Switching API
// This function can be used by other programs to initiate a workspace change using the Cube effect
// The direction argument must be Meta.MotionDirection.RIGHT or Meta.MotionDirection.LEFT
// The window argument (optional) is a Meta.Window that will follow the workspace switch
function ExtSwitchWorkspace(direction, window) {
if (direction !== Meta.MotionDirection.RIGHT && direction !== Meta.MotionDirection.LEFT)
return;
if (window & !(window instanceof Meta.Window))
window = null;
let new_workspace = global.screen.get_active_workspace().get_neighbor(direction);
if (curDesktopCube && curDesktopCube.is_animating) {
curDesktopCube.transitions.push(direction);
} else {
curDesktopCube = new Cube(null, null, null, 1, direction);
if (window)
curDesktopCube.moveWindow(window, direction);
}
}

// Extension Workspace Switching API
// This function can be used by other programs to initiate a workspace change using the Cube effect
// The workspace argument must be a Meta.Workspace instance
function ExtSwitchToWorkspace(workspace) {
if (workspace instanceof Meta.Workspace) {
let [transitions_needed, direction] = getTransitionsAndDirection(workspace);
if (transitions_needed) {
if (curDesktopCube && curDesktopCube.is_animating) {
for (let i=0 ; i<transitions_needed ; i++) {
curDesktopCube.transitions.push(direction);
}
} else {
curDesktopCube = new Cube(null, null, null, transitions_needed, direction);
}
}
}
}

function CubeSettings(uuid) {
this._init(uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"includePanels": {
"type": "checkbox",
"description": "Include Panels",
"tooltip": "Include the panels while animating. In most cases the panels are not properly painted or completely invisible anyhow, so it's best to leave this disabled",
"default": false
},
"patchmoveToWorkspace": {
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"4.6",
"5.4"
],
"version": "2.0.1",
"version": "2.0.2",
"uuid": "DesktopCube@yare",
"name": "Desktop Cube",
"description": "Compiz Cube-like animation for workspace switching",
Expand Down
11 changes: 9 additions & 2 deletions DesktopCube@yare/files/DesktopCube@yare/po/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: DesktopCube@yare 2.0.0\n"
"Project-Id-Version: DesktopCube@yare 2.0.2\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -80,6 +80,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2024-08-25 22:27+0200\n"
"Last-Translator: \n"
"Language-Team: Odyssey <[email protected]>\n"
Expand Down Expand Up @@ -83,6 +83,13 @@ msgstr ""
msgid "Include Panels"
msgstr "Incloure els taulers"

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/da.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2022-08-07 15:06+0200\n"
"Last-Translator: Alan Mortensen <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -83,6 +83,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2021-03-02 22:50+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -83,6 +83,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2024-11-20 18:29-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -82,6 +82,13 @@ msgstr "Tamaño del cubo (porcentaje del tamaño de la pantalla)"
msgid "Include Panels"
msgstr "Incluir paneles"

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr "Utilizar el efecto Cubo con el applet de cambio de espacio de trabajo"
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/eu.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2024-05-30 10:18+0200\n"
"Last-Translator: Muxutruk <[email protected]>\n"
"Language-Team: Basque <[email protected]>\n"
Expand Down Expand Up @@ -82,6 +82,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: DesktopCube@yare 1.1.0\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: \n"
"Last-Translator: Kimmo Kujansuu <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -82,6 +82,13 @@ msgstr ""
msgid "Include Panels"
msgstr "Sisältää paneelit"

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2019-02-13 16:49+0100\n"
"Last-Translator: Claudiux <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -83,6 +83,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/hr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: DesktopCube@yare\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2017-04-30 16:57+0200\n"
"Last-Translator: gogo <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -84,6 +84,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2024-11-25 13:45+0100\n"
"Last-Translator: Kálmán „KAMI” Szalai <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -81,6 +81,13 @@ msgstr "Kocka mérete (a képernyő méretének százalékában)"
msgid "Include Panels"
msgstr "Tartalmazza a paneleket"

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr "Használja a Kocka effektust a Munkaterület-váltó kisalkalmazással"
Expand Down
9 changes: 8 additions & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-11-20 10:20-0500\n"
"POT-Creation-Date: 2024-12-21 14:16-0500\n"
"PO-Revision-Date: 2022-06-03 10:52+0200\n"
"Last-Translator: Dragone2 <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -84,6 +84,13 @@ msgstr ""
msgid "Include Panels"
msgstr ""

#. 5.4->settings-schema.json->includePanels->tooltip
msgid ""
"Include the panels while animating. In most cases the panels are not "
"properly painted or completely invisible anyhow, so it's best to leave this "
"disabled"
msgstr ""

#. 5.4->settings-schema.json->patchmoveToWorkspace->description
msgid "Use Cube effect with the Workspace Switcher applet"
msgstr ""
Expand Down
Loading
Loading