-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmacos.txt
302 lines (214 loc) · 6.06 KB
/
macos.txt
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# Misc
ctrl-shift-power // lock screen, sleep
^ = ctrl
fn + arrow up/down // page up/down
fn + left // home key
fn + right // end key
# Zooming
Preferences -> Accessibility -> Zoom
opt-cmd-= // zoom in
opt-cmd-- // zoom out
opt-cmd-8 // toggle zoom
# Customize keyboard touch bar
Finder -> View -> Customize touch bar
Finder
======
rm ~/Library/Preferences/com.apple.finder.plist* // Delete folder view settings
find / -name '.DS_Store' -type f -delete // Delete all .DS_Store files
Shortcuts
---------
cmd-n // new window
cmd-t // new tab at home
cmd-i // get ifno
cmd-<arrows> // navigate into forward/backward/up/down
ctrl-cmd-o // open tab at current location
cmd-[123] // change view
cmd-shift-h // home
cmd-shift-d // desktop
cmd-shift-g // go to
cmd-shift-n // create new folder
Default view
------------
Size: 52x52
Grid: half slider
Text: 11
Arrange: name
Sort: kind
Copying path finder/terminal
----------------------------
terminal -> finder
open .
finder -> terminal
* Right click -> Get info
* Drag & drop to terminal
* Shift - cmd - g
# file system, df
diskutil list // overview devices
diskutil info /dev/disk1 // show information
diskutil mount /dev/disk1s1
diskutil umount /Volumes/hdd
Disk Utility // for formatting devices
# Open application
open -a preview
open -a firefox index.html
# Create application
dir="/Applications/X.app/Contents/MacOS"
sudo mkdir -p $dir
sudo cp bin $dir
# currencies
^ + shift + 2 // euro
^ + 3 // pounds
# iterm
cmd - shift - t // toggle show tabs in fullscreen mode
cmd - t // new tab
cmd - [123] // switch between tabs
cmd - ^ - [123] // switch between windows
cmd - return // toggle fullscreen
cmd - d // split vertically
cmd - shift - d // split horizontally
cmd - opt - arrows // navigate between panes
cmd - shift - return // toggle fullscreen pane
cmd - f // find
drop down menu // regular expression search
cmd - g // find next
cmd - shift - g // find previous
cmd - {+,-,0} // text {bigger, smaller, normal}
cmd - shift - h // paste history
middle button // paste from clipboard
^ - space // hotkey to switch to terminal
ctrl-k // clear screen
cmd-^-b // open instant replay
## tmux integration
tmux -CC // start new session
tmux -CC attach // attach to session
## Misc
Open in fullscreen: profiles -> windows -> style -> fullscreen
open . // open Finder from current pwd
reset // fixes special characters when pasting text
# Keyboard shortcuts
cmd - n // new
cmd - m // minimise
cmd - h // hide
cmd - space // spotlight
shift-cmd-c // open finder
cmd - shift . // show hidden files in finder (not in list mode)
cmd - f5 // toggle voiceover
# Switch application
cmd - tab // next
cmd - ~ // previous
# Mission control
ctrl - up // switch workspaces
ctrl - down // switch windows
F11 // show desktop
F12 // show dashboard
^-[12] // switch to desktop
Double click window title // increase size of window
# Screenshots
cmd-shift-4 // select region
cmd-shift-4-space // current window
ctrl - ... // copy to clipboard instead of desktop
# Zotero
hold opt // highlight collection
cmd+drag // move items between collections
cmd+shift+c // copy long
cmd+shift+a // copy short
shift+enter // insert next author
## Firefox
cmd+shift+z // show zotero
cmd+shift+s // save item with pdf (no way without pdf)
# Word / Office
* Shortcuts: ToolsCustomize keyboard
* Templates: Preferences -> File Locations
## Navigation
shift-cmd-v // paste special
opt-cursor // navigate
shift-opt-cursor // switch pages
opt-delete // delete word
opt-shift-delete // delete word forward
cmd-shift-return // page break
## Find, replace, goto
cmd-f // find
cmd-shift-f // find dialog
cmd-shift-r // replace dialog
opt+cmd+g // goto menu
shift+cmd+s // save as
## Changing
cmd-z // undo
cmd-shift-z // redo
## Formatting
cmd-b // bold
cmd-i // italic
cmd-opt-[123] // apply heading
# Powerpoint, pptx / Office
## Custom shortcut
https://support.office.com/en-gb/article/Create-a-custom-keyboard-shortcut-for-Office-2016-for-Mac-6bbeb90e-96d9-4e03-b199-fc026ebdc321
Mac Preferences -> Keyboard -> Shortcuts -> App shortcuts -> Powerpoint
Insert->Shape->Line
## Storing themes
Location: ~/Library/Group Containers/*.Office/User Content.localized
Design -> Expand menu -> Save current theme (can see location)
## Saving object settings
Right click -> Set as default
Design -> Save Currrent Theme: Save in proposed ~/Library default path (not drive)
## Shortcuts
shift-cmd-s // align center
# Thunderbird
cmd-shift-a // insert attachment
# brewer
update // update brewer
list // list all installed packages
search name // search package
install name // install package
# Preview
cmd-[12] // change scroll
c-cmd-h // highlight
c-cmd-n // note
c-cmd-u // underline
c-cmd-t // text
# Adobe reader
https://helpx.adobe.com/acrobat/using/keyboard-shortcuts.html
* preferences -> general -> use single-key accelerators !!!!!
* preferences -> reader -> Only read the currently visible pages
## Navigation cmd-left // previous position
opt-left,right // next, previous page
fn-left,right // first, last pages
fn-up,down // scroll fast
shift-cmd-n // go to page nr
## Editing (must be enabled in perferences; see above!)
U // highlight
S // sticky note
## Changing highlight color
Select highlighted text
cmd-e or right->properties
# Evernote
cmd-[1-9] // select shortcut by index
cmd-[ // previous note
cmd-] // next note
cmd-shift-i // select note list
cmd-, // preferences
cmd-shift-u // toggle bullet
# Bugs
## vim
sudo port install vim @7.4.729_1+gtk2+huge+perl+python27+x11
+python34 // causes segfault
## pip, port
* 'can not import pkg_resources'
* reinstall pip / setuptools
# tmutil
sudo tmutil [command]
enable / distable
startbackup
addexclusions ~/Downloads
-p // ~/Downloads will remain in exclusions list, even if folder is moved
listbackups
# Recovery / boot shortcuts
cmd-r // recovery mode: disk disk, reinstall
cmd-s // single user mode: shell
opt // select boot devices
D // hardware test
# Resetting SMC
* https://support.apple.com/en-us/HT201295
Shut down
Connect to power adapter
Hold shift-ctrl-opt-power for 10s
Hold opt-cmd-p-r and press power to boot