MagicPrefs Tips

Tips, tricks and configuration hints

Topics


AppleScript Actions

AppleScript custom target actions can be very powerful and use complex scripts. Here are however a couple iTunes control one liners to get you started.

Select a line below and copy it to clipboard then just enter a name and press plus in the "Manage Applescript Actions" window in MagicPrefs.

tell application "iTunes" to play
tell application "iTunes" to stop
tell application "iTunes" to pause
tell application "iTunes" to playpause
tell application "iTunes" to next track
tell application "iTunes" to previous track
tell application "iTunes" to set mute to true
tell application "iTunes" to set mute to false
tell application "iTunes" to quit
tell application "iTunes" to launch
set volume 0
set volume 7
set volume output muted true
set volume output muted false

Reverse gesture logic

For some specific gestures on the trackpad Apple implemented reverse logic so for example if you swiped up to expose desktop, swiping down hides it.

A simple way to achieve the same functionality with MagicPrefs is for example assign the same "Expose Desktop" action to both swipe up and swipe down, this works for any "toggling" type action.

This is not what you want however if for example you have swipe down set to "spaces down" and swipe up to "spaces up", if you are at say space 5 when you swipe up you want to go to space 4 and swipe down back to space 5, not have it go to 3 by reversing your action.

Custom keyboard sequences

You can create keyboard macros and shortcuts in the "Manage Keyboard Actions" window, either for existing system shortcuts of a key sequence of your own, here are some examples of shortcuts already available in OSX:

⌥ ← Move one word left
⌥ → Move one word right
⌘ ⇧ . Show hidden files in open and save dialogs (10.6 only)
⌘ ⇧ ⌥ ⌫ Empty Trash
Ctrl ⌥ ⌘ * Toggle Monochrome Hi Visibility
⌘ ⇧ 4 space ctrl Camera Shot of Window
⌘ ⌥ D Show/Hide Dock
⌘ ctrl D Show Dictionary definition of word

Hybrid Application Switcher

You can create a custom keyboard action with the "Tab" key, assign it to a gesture, then perform that gesture while holding ⌘ on the keyboard to switch applications.

Even more tracking speed

I found it pretty hard to use the mouse with a tracking speed over 9 on a 1920x1200 resolution, however some people might want to set the speed even higher than currently possible.

Apple allows you to set it as high as 3, MagicPrefs as high as 9, however you can set is as high as you like by entering the next line in the terminal (remember however that you probably hit the the physical limitations of the sensor at around 15-20).

defaults write com.vladalexa.MagicPrefs TrackingMouse -int 15

Volume Down applescript

set curVolume to output volume of (get volume settings)
if curVolume > 10 then
    set newVolume to curVolume - 10
else
    set newVolume to 1
end if
set volume output volume newVolume

Volume Up applescript

set curVolume to output volume of (get volume settings)
if curVolume < 90 then
    set newVolume to curVolume + 10
else
    set newVolume to 100
end if
set volume output volume newVolume

Open links in new browser tab

The quick way of right clicking a link and selecting "open in a new tab" is cmd clicking or middle clicking the link, it works in all browsers however middle clicking does not work for all types of links.

With MagicPrefs you can assign cmd click or middle click to a gesture and use that to ease the common task of opening links in new tabs.

More recent applications

The number of applications shown by the MagicPrefs Recent Applications action can be configured from System Preferences > Appearance > Number of recent items.

However keep in mind that applications that are already running will not be shown in the Recent Applications launcher MagicPrefs action.

Tweak gesture zones

You can edit the zones for any gesture to suit you needs, a lot of people prefer the middle axis zone to be wider or narrower for example.

You can also set gestures like pinch with a zone in the middle of the mouse in order to remove chances of triggering pinches by mistake.

Fine tuning tracking speed

MagicPrefs does not have available in the interface the fine tune tracking speed settings from the apple control panel, however they can be set manually by entering the next command in Terminal.app (change 0.3125 to your desired speed):

defaults write com.vladalexa.MagicPrefs TrackingMouse -float 0.3125
defaults write com.vladalexa.MagicPrefs TrackingTrackpad -float 0.3125

The Apple Tracking speed slider for the Magic Mouse and Magic Trackpad has 10 speed settings : 0.0, 0.125, 0.3125, 0.5, 0.6875, 0.875, 1.0, 1.7, 2.0, 3.0

The MagicPrefs Magic Mouse tracking speed slider has 10 speed settings : 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0

The MagicPrefs Magic Trackpad tracking speed slider has 10 speed settings : 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0

Moving MagicPrefs from /Applications

MagicPrefs automatically moves itself to /Applications in order to address user confusion and compliance with Apple guidelines that state "Applications should be placed in the /Applications directory", however it is possible to override this behavior entering the command below in Terminal

defaults write com.vladalexa.MagicPrefs noAppRelocation -bool YES

Quit, move and restart MagicPrefs and everything should work fine.