Terminal-first workspace lifecycle automation for macOS.
DeskMode turns repetitive desktop setup into one command:
deskmode coding
deskmode study
deskmode chillIt can switch wallpapers, change light/dark mode, adjust brightness, open apps, launch URLs, reset running apps, remember the active workspace, and validate your setup.
Switching between coding, studying, and relaxing often means repeating the same small desktop setup steps. DeskMode makes those steps explicit, configurable, and fast.
- Workspace modes with descriptions
- Natural commands like
deskmode coding - Bundled wallpaper packs that work immediately after install
- Wallpaper switching with history and no recent repeats
- Foreground wallpaper rotation with
deskmode rotate - Optional favorite wallpapers
- Dark/light mode automation
- Built-in macOS brightness control, with optional CLI fallbacks
- App and URL launching
status,doctor, andvalidatecommands- Interactive mode creation with
deskmode create gaming - Interactive mode editing with
deskmode edit coding - Startup-style profiles:
focus,morning, andnightin the starter config - Workspace cleanup with
deskmode reset - Dry-run previews
- Rich terminal UI
DeskMode is macOS-only. Install it directly from GitHub with pipx:
brew install pipx
pipx ensurepath
pipx install git+https://github.com/adhithyapandiri-a11y/deskmode.gitRestart Terminal after pipx ensurepath, or reload your shell:
source ~/.zshrcThen run:
deskmode init
deskmode doctor
deskmode list
deskmode codingYou can also install with pip:
python3 -m pip install --user git+https://github.com/adhithyapandiri-a11y/deskmode.gitIf the deskmode command is not found after a pip --user install, make sure Python's user scripts directory is on your PATH.
For local development or modifying the code:
git clone https://github.com/adhithyapandiri-a11y/deskmode.git
cd deskmode
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
deskmode init
deskmode codingOn first real use, macOS may ask for permission for Terminal or Python to control System Events, open apps, and change desktop settings.
Homebrew tap target:
brew tap adhithyapandiri-a11y/tap
brew install deskmodedeskmode init
deskmode doctor
deskmode list
deskmode coding --dry-run
deskmode codingConfig lives at:
~/.config/deskmode/config.tomlState lives at:
~/.local/state/deskmode/state.jsondeskmode # banner and command guide
deskmode --version
deskmode help
deskmode init
deskmode list # aliases: ls, modes
deskmode packs # list bundled wallpaper packs
deskmode show coding
deskmode status # alias: st
deskmode doctor
deskmode validate
deskmode create gaming
deskmode edit coding
deskmode wallpaper coding
deskmode wp coding
deskmode coding --wallpaper-only
deskmode rotate coding --every 5m
deskmode rotate status
deskmode rotate stop
deskmode reset --dry-run
deskmode coding
deskmode coding --dry-run
deskmode coding --clean
deskmode config-path[modes.coding]
description = "Developer-focused dark workspace"
theme = "dark"
brightness = 0.8
apps = ["PyCharm"]
wallpaper_dir = "~/Pictures/DeskMode/coding"
wallpaper_pack = "coding"
favorite_wallpapers = ["coding_03_code-luis-gomes.jpg"]
rotation = "5m"
[modes.chill]
description = "Relaxed entertainment setup"
theme = "dark"
brightness = 0.45
urls = ["https://www.netflix.com"]
browser = "Google Chrome"
wallpaper_pack = "chill"
[modes.focus]
description = "Low-distraction work session"
theme = "dark"
brightness = 0.7
apps = ["PyCharm", "Notes"]
wallpaper_pack = "coding"
focus = truewallpaper_dir is optional. If both are set, the custom wallpaper_dir wins over wallpaper_pack.
DeskMode ships with bundled wallpaper packs:
deskmode packsDefault modes use:
wallpaper_pack = "coding"
wallpaper_pack = "study"
wallpaper_pack = "chill"That means a fresh install can run deskmode coding without manually downloading wallpapers.
Publishing note: only distribute bundled wallpapers when you have redistribution rights for them. Personal/free wallpaper downloads are not always safe to redistribute through GitHub, PyPI, or Homebrew.
Create a custom mode without editing TOML by hand:
deskmode create gamingDeskMode prompts for:
- description
- theme
- brightness
- wallpaper folder
- apps
- URLs
- preferred browser
- Focus support
- favorite wallpapers
Then it appends the new mode to your config.
Edit an existing mode:
deskmode edit codingThe edit flow keeps current values as defaults and lets you modify apps, URLs, theme, brightness, wallpaper source, focus support, favorites, and rotation.
Change only the wallpaper for a mode without opening apps, changing theme, or touching brightness:
deskmode wallpaper coding
deskmode wp study
deskmode chill --wallpaper-onlyStart rotation in the background:
deskmode rotate coding --every 1m
deskmode rotate chill --every 5m
deskmode rotate study --every 1hCheck or stop it:
deskmode rotate status
deskmode rotate stopSupported intervals:
1m, 5m, 1h, 5h, 12h, daily
For debugging or demos, run rotation in the current terminal:
deskmode rotate coding --every 1m --foregroundStop a foreground run with Ctrl+C.
For quick testing:
deskmode rotate coding --every 1m --count 1 --dry-runUse doctor when something feels off:
deskmode doctorIt checks macOS, config health, brightness backends, Shortcuts availability, and configured app paths.
Use validate to inspect config quality:
deskmode validateIt checks wallpaper folders, empty folders, invalid URLs, favorites that do not exist, and other config issues.
DeskMode ships with built-in macOS brightness support. It first tries macOS display frameworks directly. If the display refuses direct control, it falls back to macOS keyboard brightness automation, which requires no third-party package.
If macOS blocks the keyboard fallback, allow Automation/Accessibility for your terminal app in System Settings.
BetterDisplay CLI and brightness are still supported as optional fallbacks, but they are not required for DeskMode brightness control.
For realistic macOS Focus support, create a Shortcut named:
DeskMode Focus
Configure that Shortcut to enable your preferred Focus mode. When a DeskMode mode has:
focus = trueDeskMode will run that Shortcut.
deskmode reset gracefully quits non-excluded GUI apps using AppleScript. It keeps core macOS apps and lets you preserve specific apps:
deskmode reset --dry-run
deskmode reset --keep "Terminal,PyCharm"
deskmode coding --cleansrc/deskmode/
cli.py # argparse commands and Rich output
config.py # config loading and validation
config_writer.py # interactive mode persistence
validation.py # config validation checks
doctor.py # dependency and environment diagnostics
app_manager.py # app exclusion and cleanup selection rules
cleanup.py # cleanup planning and quit execution
errors.py # CLI-friendly exception hierarchy
models.py # typed domain models
reset_logic.py # workspace reset orchestration
runner.py # mode orchestration
state.py # active mode and wallpaper history
wallpaper.py # wallpaper discovery and selection
assets/ # bundled wallpaper packs
macos.py # AppleScript/subprocess automation adapter
status.py # status snapshot logic
Good README screenshots or terminal GIF frames:
deskmodedeskmode listdeskmode statusdeskmode doctordeskmode coding --dry-rundeskmode create gaming
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
python -m unittest discover -s tests- Homebrew tap formula
- Bundled wallpaper packs
- More robust Focus mode presets
- Optional scheduling
- Multi-monitor wallpaper support
MIT