cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

main: content/blog/2024-01-09-macos-customization.org · raw

  1#+date:        [2024-01-09 Tue 00:00:00]
  2#+title:       macOS Customization: Terminal, Tiling WM, Widgets
  3#+description: How I've customized macOS with a terminal, tiling WM, and widgets.
  4#+slug:        macos-customization
  5#+filetags:    :linux:
  6
  7I have been using macOS more than Linux lately, so I wrote this post to describe
  8some simple options to customize macOS beyond the normal built-in settings menu.
  9
 10While not all-encompassing, the options below should be a good start for anyone
 11looking to dive down the rabbit hole.
 12
 13* Basics
 14
 15** Package Management
 16
 17To install a lot of software on macOS, you will need [[https://brew.sh/][Homebrew]]. You can use their
 18installation script to get started. Simply open the =Terminal= application and
 19paste the following snippet:
 20
 21#+begin_src sh
 22/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
 23#+end_src
 24
 25This will allow you to easily install and manage applications and other software
 26easily through the =brew= command.
 27
 28** Terminal
 29
 30If you're serious about customizing your macOS system, I highly recommend
 31installing a terminal emulator that you like and if you're not comfortable on
 32the command line yet, start learning. A lot of customization options require you
 33to edit hidden files, which is easiest in a terminal.
 34
 35There are options like iTerm2, Kitty, Alacritty, Hyper, Warp, or the built-in
 36Terminal app.
 37
 38I use [[https://iterm2.com/][iTerm2]], which can be installed with Homebrew:
 39
 40#+begin_src sh
 41brew install iterm2
 42#+end_src
 43
 44To install color schemes, such as the Dracula scheme, you visit [[https://iterm2colorschemes.com/][iTerm Themes]] and
 45follow their installation instructions to install any of the themes.
 46
 47* Desktop
 48
 49** Window Management
 50
 51[[https://github.com/koekeishiya/yabai][yabai]] is a tiling window manager for macOS. While other window managers exist, I
 52found that most of them struggled to create logical layouts and to allow me to
 53easily move windows around the screen.
 54
 55Some advanced settings for yabai are only available if partially disable System
 56Integrity Protection (SIP). However, I chose not to do this and it hasn't
 57affected my basic usage of yabai at all.
 58
 59Refer to the [[https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)][yabai wiki]] for installation instructions. You will need to ensure
 60that yabai is allowed to access the accessibility and screen recording APIs.
 61
 62** Keyboard Shortcuts
 63
 64[[https://github.com/koekeishiya/skhd][skhd]] is a simple hotkey daemon that allows you to define hotkeys in a file for
 65usage on your system.
 66
 67Installation is simple:
 68
 69#+begin_src sh
 70brew install koekeishiya/formulae/skhd
 71skhd --start-service
 72#+end_src
 73
 74After installation, be sure to allow =skhd= access to the accessibility API in
 75the macOS privacy settings.
 76
 77You can configure your hotkeys in the =~/.config/skhd/skhdrc= file:
 78
 79#+begin_src sh
 80nano ~/.config/skhd/skhdrc
 81#+end_src
 82
 83For example, I have hotkeys to open my browser and terminal:
 84
 85#+begin_src conf
 86# Terminal
 87cmd - return : /Applications/iTerm.app/Contents/MacOS/iTerm2
 88
 89# Browser
 90cmd + shift - return : /Applications/LibreWolf.app/Contents/MacOS/librewolf
 91#+end_src
 92
 93** Widgets
 94
 95[[https://github.com/felixhageloh/uebersicht/][uebersicht]] is a handy desktop-based widget tool with a plethora of
 96community-made widgets available in the [[https://tracesof.net/uebersicht-widgets/][widgets gallery]]. You can also write your
 97own widgets with this tool.
 98
 99To install, simply download the latest release from the [[https://tracesof.net/uebersicht/][uebersicht website]] and
100copy it to the Applications folder.
101
102See below for an example of the [[https://tracesof.net/uebersicht-widgets/#Mond][Mond]] widget in action.
103
104** Status Bar
105
106[[https://github.com/FelixKratz/SketchyBar][SketchyBar]] is a customizable replacement for the macOS status or menu bar.
107
108You can browse a discussion where various users shared their [[https://github.com/FelixKratz/SketchyBar/discussions/47?sort=top][configurations]] for
109inspiration or to copy their dotfiles.
110
111** Dock
112
113The easiest way to customize the dock is to install [[https://ubarapp.com/][uBar]], which uses a
114Windows-like menu bar as the default style.
115
116However, the built-in macOS dock cannot be disabled and can only be set to
117"always hidden". This can be annoying as it will pop out any time your mouse
118cursor passes closely to the dock edge of the screen. Because of this, I simply
119use the built-in dock instead of customizing it with third-party software.
120
121Regardless, see below for the default installation style of uBar.
122
123** Application Icons
124
125You can also customize the icon of any application in macOS, which will show up
126in Finder, the Dock, Launchpad, search results, etc. I recommend using
127[[https://macosicons.com/][macOSicons]] to download icons you want, and then apply them by following this
128process.
129
1301. Open the Finder application.
1312. Navigate to the =Applications= folder.
1323. Right-click an application of your choice, and select =Get Info=.
1334. Drag the image you downloaded on top of the application's icon at the top of
134   information window (you will see a green "plus" symbol when you're hovering
135   over it).
1365. Release the new icon on top of the old icon and it will update!