{"id":24589195,"url":"https://github.com/devprabal/mac_setup","last_synced_at":"2025-03-17T22:03:15.665Z","repository":{"id":193297727,"uuid":"688512647","full_name":"devprabal/mac_setup","owner":"devprabal","description":"My Macbook Air M2 (eiji) setup","archived":false,"fork":false,"pushed_at":"2024-10-20T15:33:27.000Z","size":4463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-20T17:45:58.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devprabal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-07T13:55:22.000Z","updated_at":"2024-10-20T15:33:32.000Z","dependencies_parsed_at":"2023-09-07T15:41:53.248Z","dependency_job_id":"eacda5f1-bfa2-40f4-8c0c-a31cbf1cf00e","html_url":"https://github.com/devprabal/mac_setup","commit_stats":null,"previous_names":["devprabal/mac_setup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2Fmac_setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2Fmac_setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2Fmac_setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2Fmac_setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devprabal","download_url":"https://codeload.github.com/devprabal/mac_setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244117611,"owners_count":20400742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-24T08:14:18.098Z","updated_at":"2025-03-17T22:03:15.626Z","avatar_url":"https://github.com/devprabal.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customizing my Macbook Air M2 (Eiji)\n\nOriginally, I had kept this document under `dotfiles_mac`, however, there might not be any \"dotfiles\" in linux-style-ricing sense. This will contain settings, apps, profile-exports, exports from apps (which support their settings to be exported), etc.   \n\nOfcourse, this is not meant to be an exhaustive list, even for myself, because there are numerous other small tweaks here and there that I keep on doing to make my workflow more comfortable. However, this document will list out some \"major\" tools / tweaks.   \n\n## [Cot](https://coteditor.com/) \n\n\u003e Simple text editor without too much distractions. Supports multiple languages (including markdown).  \n\nInstall command line tool via `CotEditor -\u003e Settings -\u003e General` guide.  \n\n```bash\n$ sudo ln -s /Applications/CotEditor.app/Contents/SharedSupport/bin/cot /usr/local/bin/cot\n\n$ which cot\n/usr/local/bin/cot\n\n$ cot README.md\n```\n\n## [starship](https://starship.rs/)\n\n\u003e modern PS1  \n\nAppend the below line in `.zshrc` -  \n\n```txt\neval \"$(starship init zsh)\"\n```\n\n## [bat](https://github.com/sharkdp/bat)\n\n\u003e  A `cat` command clone with syntax highlighting  \n\n```bash\nbat README.md --theme=OneHalfDark\n```\n\nFind where `bat` reads configs from  \n\n```bash\n$ bat --config-file\n/Users/devp/.config/bat/config\n```\n\n- Config file: [`bat_config`](./bat_config)  (path: `/Users/devp/.config/bat/config`)  \n\n## [fig](https://fig.io/) (❗️ not working)\n\n\u003e Autocomplete for terminal  \n\n## ~~[CopyQ](https://github.com/hluk/CopyQ)~~ NOT using anymore\n\n\u003e Clipboard manager   \n\nThere will be an icon on the status bar (top) which when clicked, lists all the copied items in a new window. Pressing \u003ckbd\u003eEnter\u003c/kbd\u003e will insert the selected item in the editor previously opened.    \n\nIt can also be operated from terminal (see github link for more commands or `copyq —help`).  \n\n```bash\ncopyq toggle\ncopyq clipboard\n```\n\n⚠️ Enable it to control the system from \"Settings -\u003e Privacy \u0026 Security -\u003e Accessibility\".  \n\n⚠️ ~~The app needs to be launched everytime I think~~  -\u003e fix it from \"File-\u003ePreferences\"  \n\n- Config file: [`copyq_config.cpq`](./copyq_config.cpq) (path: import / export from \"File-\u003ePreferences\")    \n- Theme file (and path): [`/Users/devp/.config/copyq/themes/copyq_arial_large_solarized.ini`](./copyq_arial_large_solarized.ini)   \n\n## [Raycast](https://www.raycast.com/)\n\n\u003e alternative to copyq clipboard\n\u003e\n\u003e Plus, it does a lot of things, including replacement of Spotlight.\n\nShortcut: `⌘ + Space`\n\nChange the hotkey using [**this** guide](https://manual.raycast.com/hotkey).  \nI also disabled the shortcuts for spotlight and input sources.  \nI already have Input sources shortcut mapped to the globe `🌐` key.  \n\n## [Skim](https://skim-app.sourceforge.io/)\n\n\u003e open source, pdf annotations  \n\n## [hidden bar](https://github.com/dwarvesf/hidden)\n\n\u003e Hides unwanted icons from menu bar into a space which can be revealed by a click on \"hidden bar arrow icon\" on menu bar. Similar to System Tray in Windows.  \n\nAllow it to start on log in from the hidden bar app settings.  \n\n## [app cleaner](https://freemacsoft.net/appcleaner/)\n\n\u003e delete other files related to an app when removing app from \"Applications\" folder (uninstalling)  \n\nTurn on smart clean detection option from the app settings.  \n\n**Usage**: launch this app first and then drag and drop the app icon which needs to be uninstalled.  \n\n## [dropzone](https://apps.apple.com/us/app/dropzone-4/id1485052491?mt=12)\n\n\u003e simple drag and drop, temporary file storage area, launch folders, quick actions, etc. from menu bar  \n\nIt is not always possible to have two windows from different desktops or from different stage manager groups to overlap each other just for the purpose of drag-drop from one window onto another. However, with dropzone, we can drop file(s) into the space provided by the dropzone app (which lives on the menu bar) and then switch to another application and drag-drop from the dropzone app to this application.  \n\n## [vlc](https://www.videolan.org/)\n\n\u003e simple music and video player, replacement for apple music\n\nTo change the default \"Open with\" app for music files, follow these steps from [Tom's guide](https://www.tomsguide.com/how-to/how-to-set-default-apps-on-mac) -  \n\n- In Finder, right click a file and select 'Get Info'\n- Click the 'Open with' dropdown box\n- Select an app — this will be the app that opens all files of this file type from now on\n- Click 'Change All'\n\n## Show markdown in Finder Preview\n\nInstall [qlmarkdown](https://github.com/toland/qlmarkdown) and launch it once from the app drawer.  \n\n*Might as well have a look at other [quick look plugins](https://github.com/sindresorhus/quick-look-plugins)*  \n\n## vscode navigation\n\n![ss_vscode_navigation_shortcut](./ss_vscode_navigation_shortcut.jpeg)\n\nRemove other pre-existing keybindings using the same keystrokes as below  -  \n\n`Option ⌥ + ←`  backward  \n`Option ⌥ + →`  forward  \n\n## iterm2\n\n**quick switch**  \nI set up a hotkey from iTerm2 settings `Option ⌥ + spacebar` to quickly switch to the iterm window from anywhere.  \n\n**Shell Integrations**  \nAdditionally, I have installed shell integrations from \"iTerm2 menubar -\u003e Install Shell Integration\" for utilities like `imgcat`, etc.  \n\n**switch to an open window or open new window from anywhere**  \n\u003ckbd\u003eOption ⌥ + T\u003c/kbd\u003e  \nI set a custom keyboard shortcut from \"Shortcuts.app\" following [this guide](https://osxdaily.com/2023/02/06/open-terminal-by-keyboard-shortcut-on-mac/).  \n\n## System Utils / Settings\n\n### Keyboard\n\n\"Settings -\u003e Keyboard -\u003e Text Input -\u003e Edit\"  \nUncheck all options like - smart quotes, double spacebar to add dot, correct spelling automatically, etc.  \n\nEnable globe 🌐 key to show emoji pop-up.  \n\n### Screenshot\n\n- Full screen ss and auto save to a file (not copy to clipboard): Press `Command ⌘ + Option ⌥ + S`  \n- Area ss and copy to clipboard (not save to file): Press `Shift ⇧ + Command ⌘ + S`  \n![Settings -\u003e Keyboard -\u003e Shortcuts custom ss shortcut](screenshot_keyboard_shortcut.png)\n\n**screenshot.app** -\u003e Customize the \"Options\" to store the screenshots in `/Users/devp/Pictures` directory to avoid cluttering the Desktop.  \n\n\n### Preview\n\nSome files support preview without opening them by selecting the file and pressing \u003ckbd\u003espacebar\u003c/kbd\u003e.  \n\n## How to add \"open with vscode\" in macOS context menu?\n\nUse \"Automator\" to create \"workflows\" for \"Quick Actions\" and follow [this guide](https://gist.github.com/idleberg/bc65021a736e9139e3e31f7f2c761d5d).  \n\nAdditionally, read about `open(1)` with the switch `-a` on man pages in iTerm2.  \n\nEdit this \"Quick Action\" at `~/Library/Services/Open\\ in\\ Visual\\ Studio\\ Code.workflow`. Double clicking this file in Finder will open it in Automator. Alternatively, we can Right Click and select \"Show Package Contents\" to reveal `Info.plist`, `Resources/`, etc.  \n\nChanging icon image? Change it through the Automator app itself. Choose a `.png` file. We will need to restart Finder after this (I haven't found other workarounds except relaunching Finder).  \n\n## Relaunching Finder (or other unresponsive apps)\n\n\u003ckbd\u003eCommand ⌘ + Option ⌥ + Esc\u003c/kbd\u003e from anywhere. This is similar to \"task manager running apps on windows\". It opens up a pop-up with a list of running apps, which can be forced quit or relaunched.  \n\n## Go to a hidden folder's path in Finder\n\n\u003ckbd\u003eCommand ⌘ + Shift ⇧ + G\u003c/kbd\u003e anywhere in Finder window [will open a pop-up](https://apple.stackexchange.com/questions/63791/is-it-possible-to-edit-the-path-and-view-the-folder-path-in-the-finder) where we can type partial path name to get suggestions via fuzzy completions.   \n\n## Finder settings\n\nMenu bar -\u003e Finder -\u003e Settings  \nCustomize preferences like default folder to open, sidebar folders to show, quick action tags (remove all), favourite tags (I removed all, I don't like the concept of color mapping), etc.\n\n## Emoji Key\n\nUnder keyboard settings, select \"emoji\" for \u003ckbd\u003e🌐\u003c/kbd\u003e key.  \n\n## Desktop and Dock settings\n\nRemove \"Show recent applications\" in dock.  \n\n## .zshrc\n\nConfig file: [.zshrc](./zshrc) (path: `/Users/devp/.zshrc`)\n\n## Cycle through the windows of the same app\n\n\u003ckbd\u003ecommand ⌘ + back tick ` \u003c/kbd\u003e\n\n## Cycle through fullscreen apps \n\n\u003ckbd\u003ecommand ⌘ + tab ⇥\u003c/kbd\u003e  \n\nHowever, we need to enable it from   \n\"Settings -\u003e Desktop \u0026 Dock -\u003e Mission Control -\u003e When switching to an application, switch to a Space with open windows for the application\".  \n\n![mission control tab switching ss](ss_mission_control_tab_switching.png)\n\nThere are also other shortcuts for switching between different Spaces (fullscreen apps) -  \n\n\u003ckbd\u003eControl ^ + left arrow key ← \u003c/kbd\u003e  \nor  \n\u003ckbd\u003eControl ^ + right arrow key → \u003c/kbd\u003e \nor  \n\u003ckbd\u003eControl ^ + 1 \u003c/kbd\u003e for switching to space 1  \n\nWe might need to enable the last one from \"Settings -\u003e Keyboard -\u003e keyboard shortcuts -\u003e Mission Control -\u003e Mission Control (expand)\"  \n\n## Android Phone to Mac sync / file transfer\n\nInstall a variant of [kde connect](https://soduto.com/) on all devices (pixel, mac).\n\n## [Pure Paste](https://sindresorhus.com/pure-paste)\n\n\u003e copy from anywhere, paste without formatting (runs in background).\n\n## References\n\n- https://wangchujiang.com/awesome-mac/  \n- https://www.youtube.com/@macvince  \n- https://www.youtube.com/watch?v=tCYJ2Iy4ZEU\n- https://stackoverflow.com/questions/47350555/launch-multiple-instances-of-application-in-mac\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevprabal%2Fmac_setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevprabal%2Fmac_setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevprabal%2Fmac_setup/lists"}