# Mac

### Table of Contents

* [Finder](#finder)
* [Capturing Screenshot](#capturing-screenshot)
* [Separators for the Mac OSX Dock](#separators-for-the-mac-osx-dock)
* [Show/Hide hidden files in your mac](#show-hide-hidden-files-in-your-mac)
* [Make a file hidden on your mac](#make-a-file-hidden-on-your-mac)

#### Finder

* Show/Hide dock - `Command (⌘)` + `Option` + `d`
* Change folder view - `Command (⌘)` + `1`, use 2,3,4,5
* Focus Spotlight Search - `Command (⌘)` + `space`

#### Capturing Screenshot

* Capture full screen `Command (⌘)` + `Shift` + `3`
* Capture specific app window `Command (⌘)` + `Shift` + `4` then `space`
* Capture specific region `Command (⌘)` + `Shift` + `4`
* Capture specific regions and then copy them to the clipboard `Ctrl (^)` + `Command (⌘)` + `Shift` + `4` (PS. It doesn't save the screenshot on the desktop, it just stays in your clipboard)

#### Separators for the Mac OSX Dock

In examining the strings inside the Dock binary in Leopard, I found a way to add real separators to the dock, instead of adding dummy applications with empty or decorative icons

1. Open terminal hit `Command (⌘)` + `space` & type terminal and hit return.
2. Run the following commands from the Terminal.

```
defaults write com.apple.dock persistent-apps -array-add '{ "tile-type" = "spacer-tile"; }'
killall Dock
```

copy and paste the code in the terminal as many times as to add new space/separators 3. You can now drag the empty spaces to where you want them, or right-click on them and select "Remove from Dock" if you no longer need them.

#### Show/Hide hidden files in your mac

1. Open terminal hit `Command (⌘)` + `space` & type terminal and hit return.
2. Copy/Paste the following commands into the Terminal window

   ```
   defaults write com.apple.finder AppleShowAllFiles TRUE
   killall Finder
   ```
3. If you want to Hide the hidden files set it to `FALSE`

   ```
   defaults write com.apple.finder AppleShowAllFiles FALSE
   killall Finder
   ```

#### Make a file hidden on your mac

1. Open terminal hit `Command (⌘)` + `space` & type terminal and hit return.
2. Copy/Paste the following commands into the Terminal window

   ```
   chflags hidden /path/to/file-or-folder
   ```
3. In case if you want to unhide the file

   ```
   chflags nohidden /path/to/file-or-folder
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.logeshpaul.com/wiki/code/mac.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
