/
config-atom.sh
139 lines (123 loc) · 3 KB
/
config-atom.sh
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/bin/bash
clear
printf "\n\033[104mAtom IDE Installer & Configuration Script\033[49m\n"
printf "by James Peret - http://jamesperet.com\n\n"
# Load installer script dependencies
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/core.sh
function install_plugins {
# install Atom Plugins
echo "Installing Atom Plugins:"
apm install graphite-ui
apm install railscast-theme
apm install browser-plus
apm install term2
apm install file-icons
apm install pane-layout-plus
apm install pigments
apm install project-manager
apm install project-sidebar
#apm install git-tab-status
apm install less-than-slash
apm install wordcount
apm install markdown-preview-opener
apm install markdown-scroll-sync
apm install maybs-quit
apm install time-status
apm install wakatime
#apm install toggle-tabs
apm install pane-info
apm install rails-partials
}
function configure_keymap {
echo "Configuring keymap"
printf "
'body':
'f6': 'status-bar:toggle'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-alt-tab' : 'window:focus-next-pane'
'ctrl-alt-shift-tab' : 'window:focus-previous-pane'
'ctrl-alt-cmd-p' : 'project-sidebar:toggle'
" > $HOME/.atom/keymap.cson
}
function configure_styles {
echo "Configuring sytles"
printf "
atom-workspace .browser-page webview {
margin: 0px;
}
webview {
margin: 0px;
}
.pane-info {
margin-right: 12px;
margin-top: 8px;
}
.right.tool-panel.panel-right {
background-color: #2B2E31;
}
.project-sidebar.padded {
background-color: #3a3e42;
line-height: 32px;
height: 40px;
padding: 0px;
color: #ffffff;
}
.project-sidebar.padded h1 {
margin: 0px;
padding: 0px;
height: 40px;
font-size: 13px;
font-weight: 400;
padding-top: 16px;
padding-left: 8px;
}
.project-sidebar.padded li {
padding-left: 8px;
padding-right: 10px;
}
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/*text-rendering: optimizeLegibility; */
}
.tree-view-resizer, .editor {
::-webkit-scrollbar {
width: 0.5em;
height: 0.5em;
}
::-webkit-scrollbar-track {
background-color: #303030;
}
::-webkit-scrollbar-thumb {
background-color: lighten(#303030, 15%%);
}
}
\n
" > $HOME/.atom/styles.less
}
function check_dependencies {
if [ $(program_is_installed atom) ] ; then
if [ $(program_is_installed node) ] ; then
if [ ! $(program_is_installed apm) ] ; then
echo "APM is not installed. Opening the Atom editor and click on Install Shell Commands."
return false
fi
return true
else
echo "Node is not installed. Please make sure it is intalled before procedding with this script."
return false
fi
else
echo "Atom is not installed. Please make sure it is intalled before procedding with this script."
return false
fi
}
# Run Program
if [ check_dependencies ] ; then
install_plugins
configure_keymap
configure_styles
echo "\n\n\033[32mATOM CONFIGURED SUCCESFULLY\n\n"
fi