-
Notifications
You must be signed in to change notification settings - Fork 0
/
.macos
executable file
·62 lines (50 loc) · 2.52 KB
/
.macos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
# Based on ~/.macos — https://mths.be/macos
###############################################################################
# Terminal #
###############################################################################
echo "[.macos] Setting up Terminal.app, installing and setting up custom theme."
# Use the modified version of the Smyck theme by default in Terminal.app
osascript <<EOD
tell application "Terminal"
local allOpenedWindows
local initialOpenedWindows
local windowID
set themeName to "Smyck Custom"
(* Store the IDs of all the open terminal windows. *)
set initialOpenedWindows to id of every window
(* Open the custom theme so that it gets added to the list
of available terminal themes (note: this will open two
additional terminal windows). *)
do shell script "open 'bootstrap/" & themeName & ".terminal'"
(* Wait a little bit to ensure that the custom theme is added. *)
delay 1
(* Set the custom theme as the default terminal theme. *)
set default settings to settings set themeName
(* Get the IDs of all the currently opened terminal windows. *)
set allOpenedWindows to id of every window
repeat with windowID in allOpenedWindows
(* Close the additional windows that were opened in order
to add the custom theme to the list of terminal themes. *)
if initialOpenedWindows does not contain windowID then
close (every window whose id is windowID)
(* Change the theme for the initial opened terminal windows
to remove the need to close them in order for the custom
theme to be applied. *)
else
set current settings of tabs of (every window whose id is windowID) to settings set themeName
end if
end repeat
end tell
EOD
###############################################################################
# Homebrew #
###############################################################################
#echo "[.macos] Installing Homebrew."
#/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
###############################################################################
# RVM #
###############################################################################
echo "[.macos] Installing RVM."
\curl -sSL https://get.rvm.io | bash -s stable
echo "[.macos] Done. Note that some of these changes require a logout/restart to take effect."