Linux Mint workspace switch time
I think the animation of switch workspace is annoying.So, in Cinnamon 3.0.7, I backup
/usr/share/cinnamon/js/ui/windowManager.js
and edit
const WINDOW_ANIMATION_TIME = 0.25;
to
const WINDOW_ANIMATION_TIME = 0;
then restart cinnamon by Alt+F2, input r and Enter
And you can set bigger number to make animation slower.
It's complicated: Yes and no.
Yes, it is possible by configuring certain variable that is found in the source code of Cinnamon workspace switcher. No, because it does not work as expected.
Switching time is hardcoded
The only clue about the workspace switching time was found at GitHub repository, where source codes for Cinnamon is maintained. This comment from a contributor in late 2013 was the clue.
[...] there's a hardcoded .25 second animation for switching workspaces when effects are enabled.
Now we know that the animation is hardcoded, but there was no indication on which part of the source code the comment actually meant. However, searching within the repostitory include result of this location in the source code directory.
The directory path is /usr/share/cinnamon/js/ui/
for Cinnamon in Linux Mint that has been installed on local machine. There are two files that seemed relevant in the directory.
workspace.js
with the lineconst FOCUS_ANIMATION_TIME = 0.15;
workspacesView.js
with the lineconst WORKSPACE_SWITCH_TIME = 0.25;
By comparing with ".25 second" comment, the relevant file is most likely workspacesView.js
that is tally with 0.25
value used in the file. The other line with 0.15
has since been removed at all.
Manual configuration in Cinnamon
Cinnamon is based on GTK+ 3, which is similar to how GNOME 3 works. This means, some source codes are written in JavaScript. Cinnamon workspace switcher is one of them. Source code written in JavaScript requires no compilation to run, so any changes made could be applied immediately.
The four simple steps to make changes:
Open the JavaScript file in a text editor with root or sudo permission.
Change the constant value to a larger value for slower animation, vice versa.
Save the file.
Restart Cinnamon (Press Alt+F2, and press R then Enter).
Finally, user can test and observe the changes made to the animation.
Does not work as expected
Workspace switching time: The JavaScript file is workspacesView.js
and the constant value is changed from 0.25
to 3.25
or any value of choice. But that does not seem to work: I observed no difference, regardless of using the shortcut keys or using the workspace switcher applet.
I have a proof that worked for me, which is to change the animation duration for toggle scale that has keyboard shortcut of Ctrl+Alt+Down keys.
// Time for initial animation going into Overview mode
const ANIMATION_TIME = 0.25;
Toggle scale time: The JavaScript file is overview.js
and the constant value is changed from 0.25
to 3.25
similarly. This time, the four simple steps will result in successful, longer animation of toggle scale. At 3.25 seconds, I observed the result in a slow motion.
If the changes made were successful, then one would certainly notice.
Disclaimer: This answer assumes that user has enabled the desktop effects in Cinnamon. Go to System Settings > Appearance - Effects. Look for "Enable effects" or similar option and make sure it is ON or checked.
If the instructions didn't work, that means either the schema is deprecated, or other dependencies are preventing the changes from being applied. Someone else may have a better answer.
Tested with Cinnamon 2.2 in Linux Mint 17 (Qiana), and Cinnamon 3.8 in Linux Mint Debian Edition 3 (Cindy). Does not work as expected, yet.