custom keyboard shortcuts.
This commit is contained in:
parent
d116cd5747
commit
88487ad4cd
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"last-messagetrace-stamp" = "443574198.75797";
|
"last-messagetrace-stamp" = "443574198.75797";
|
||||||
"mod-count" = 13;
|
"mod-count" = 19;
|
||||||
|
orientation = left;
|
||||||
"persistent-apps" = (
|
"persistent-apps" = (
|
||||||
{
|
{
|
||||||
|
GUID = 2438372023;
|
||||||
"tile-data" = {
|
"tile-data" = {
|
||||||
"bundle-identifier" = "com.google.Chrome";
|
"bundle-identifier" = "com.google.Chrome";
|
||||||
"dock-extra" = 0;
|
"dock-extra" = 0;
|
||||||
@ -12,13 +14,14 @@
|
|||||||
"_CFURLStringType" = 15;
|
"_CFURLStringType" = 15;
|
||||||
};
|
};
|
||||||
"file-label" = "Google Chrome";
|
"file-label" = "Google Chrome";
|
||||||
"file-mod-date" = 0;
|
"file-mod-date" = 3504649853;
|
||||||
"file-type" = 1;
|
"file-type" = 41;
|
||||||
"parent-mod-date" = 0;
|
"parent-mod-date" = 3504728909;
|
||||||
};
|
};
|
||||||
"tile-type" = "file-tile";
|
"tile-type" = "file-tile";
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GUID = 2438372024;
|
||||||
"tile-data" = {
|
"tile-data" = {
|
||||||
"bundle-identifier" = "org.gnu.Emacs";
|
"bundle-identifier" = "org.gnu.Emacs";
|
||||||
"dock-extra" = 0;
|
"dock-extra" = 0;
|
||||||
@ -28,9 +31,9 @@
|
|||||||
"_CFURLStringType" = 15;
|
"_CFURLStringType" = 15;
|
||||||
};
|
};
|
||||||
"file-label" = Emacs;
|
"file-label" = Emacs;
|
||||||
"file-mod-date" = 0;
|
"file-mod-date" = 3504729913;
|
||||||
"file-type" = 1;
|
"file-type" = 41;
|
||||||
"parent-mod-date" = 0;
|
"parent-mod-date" = 3504729939;
|
||||||
};
|
};
|
||||||
"tile-type" = "file-tile";
|
"tile-type" = "file-tile";
|
||||||
},
|
},
|
||||||
@ -52,6 +55,7 @@
|
|||||||
"tile-type" = "file-tile";
|
"tile-type" = "file-tile";
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GUID = 2438372025;
|
||||||
"tile-data" = {
|
"tile-data" = {
|
||||||
"bundle-identifier" = "com.apple.appstore";
|
"bundle-identifier" = "com.apple.appstore";
|
||||||
"dock-extra" = 1;
|
"dock-extra" = 1;
|
||||||
@ -68,6 +72,7 @@
|
|||||||
"tile-type" = "file-tile";
|
"tile-type" = "file-tile";
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GUID = 2438372026;
|
||||||
"tile-data" = {
|
"tile-data" = {
|
||||||
"bundle-identifier" = "com.googlecode.iterm2";
|
"bundle-identifier" = "com.googlecode.iterm2";
|
||||||
"dock-extra" = 0;
|
"dock-extra" = 0;
|
||||||
@ -77,13 +82,14 @@
|
|||||||
"_CFURLStringType" = 15;
|
"_CFURLStringType" = 15;
|
||||||
};
|
};
|
||||||
"file-label" = iTerm;
|
"file-label" = iTerm;
|
||||||
"file-mod-date" = 0;
|
"file-mod-date" = 3488239870;
|
||||||
"file-type" = 1;
|
"file-type" = 41;
|
||||||
"parent-mod-date" = 0;
|
"parent-mod-date" = 3504729029;
|
||||||
};
|
};
|
||||||
"tile-type" = "file-tile";
|
"tile-type" = "file-tile";
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GUID = 2438372027;
|
||||||
"tile-data" = {
|
"tile-data" = {
|
||||||
"bundle-identifier" = "com.apple.systempreferences";
|
"bundle-identifier" = "com.apple.systempreferences";
|
||||||
"dock-extra" = 1;
|
"dock-extra" = 1;
|
||||||
@ -93,9 +99,9 @@
|
|||||||
"_CFURLStringType" = 15;
|
"_CFURLStringType" = 15;
|
||||||
};
|
};
|
||||||
"file-label" = "System Preferences";
|
"file-label" = "System Preferences";
|
||||||
"file-mod-date" = 0;
|
"file-mod-date" = 3504731361;
|
||||||
"file-type" = 1;
|
"file-type" = 41;
|
||||||
"parent-mod-date" = 0;
|
"parent-mod-date" = 3504739121;
|
||||||
};
|
};
|
||||||
"tile-type" = "file-tile";
|
"tile-type" = "file-tile";
|
||||||
}
|
}
|
||||||
|
@ -36,14 +36,6 @@
|
|||||||
"com.apple.LSSharedFileList.Binding" = <646e6962 00000000 02000000 00000000 00000000 00000000 00000000 48000000 00000000 66696c65 3a2f2f6c 6f63616c 686f7374 2f6f7074 2f686f6d 65627265 772d6361 736b2f43 61736b72 6f6f6d2f 63616666 65696e65 2f312e31 2e312f43 61666665 696e652e 6170702f 18000000 00000000 636f6d2e 6c696768 74686561 6473772e 43616666 65696e65 01002000 00040000 8e48101e 02000000 610d4b11>;
|
"com.apple.LSSharedFileList.Binding" = <646e6962 00000000 02000000 00000000 00000000 00000000 00000000 48000000 00000000 66696c65 3a2f2f6c 6f63616c 686f7374 2f6f7074 2f686f6d 65627265 772d6361 736b2f43 61736b72 6f6f6d2f 63616666 65696e65 2f312e31 2e312f43 61666665 696e652e 6170702f 18000000 00000000 636f6d2e 6c696768 74686561 6473772e 43616666 65696e65 01002000 00040000 8e48101e 02000000 610d4b11>;
|
||||||
};
|
};
|
||||||
Name = Caffeine;
|
Name = Caffeine;
|
||||||
},
|
|
||||||
{
|
|
||||||
Alias = <00000000 00e80003 00010000 d0666a57 0000482b 00000000 000d44b9 000d44c9 0000d0e4 b67d0000 00000920 fffe0000 00000000 0000ffff ffff0001 0014000d 44b9000d 44b8000c fafc000c fafb000c fafa000e 00240011 0047006f 006f0067 006c0065 00200043 00680072 006f006d 0065002e 00610070 0070000f 001a000c 004d0061 00630069 006e0074 006f0073 00680020 00480044 00120041 6f70742f 686f6d65 62726577 2d636173 6b2f4361 736b726f 6f6d2f67 6f6f676c 652d6368 726f6d65 2f6c6174 6573742f 476f6f67 6c652043 68726f6d 652e6170 70000013 00012f00 ffff0000>;
|
|
||||||
CustomItemProperties = {
|
|
||||||
"com.apple.LSSharedFileList.Binding" = <646e6962 00000000 02000000 00000000 00000000 00000000 00000000 55000000 00000000 66696c65 3a2f2f6c 6f63616c 686f7374 2f6f7074 2f686f6d 65627265 772d6361 736b2f43 61736b72 6f6f6d2f 676f6f67 6c652d63 68726f6d 652f6c61 74657374 2f476f6f 676c6525 32304368 726f6d65 2e617070 2f110000 00000000 00636f6d 2e676f6f 676c652e 4368726f 6d650000 e00b00ec 21008e48 10100200 00008879 321a>;
|
|
||||||
"com.apple.loginitem.HideOnLaunch" = 1;
|
|
||||||
};
|
|
||||||
Name = "Google Chrome";
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Alias = <00000000 00c80003 00010000 d0666a57 0000482b 00000000 000e8bc0 000e8be2 0000cd4f 46800000 00000920 fffe0000 00000000 0000ffff ffff0001 0014000e 8bc0000e 8bbf000c fafc000c fafb000c fafa000e 00140009 0053006c 00610074 0065002e 00610070 0070000f 001a000c 004d0061 00630069 006e0074 006f0073 00680020 00480044 00120031 6f70742f 686f6d65 62726577 2d636173 6b2f4361 736b726f 6f6d2f73 6c617465 2f6c6174 6573742f 536c6174 652e6170 70000013 00012f00 ffff0000>;
|
Alias = <00000000 00c80003 00010000 d0666a57 0000482b 00000000 000e8bc0 000e8be2 0000cd4f 46800000 00000920 fffe0000 00000000 0000ffff ffff0001 0014000e 8bc0000e 8bbf000c fafc000c fafb000c fafa000e 00140009 0053006c 00610074 0065002e 00610070 0070000f 001a000c 004d0061 00630069 006e0074 006f0073 00680020 00480044 00120031 6f70742f 686f6d65 62726577 2d636173 6b2f4361 736b726f 6f6d2f73 6c617465 2f6c6174 6573742f 536c6174 652e6170 70000013 00012f00 ffff0000>;
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
NSQuitAlwaysKeepsWindows = 0;
|
NSQuitAlwaysKeepsWindows = 0;
|
||||||
"NSWindow Frame Main Window Frame SystemPreferencesApp 8.0" = "69 472 668 476 0 0 1680 1027 ";
|
"NSWindow Frame Main Window Frame SystemPreferencesApp 8.0" = "69 455 668 493 0 0 1680 1027 ";
|
||||||
|
SecurityPrefTab = General;
|
||||||
ThirdPartyCount = 4;
|
ThirdPartyCount = 4;
|
||||||
"com.apple.PreferenceSync.ExcludeSyncKeys" = (
|
"com.apple.PreferenceSync.ExcludeSyncKeys" = (
|
||||||
"Main Window Frame SystemPreferencesApp 8.0"
|
"Main Window Frame SystemPreferencesApp 8.0"
|
||||||
);
|
);
|
||||||
|
"com.apple.SecurityPref.Privacy.LastSourceSelected" = 0;
|
||||||
"com.apple.preferences.accounts.outline.usersparent" = 1;
|
"com.apple.preferences.accounts.outline.usersparent" = 1;
|
||||||
"com.apple.preferences.sharing.selectedservice" = 3;
|
"com.apple.preferences.energysaver" = {
|
||||||
|
hasBeenWarnedAboutEnergyUsage = YES;
|
||||||
|
};
|
||||||
|
"com.apple.preferences.sharing.selectedservice" = 1;
|
||||||
}
|
}
|
||||||
|
41
tasks/osx.py
41
tasks/osx.py
@ -19,7 +19,7 @@ def setup(ctx):
|
|||||||
iTerm(ctx)
|
iTerm(ctx)
|
||||||
# setup_dbus(ctx)
|
# setup_dbus(ctx)
|
||||||
keyboard_settings(ctx)
|
keyboard_settings(ctx)
|
||||||
clear_dock(ctx)
|
custom_keyboard_shortcuts(ctx)
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
@ -171,36 +171,31 @@ def keyboard_settings(ctx):
|
|||||||
ctx.run("zsh -c 'refresh_config && set_modifier_keys_on_all_keyboards'")
|
ctx.run("zsh -c 'refresh_config && set_modifier_keys_on_all_keyboards'")
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
settings_directory = os.path.join(util.RESOURCES_DIRECTORY, 'osx_settings')
|
||||||
def configure_dock(ctx):
|
all_save_settings = []
|
||||||
ctx.run("zsh -c 'refresh_config && clear_dock'")
|
all_write_settings = []
|
||||||
|
all_diff_settings = []
|
||||||
|
|
||||||
osx_settings_directory = os.path.join(util.RESOURCES_DIRECTORY, 'osx_settings')
|
|
||||||
all_save_osx_settings = []
|
|
||||||
all_write_osx_settings = []
|
|
||||||
all_diff_osx_settings = []
|
|
||||||
def functions_for_filename(filename):
|
def functions_for_filename(filename):
|
||||||
filepath = os.path.join(osx_settings_directory, filename)
|
filepath = os.path.join(settings_directory, filename)
|
||||||
task_name = 'osx_settings-write:' + filename.replace('.', '-')
|
task_name = 'settings-write:' + filename.replace('.', '-')
|
||||||
@ctask(name=task_name)
|
@ctask(name=task_name)
|
||||||
def task(ctx):
|
def task(ctx):
|
||||||
ctx.run("defaults write {0} '$(cat {1})'".format(
|
ctx.run("defaults write {0} '$(cat {1})'".format(
|
||||||
filename, filepath
|
filename, filepath
|
||||||
))
|
))
|
||||||
globals()[task_name] = task
|
globals()[task_name] = task
|
||||||
all_write_osx_settings.append(task)
|
all_write_settings.append(task)
|
||||||
|
|
||||||
task_name = 'osx_settings-save:' + filename.replace('.', '-')
|
task_name = 'settings-save:' + filename.replace('.', '-')
|
||||||
@ctask(name=task_name)
|
@ctask(name=task_name)
|
||||||
def task(ctx):
|
def task(ctx):
|
||||||
ctx.run("defaults read {0} > {1}".format(
|
ctx.run("defaults read {0} > {1}".format(
|
||||||
filename, filepath
|
filename, filepath
|
||||||
))
|
))
|
||||||
globals()[task_name] = task
|
globals()[task_name] = task
|
||||||
all_save_osx_settings.append(task)
|
all_save_settings.append(task)
|
||||||
|
|
||||||
task_name = 'osx_settings-diff:' + filename.replace('.', '-')
|
task_name = 'settings-diff:' + filename.replace('.', '-')
|
||||||
@ctask(name=task_name)
|
@ctask(name=task_name)
|
||||||
def task(ctx):
|
def task(ctx):
|
||||||
print filepath
|
print filepath
|
||||||
@ -209,13 +204,19 @@ def functions_for_filename(filename):
|
|||||||
filename, filepath
|
filename, filepath
|
||||||
))
|
))
|
||||||
globals()[task_name] = task
|
globals()[task_name] = task
|
||||||
all_diff_osx_settings.append(task)
|
all_diff_settings.append(task)
|
||||||
for _, _, filenames in os.walk(osx_settings_directory):
|
for _, _, filenames in os.walk(settings_directory):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
functions_for_filename(filename)
|
functions_for_filename(filename)
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def osx_settings_write_all(ctx):
|
def settings_write_all(ctx):
|
||||||
for function in all_write_osx_settings:
|
for function in all_write_settings:
|
||||||
function(ctx)
|
function(ctx)
|
||||||
|
|
||||||
|
|
||||||
|
@ctask
|
||||||
|
def custom_keyboard_shortcuts(ctx):
|
||||||
|
command_string = """defaults write -globalDomain NSUserKeyEquivalents '{"Enter Full Screen" = "@\U21a9";"Exit Full Screen" = "@\U21a9";"Full Screen" = "@\U21a9";}'"""
|
||||||
|
ctx.run(command_string)
|
||||||
|
Loading…
Reference in New Issue
Block a user