←back to thread

700 points yen223 | 1 comments | | HN request time: 0.234s | source
Show context
vbezhenar ◴[] No.42058069[source]
Few additions.

open -n file.pdf : opens new instance of Preview application which is useful if you want to open the same file twice (for example to look at different pages at once).

caffeinate -d : prevents display turning off, useful if you want to look at display without moving mouse.

replies(9): >>42058131 #>>42059558 #>>42059666 #>>42060870 #>>42062814 #>>42064032 #>>42068484 #>>42068855 #>>42069659 #
mjs ◴[] No.42059558[source]
Does `open` give focus? It used to, but since a few releases ago the app opens in the background, which is pretty annoying.

My poor workaround is to use osascript: `tell application "System Events" to set frontmost of process "Finder" to true`

replies(2): >>42060712 #>>42068883 #
1. masswerk ◴[] No.42060712[source]
Apparently, it does. There is a -g flag (background) to prevent focus.