Customizing Spotlight
Số trang: 5
Loại file: pdf
Dung lượng: 29.97 KB
Lượt xem: 27
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
3.3. Customizing Spotlight Youve just read about how Spotlight works fresh out of the box. But you can tailor its behavior, both for security reasons and to fit it to the kinds of work you do
Nội dung trích xuất từ tài liệu:
Customizing Spotlight3.3. Customizing SpotlightYouve just read about how Spotlight works fresh out of the box. But you can tailor itsbehavior, both for security reasons and to fit it to the kinds of work you do.Here are three ways to open the Spotlight preferences center: • Choose Spotlight Preferences at the bottom of the Spotlight menu just after youve performed a search. • Use Spotlight itself.Hit -Space bar, type spotl, and press Enter. • Choose System Preferences. Click Spotlight.In any case, you wind up face-to-face with the dialog box shown in Figure 3-6.Figure 3-6. Heres where you can specify what categories of icons you want Spotlight to search, which order you want them listed in the Spotlight menu, and what keystroke you want to use for highlighting the Spotlight bar.You can tweak Spotlight in three ways here, all very useful: • Turn off categories. The list of checkboxes identifies all the kinds of things that Spotlight tracks. If you find that Spotlight uses up valuable menu space listing, say, Web bookmarks or fonts—stuff you dont need to find very often—turn off their checkboxes. Now the Spotlight menus precious 20 slots are allotted to icon types you care more about. • Prioritize the categories. This dialog box also lets you change the order of the category results; just drag an individual list item up or down to change where it appears in the Spotlight menu. The factory setting is for Applications to appear first in the menu. That makes a lot of sense if you use Spotlight as a quick program launcher (which is a great idea). But if youre a party planner, and you spend all day on the phone, and the most important Spotlight function for you is its ability to look up someone in your address book, then drag Contacts to the top of the list. Youll have fewer arrow- key presses to perform once the results menu appears. POWER USERS CLINIC The Raw Power of the Raw QueryYou may have just slogged through over 20 pages of Spotlight details—but ifyou can believe it, there are another 40 or 60 to be written. It turns out that theSpotlight most people see is only a subset of the true power awaiting inLeopard.For example, what if you wanted to see all the files youve opened in the last 24hours except email messages and address book entries? Or what if you want toround up all PDF documents and PostScript files youve opened in the lastweek? Using the Spotlight tools that most people see, you wouldnt be able toset up searches or smart folders that are quite that smart.Fortunately for the true Leopard geek, Spotlight also understands a querylanguage—a programming-like syntax that lets you establish far more specificand nuanced searches. You can use it to pull off stunts that would be impossibleusing the Spotlight menu or window alone.To read about the basics of the query language, start athttp://developer.apple.com/macosx/spotlight.html; it will lead you to a numberof Web pages that explain the full scope of Spotlights internal lingo.You may also get a kick out of studying how Spotlight uses the query languageitself. To do that, create a smart folder, and then Get Info on it. (Control-click orright-click it and, from the shortcut menu, choose Get Info.) On the Generalpanel, inspect the string of query text that Spotlight generated behind the scenes(as shown here).What youll learn is that the basic search command always includes thecommand kMDItem. To search for something by its file type, your query shouldbegin with kMDItemContent-Type; for when you last opened it, usekMDItemLastUsed-Date; and so on.For example, heres how youd type a query that rounds up all files that containthe keyword kumquat: kMDItem-Keywords == *kumquat*. (The double =symbol means equal. You can also use , Once youve read more about this query language, you can build much morecomplicated searches. This one, for example, finds all audio files, whose authoris either Kevin or Steve, that were modified in the last week: ((kMDItemAuthors == Kevinwc || kMDItemAuthors == Stevewc) && (kMDItemContentType == audiowc || kMDItemContentType == videowc)) && (kMDItemFSContentChangeDate == $time.this_week)And heres how youd find all PDF documents and PostScript files with a singlesearch: ((kMDItemContentTypeTree == com.adobe.pdf) || (kMDItemKind == Post-Script document))(Most of this stuff actually stands for useful things: MD for metadata, wc forword-based, case-insensitive, and so on.)And where, you may ask, are you supposed to type all these queries? You havetwo options.In the Finder, when you choose File Find to produce the Spotlight window,choose Other from the Kind pop ...
Nội dung trích xuất từ tài liệu:
Customizing Spotlight3.3. Customizing SpotlightYouve just read about how Spotlight works fresh out of the box. But you can tailor itsbehavior, both for security reasons and to fit it to the kinds of work you do.Here are three ways to open the Spotlight preferences center: • Choose Spotlight Preferences at the bottom of the Spotlight menu just after youve performed a search. • Use Spotlight itself.Hit -Space bar, type spotl, and press Enter. • Choose System Preferences. Click Spotlight.In any case, you wind up face-to-face with the dialog box shown in Figure 3-6.Figure 3-6. Heres where you can specify what categories of icons you want Spotlight to search, which order you want them listed in the Spotlight menu, and what keystroke you want to use for highlighting the Spotlight bar.You can tweak Spotlight in three ways here, all very useful: • Turn off categories. The list of checkboxes identifies all the kinds of things that Spotlight tracks. If you find that Spotlight uses up valuable menu space listing, say, Web bookmarks or fonts—stuff you dont need to find very often—turn off their checkboxes. Now the Spotlight menus precious 20 slots are allotted to icon types you care more about. • Prioritize the categories. This dialog box also lets you change the order of the category results; just drag an individual list item up or down to change where it appears in the Spotlight menu. The factory setting is for Applications to appear first in the menu. That makes a lot of sense if you use Spotlight as a quick program launcher (which is a great idea). But if youre a party planner, and you spend all day on the phone, and the most important Spotlight function for you is its ability to look up someone in your address book, then drag Contacts to the top of the list. Youll have fewer arrow- key presses to perform once the results menu appears. POWER USERS CLINIC The Raw Power of the Raw QueryYou may have just slogged through over 20 pages of Spotlight details—but ifyou can believe it, there are another 40 or 60 to be written. It turns out that theSpotlight most people see is only a subset of the true power awaiting inLeopard.For example, what if you wanted to see all the files youve opened in the last 24hours except email messages and address book entries? Or what if you want toround up all PDF documents and PostScript files youve opened in the lastweek? Using the Spotlight tools that most people see, you wouldnt be able toset up searches or smart folders that are quite that smart.Fortunately for the true Leopard geek, Spotlight also understands a querylanguage—a programming-like syntax that lets you establish far more specificand nuanced searches. You can use it to pull off stunts that would be impossibleusing the Spotlight menu or window alone.To read about the basics of the query language, start athttp://developer.apple.com/macosx/spotlight.html; it will lead you to a numberof Web pages that explain the full scope of Spotlights internal lingo.You may also get a kick out of studying how Spotlight uses the query languageitself. To do that, create a smart folder, and then Get Info on it. (Control-click orright-click it and, from the shortcut menu, choose Get Info.) On the Generalpanel, inspect the string of query text that Spotlight generated behind the scenes(as shown here).What youll learn is that the basic search command always includes thecommand kMDItem. To search for something by its file type, your query shouldbegin with kMDItemContent-Type; for when you last opened it, usekMDItemLastUsed-Date; and so on.For example, heres how youd type a query that rounds up all files that containthe keyword kumquat: kMDItem-Keywords == *kumquat*. (The double =symbol means equal. You can also use , Once youve read more about this query language, you can build much morecomplicated searches. This one, for example, finds all audio files, whose authoris either Kevin or Steve, that were modified in the last week: ((kMDItemAuthors == Kevinwc || kMDItemAuthors == Stevewc) && (kMDItemContentType == audiowc || kMDItemContentType == videowc)) && (kMDItemFSContentChangeDate == $time.this_week)And heres how youd find all PDF documents and PostScript files with a singlesearch: ((kMDItemContentTypeTree == com.adobe.pdf) || (kMDItemKind == Post-Script document))(Most of this stuff actually stands for useful things: MD for metadata, wc forword-based, case-insensitive, and so on.)And where, you may ask, are you supposed to type all these queries? You havetwo options.In the Finder, when you choose File Find to produce the Spotlight window,choose Other from the Kind pop ...
Tìm kiếm theo từ khóa liên quan:
công nghệ thông tin kỹ thuật lập trình hệ điều hành đồ họa thiết kế OReilly Mac.OS.X Leopard The Missing Manual Customizing SpotlightGợi ý tài liệu liên quan:
-
Giáo trình Lý thuyết hệ điều hành: Phần 1 - Nguyễn Kim Tuấn
110 trang 450 0 0 -
52 trang 426 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 309 0 0 -
74 trang 293 0 0
-
96 trang 289 0 0
-
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 288 0 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 276 0 0 -
173 trang 272 2 0
-
175 trang 270 0 0
-
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 270 0 0