- -스크립트를 사용하여 OS X 런치 패드에서 앱 아이콘을 숨기는 방법

스크립트를 사용하여 OS X 런치 패드에서 앱 아이콘을 숨기는 방법

OS X의 런치 패드는앱을 시작하고 체계적으로 관리합니다. 런치 패드에서 생성 한 폴더는 응용 프로그램 폴더에서 생성 된 실제 폴더가 아니므로 자주 사용하는 앱을 설치된 앱 목록과 다르게 그룹화 할 수 있습니다. Launchpad에서 앱 아이콘의 유일한 문제는 폴더로만 이동할 수 있고 완전히 숨길 수는 없다는 것입니다. 이것은 깔개 밑의 흙을 쓸어 버리는 것과 비슷합니다. 앱 아이콘은 여전히 ​​폴더에 숨겨져 있지만 보이지 않습니다. 좋은 점은 간단한 작은 스크립트를 사용하여 런치 패드에서 앱 아이콘을 제거 할 수 있으며 시스템에서 앱이 삭제되는 것에 대해 걱정할 필요가 없다는 것입니다.

맥 런치 패드

런치 패드에서 아이콘을 삭제하려면 먼저 AppleScript 편집기를 열고 다음 스크립트를 붙여 넣어야합니다.

on open the_items
my Lighten_LaunchPad(the_items)
end open
on Lighten_LaunchPad(the_items)
repeat with the_item in the_items
set the_item to the_item as alias
--try
tell application "Finder"
set nameString to name of the_item
set sost to (my get_the_name(nameString)) as string
end tell
display dialog "Are you sure you want to remove "" & sost & "" from the Launchpad? The app itself won"t be deleted."         try
set my_command to "sqlite3 ~/Library/Application\ Support/Dock/" & "*.db "DELETE from apps WHERE title=" & (quoted form of sost) & ";";osascript -e "tell application "Dock" to quit""
do shell script my_command
on error the error_message number the error_number
activate
if the error_number is not -128 then
if the error_number is 1 then
set the error_text to "Error: " & the error_number & ". " & "You probably have too many old versions of the LaunchPad database file." & return & return & " To fix that, move some old ones out of ~/Library/Application Support/Dock. You can safely move any file with a name that ends with ".db" or ".db.backup" except for the most recently modified one." & return & return & "Do you want me to open that folder for you?"                     display dialog the error_text buttons {"Yes, please open it.", "Cancel"} default button 1
if button returned of the result is "Yes, please open it." then
do shell script "open" & space & quoted form of POSIX path of (path to application support folder from user domain) & "Dock"
end if
error number -128
else
set the error_text to "Error: " & the error_number & ". " & the error_message                     display dialog the error_text buttons {"Cancel"} default button 1
end if
else
error number -128
end if
end try
end repeat
display dialog "All done!" buttons {"OK"} default button 1
end Lighten_LaunchPad
on get_the_name(nameString)
tell AppleScript
set olD to text item delimiters
set text item delimiters to "."
set reqItem to -1
if last item of nameString = "." then set reqItem to -2
set theName to text item reqItem of nameString
--try
set theNameNoExt to ((text items 1 through (reqItem - 1) of nameString) as string)
set text item delimiters to olD
return {theNameNoExt}
end tell
end get_the_name
on run
set the_items to ((choose file) as list)
Lighten_LaunchPad(the_items) end run

그런 다음 스크립트를 원하는 위치에 앱으로 저장하십시오. 이제이 앱을 실행하면 Finder 창이 열립니다. 런치 패드에서 제거하려는 앱을 선택하고 아이콘을 정말로 삭제할 것인지 묻는 메시지가 표시되면 확인하십시오. Dock이 다시 시작되고 앱이 Launchpad에서 사라집니다. 런치 패드에서 제거하려는 모든 아이콘에 대해이를 반복하면 완료됩니다.

에서 앱 아이콘을 복원하려는 경우런치 패드,이 스크립트 (또는 그 문제에 대한 다른 도구)에 의존 할 필요가 없습니다. 애플리케이션 폴더를 열고 앱 아이콘을 런치 패드로 끌어다 놓기 만하면됩니다.

다음과 같은 아이콘을 제거하고 추가하는 것에주의하십시오.런치 패드의 폴더 구조는 그대로 유지되지 않습니다. 폴더를 제거하기 전에 이전에 폴더에 정렬 된 앱 아이콘을 다시 추가하면 이전 위치로 복원되지 않으며 선택한 폴더에 다시 수동으로 드롭해야합니다.

이 목적으로 다른 앱을 설치해야한다면 Launchpad-control을 사용해보십시오.

[통하다 맥 OS X 힌트]

코멘트