Totalspaces 2.2.20 Notification Graphic doesn't disappear

I’m using Totalspaces 2.2.20 on Yosemite 10.10.5. I’m using magicprefs to simulate the keystrokes I use to change spaces on the Magic Mouse.
When I use any magic mouse swipe gestures to change spaces the Notification Graphic hangs around for over 10 seconds. It isn’t a problem if I just use the keyboard.

I see there’s a few other posts with this issue, is there some way to hard limit the onscreen time of the Notification Graphic or disable the extended time that happens when you hold down the modifier keys? If I understand what’s happening correctly Totalspaces isn’t getting the message that the modifier keys are being key-upped when you use keystroke simulation software.

Alternately is there a way to use applescript to change spaces? Magicprefs has some applescript functionality so that’d be really handy and would hopefully bypass the issue of totalspaces waiting for a keyup on modifiers.

Thanks in advance!

Yes I recall one or two others having this problem. You are correct in your analysis.

Do you have Xcode / the apple dev tools installed? If so you can use ruby - do this first:

gem install totalspaces2

Then make a file (changeSpace.rb) containing this script

Then use applescript to call the command

ruby changeSpace.rb 3

(use the space number you want to change to, numbering starts at 1 for top left)

So the applescript would be

do shell script "ruby changeSpace.rb 3"

you may need to give the path to where you stored the script - e.g.

do shell script "ruby ~/Documents/changeSpace.rb 3"

By the way, important to note - controlling TotalSpaces2 this way will only work if you have a registered version of TotalSpaces2.

Oh, and finally, if you need to simulate left/right/up/down rather than changing to a specific space, then the scripts you use will need to figure out which space to go to based on the layout and the current space. I can post you some example scripts if you need.

Thanks for the reply Stephen! I’d love some example scripts if you have the time to post some.
I generally use a 2x2 grid but yosemite will add a new screen for fullscreen apps, I’m wondering if this will cause a problem?

Try these: https://gist.github.com/sdsykes/0c441d4cd854e197c8ce

Adding full screen apps shouldn’t be a problem

Thanks for all the great help so far Stephen, could you help possibly with the error I’m getting trying to get the gem installed?

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
	--with-ffi_c-dir
	--without-ffi_c-dir
	--with-ffi_c-include
	--without-ffi_c-include=${ffi_c-dir}/include
	--with-ffi_c-lib
	--without-ffi_c-lib=${ffi_c-dir}/
	--with-libffi-config
	--without-libffi-config
	--with-pkg-config
	--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
	from extconf.rb:16:in `<main>'

I have xcode installed and ran this to make sure, there are no updates available.

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I’m not quite sure how to install the development tools ruby is expecting.

Thanks in advance!

Normally if you are using the system ruby, you would just do something like this:

$ sudo gem install totalspaces2
Fetching: ffi-1.9.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.10
Fetching: totalspaces2-2.2.1.gem (100%)
Successfully installed totalspaces2-2.2.1
Parsing documentation for ffi-1.9.10
Installing ri documentation for ffi-1.9.10
Parsing documentation for totalspaces2-2.2.1
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/libtotalspaces2api.dylib, skipping
Installing ri documentation for totalspaces2-2.2.1
2 gems installed
$

Was this the command you were trying?

Hi Stephen, yes that is exactly the command I used. I’ve repeated it just now to confirm and it still produces the error I posted earlier.

And… I believe I found the problem while typing this up:
Software Update updated xcode to version 7.0, with a new licence that needed acceptance. Opening xcode and accepting the licence enabled installation of the gem using the command you listed above.

Ah, good to know, I didn’t think of that.