關於M1 Mac如何設置打開終端的快捷鍵


在啟動台中找到自動操作並打開

 

選擇快速操作

 

將“工作流程收到”設置為“沒有輸入”;然后將左側的“運行AppleScript”拖到右側

 

 在右側代碼處替換如下的代碼

該代碼是在桌面打開終端,所處的路徑是 ~

on run {input, parameters}
	
	(* Your script goes here *)
	tell application "Terminal"
		reopen
	end tell
end run

 

 可以點擊運行開是否能執行成功,之后“command+s”保存並命名為open terminal

提供第二種打開方式,可在任意位置打開終端

on run {input, parameters}
	tell application "Finder"
		set myWin to window 1
		set thePath to (quoted form of POSIX path of (target of myWin as alias))
		if application "Terminal" is running then
			tell application "Terminal"
				do script "cd " & thePath
				activate
			end tell
		else
			tell application "Terminal"
				do script "cd " & thePath in window 1
				activate
			end tell
		end if
	end tell
end run

 保存后可命名為open terminal here

之后打開 系統偏好——>鍵盤——>快捷鍵

在左側選擇服務,右側通用處找到剛剛命名的兩個文件,然后設置喜歡的快捷鍵即可

 

 

2021-06-11  16:33:06


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM