My OS setup
1127 words
· 6 minute read
Last updated: Jan 29, 2023
· Published: Oct 4, 2021
macOS
- Alfred (Spotlight alternative. Has some cool features like triggering “Lock” & “Restart” directly from the tool)
- Magnet (https://magnet.crowdcafe.com) for Window snapping (both with shortcuts as well as moving windows to the edges)
- Rectangle is a great free alternative.
- homebrew (for installing tools. Both CLI tools as well as GUI tools. Use https://brew.sh for searching the tools)
- Contexts (for switching windows via Command+Tab. Advice: I would disable the sidebar that comes with the tool)
- iTerm2 (better Terminal)
- KeepassXC
- fish shell (see my blog post on how I customized it)
- VS Code
- Sublime Text 4
- Safari & Firefox & Chrome
- Toggl
- WhatsApp & Telegram programs
- KeepingYouAwake (to disable sleep for some periods of time)
- You can also use the built-in command line tool
caffeinate
, e.g. withcaffeinate -u
to declare that the user is active as long as the command is running. Readman caffeinate
for detailed settings. KeepingYouAwake is actually just a small wrapper around this built-in tool :D
- You can also use the built-in command line tool
- Postman (for testing API requests)
Apps I want to try out
- Soulver, a mixture of an text editor & calculator. Costs $34.95 (single purchase, non-recurring)
- ImageOptim to optimize image file sizes
- rcmd (6.99€, single purchase, non-recurring) offers an interesting concept for switching apps: Just press the right command button & a letter, and you switch instantly to an app that starts with said letter. Contexts has a similar feature - “Fast Search” - that can also be bound to the right command. I am currently trying it out, but to be honest, I forget about the shortcut too often, so I’m not really using it yet…
Tools I used to use
- Cisco AnyConnect Secure Mobility Client
- Rancher Desktop (for Docker)
- Sequel Ace (for browsing databases)
- Tunnelblick (for connecting to OpenVPN VPNs)
- Slack
2022-11-25 ARCHIVED (I don’t use Windows on a day-to-day basis anymore)
Windows
This document serves as my personal documentation on how my Windows machine is configured & which application I use. This is especially useful when setting up a new Windows machine from scratch (I use Windows in my current role at work & macOS at home).
Prerequisites
Package manager - for Linux, there exists apt
, for macOS, there exists Homebrew. Though there have been various package managers for Windows like Chocolateley & Scoop, none was “really” successful (in my optinion). Now, Microsoft is working on their own (Open Source!) command-line Windows package manager: https://docs.microsoft.com/en-us/windows/package-manager/ aka winget
. It was pre-installed on my machine & try to use it as much as possible to install & update my applications 😎 The package repository is Open Source on GitHub - see https://github.com/microsoft/winget-pkgs . Btw, https://winget.run is a very nice search engine for packages available via winget
🔎.
Applications
- Firefox
winget install -q "Mozilla.Firefox" --source winget
- Transfer profile from previous machine (see https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles)
- Visual Studio Code
winget install --query "VS Code"
- also: Remote Developer Tools (both WSL and SSH extensions)
- Slack
- Toggl (
winget install -q "Toggl" --source winget
) - IntelliJ PHPStorm & GoLand
winget install --query "PHPStorm" --source winget
winget install --query "GoLand" --source winget
- Increase memory size to 4096MB for each
- Install Bitbucket Linky Plugin for opening the relevant commits & PRs on Bitbucket directly via the IDE
- Settings ⇒ Keymap ⇒ Assign “Git Annotate” command to “Ctrl+Shift+G” shortcut.
- Settings ⇒ Version Control ⇒ Confirmation: Disable everything related to automatically adding changes to staging.
- Settings ⇒ Code Style ⇒ Line separator: Unix and macOS (\n)
- Windows Terminal
winget install --query "Windows Terminal" --source winget
- Settings (
Ctrl
+,
)- After WSL2 is installed, set Windows Terminal standard profile to “Ubuntu” (or whatever the Linux distribution you have installed)
- Set WSL2 starting directory to your Linux home folder, e.g.
\\wsl$\Ubuntu\home\markus
(by default, it will be the Windows home folder… 🙁)
- AutoHotKey
- GreenShot
- VirtualBox
- Note: When install VirtualBox via
winget
, you need to start your PowerShell instance as administrator - Note: VirtualBox 6.1.26 and Vagrant 2.2.18 do not go well together. The workaround is to install/downgrade VirtualBox to 6.1.24. See https://github.com/hashicorp/vagrant/issues/12520 and https://discuss.hashicorp.com/t/vagrant-with-virtualbox-6-1-26-issues/28488
winget install -e --id Oracle.VirtualBox --version 6.1.24
- Note: When install VirtualBox via
- Postman
- KeePassXC
- 1Password
winget install -e --id AgileBits.1Password
- Cisco AnyConnect Secure Mobility Client
- Git & adjust the
.gitconfig
via:git config --edit --global
- WhatsApp & Telegram programs
- https://github.com/Code52/carnac ⇒ to show the keys pressed (useful for remote video conferences or screencasts)
- Install Docker (with WSL2 backend!)
Portable Apps
- CamStudio: For screen recordings
- GIMP: For occasional image editing
- HandBrake: For converting videos into a smaller file
- HeidiSQL: Nice GUI to manage SQL databases (including SQLite!)
- IrfanView: Image viewer - occasionally useful, when working with many images & doing some batch image-resizing
- pdfsam: For merging & splitting PDFs
- VLC: For watching videos (supports more formats than the built-in video viewer)
- WinDirStat: For viewing folder & file sizes and finding the largest ones.
Windows Config
- Enable Bitlocker hard drive encryption (if not enabled already)
- Enable authentication via fingerprint
- Enable “View file endings” & “Show hidden elements”
- Security: Enable “Sleep when closing the lid” & enable “lock on sleep”
- Add AutoHotKey shortcut helpers (
shortcut_helpers.ahk
file in this folder) for “Map CapsLock to Escape” & “Make Ctrl+Shift+V work everywhere” & add to autostart (see https://www.markusdosch.com/2021/08/windows-adding-programs-to-autostart/)
WSL2
- Enable automount metadata, so Windows files will have ok-permissions when viewed from the WSL. See https://docs.microsoft.com/en-us/windows/wsl/wsl-config#per-distribution-configuration-options-with-wslconf, line
options = "metadata,umask=22,fmask=11"
- Ubuntu
- Generate an SSH key, via https://help.github.com/en/enterprise/2.17/user/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
- Install ZSH (https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)
- Install fzf (https://github.com/junegunn/fzf)
- Important: Enable keybindings (for me, they were not enabled by default). When using oh-my-zsh (see next point), this is very easy: Just enable the
fzf
plugin
- Important: Enable keybindings (for me, they were not enabled by default). When using oh-my-zsh (see next point), this is very easy: Just enable the
- Install ripgrep (https://github.com/BurntSushi/ripgrep)
- Install oh-my-zsh (https://ohmyz.sh/#install)
zsh-autosuggestions
, via https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md- Other plugins enabled:
z
,timer
(withTIMER_THRESHOLD=0.1
),zsh-interactive-cd
(requires fzf)
- Move
.zsh_history
(maybe also.zshrc
, depending on your needs) - Copy old SSH-Key to new machine
- Move
.ssh/config
- Install Git & adjust
.gitconfig
- Install tmux & enable mouse-mode (create file
~/.tmux.conf
& add lineset -g mouse on
) - Install pyenv & install Python through it
- Install poetry (Python dependency manager)
- Install Vagrant (Note: Install it the WSL2 way!): https://www.vagrantup.com/docs/other/wsl
- In the respective Vagrant file, enable symlinks for shared folders in Windows-host: https://vomtom.at/running-vagrant-with-symbolic-links-enabled/
- Nice to know on how to access WSL files from Windows: Either enter
\\wsl$
in your Windows explorer address bar, or enterexplorer.exe .
in your WSL terminal to open the current folder in Windows explorer (via https://www.howtogeek.com/426749/how-to-access-your-linux-wsl-files-in-windows-10/) - Install nvm to install & manage Node.js/npm versions, https://github.com/nvm-sh/nvm
- When using oh-my-zsh, you don’t need to add the lines given at the end of the install to your
.zshrc
. Instead, you can simply activate thenvm
plugin.
- When using oh-my-zsh, you don’t need to add the lines given at the end of the install to your
Assets
shortcut_helpers.ahk
; Maps CapsLock to Escape
CapsLock::Esc
; Makes Ctrl+Shift+V for "Paste without formatting" work everywhere (via https://www.howtogeek.com/186723/ask-htg-how-can-i-paste-text-without-the-formatting/)
#If !WinActive("ahk_exe Hyper.exe")
$^+v:: ; CTRL+SHIFT+V
ClipSaved := ClipboardAll ;save original clipboard contents
clipboard = %clipboard% ;remove formatting
Send ^v ;send the Ctrl+V command
Clipboard := ClipSaved ;restore the original clipboard contents
ClipSaved = ;clear the variable
Return
- You are in control
- My Favorite Shortcuts for VS Code
- Customizing my shell: From bash to zsh to fish
- JSON5: JSON with comments (and more!)
- jq: Analyzing JSON data on the command line
- Get Total Directory Size via Command Line
- Changing DNS server for Huawei LTE router
- Notes on Job & Career Development
- Adding full-text search to a static site (= no backend needed)
- Generating a random string on Linux & macOS