Skip to content

saqibameen/chrome-sidebar-toggle

Repository files navigation

Toggle Chrome Sidebar

A Raycast extension that toggles Chrome's vertical tabs sidebar with a single keystroke.

Chrome's vertical tabs sidebar ("Expand tabs" / "Collapse tabs") has no keyboard shortcut. This extension uses the macOS Accessibility API to find and press it programmatically — no coordinate hacking, works on any screen or resolution.

Install

Note

This extension is currently under review for the Raycast Store. For now, install it locally by running npm run dev in the project directory.

  1. Grant Raycast accessibility permission in System Settings > Privacy & Security > Accessibility
  2. Open Raycast, search "Toggle Sidebar", and run it.

Default Shortcut

Cmd + Shift + , — configurable in Raycast Settings > Extensions > Toggle Chrome Sidebar.

Note

Sometimes default shortcut assignment fails, so you'd have to configure it once yourself.

Requirements

  • macOS 13+
  • Raycast
  • Google Chrome with tab sidebar enabled
  • Xcode Command Line Tools (xcode-select --install)

How It Works

  1. Finds Chrome by its bundle identifier
  2. Gets the frontmost window's accessibility element
  3. Recursively walks the AX tree for a button titled "Expand Tabs" or "Collapse Tabs"
  4. Presses it via AXUIElementPerformAction

The Swift source is compiled on first run and cached — subsequent invocations execute in ~10ms.

Development

git clone https://github.com/saqibameen/chrome-sidebar-toggle.git
cd chrome-sidebar-toggle
npm install
npm run dev

License

MIT


Built by Saqib Ameen with Command Code

About

Raycast extension to toggle chrome vertical tabs sidebar

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors