- - วิธีซ่อนไอคอนแอพจาก OS X Launchpad ด้วยสคริปต์

วิธีซ่อนไอคอนแอพจาก OS X Launchpad ด้วยสคริปต์

Launchpad ใน OS X นั้นยอดเยี่ยมไม่เพียง แต่สำหรับเปิดตัวแอพ แต่ยังช่วยให้พวกเขามีระเบียบ โฟลเดอร์ที่คุณสร้างใน Launchpad ไม่ใช่โฟลเดอร์จริงที่สร้างขึ้นในโฟลเดอร์แอปพลิเคชันและช่วยให้คุณเก็บแอปที่คุณใช้บ่อย ๆ จัดกลุ่มแตกต่างจากรายการแอปที่ติดตั้ง ปัญหาเดียวของไอคอนแอพใน Launchpad คือคุณสามารถย้ายพวกมันไปยังโฟลเดอร์และซ่อนไม่ได้เลย มันคล้ายกับการกวาดคราบสกปรกใต้พรม ไอคอนแอพยังคงอยู่ที่นั่นแม้ว่าจะซ่อนอยู่ในโฟลเดอร์และมองไม่เห็น สิ่งที่ดีคือคุณสามารถลบไอคอนแอพออกจาก Launchpad ด้วยสคริปต์ง่ายๆและไม่ต้องกังวลว่าแอพจะถูกลบออกจากระบบของคุณ

Mac-Launchpad

ในการลบไอคอนออกจาก Launchpad คุณต้องเปิด AppleScript Editor ก่อนแล้วจึงวางสคริปต์ต่อไปนี้ลงใน

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 จะเปิดขึ้น เลือกแอพที่คุณต้องการลบออกจาก Launchpad และยืนยันเมื่อแอพถามคุณว่าคุณต้องการลบไอคอน Dock จะรีสตาร์ทและแอปจะหายไปจาก Launchpad เพียงทำซ้ำสำหรับไอคอนทั้งหมดที่คุณต้องการลบออกจาก Launchpad และคุณควรทำ

หากคุณต้องการกู้คืนไอคอนของแอปใด ๆLaunchpad คุณไม่จำเป็นต้องพึ่งพาสคริปต์นี้ (หรือเครื่องมืออื่น ๆ สำหรับเรื่องนั้น) เพียงเปิดโฟลเดอร์แอปพลิเคชันของคุณแล้วลากและวางไอคอนแอปไปยัง Launchpad

ถูกเตือนว่าการลบและเพิ่มไอคอนเช่นสิ่งนี้จะไม่เก็บโครงสร้างโฟลเดอร์ไว้ใน Launchpad เหมือนเดิม เมื่อคุณเพิ่มไอคอนแอพที่เคยเรียงไว้ในโฟลเดอร์ก่อนหน้านี้กลับไปก่อนที่คุณจะลบออกมันจะไม่คืนสู่ตำแหน่งเดิมและคุณจะต้องวางมันลงในโฟลเดอร์ที่คุณเลือกด้วยตนเองอีกครั้ง

หากคุณไม่จำเป็นต้องติดตั้งแอปอื่นเพื่อจุดประสงค์นี้คุณอาจต้องลองใช้ Launchpad-control

[ผ่าน คำแนะนำสำหรับ Mac OS X]

ความคิดเห็น