Adds a “Show windows from current monitor only” option to Cinnamon’s Alt-Tab.
Includes a safe patch/unpatch script that edits the Cinnamon schema, Settings panel, and app switcher JS, recompiles schemas, and restarts Cinnamon automatically.
- ✅ Detects existing/manual patches (won’t duplicate changes)
- ✅ Clearly marked BEGIN/END blocks for clean removal
- ✅ Timestamped backups of modified files
- ✅
statuscommand to inspect current state
- Schema: Adds
alttab-switcher-show-current-monitortoorg.cinnamon.gschema.xml(defaultfalse) - Settings → Windows: Adds a toggle row in
cs_windows.py - Alt-Tab logic: Makes
appSwitcher.jsfilter to current monitor when the key istrue
The script compiles schemas and runs
cinnamon --replaceautomatically.
- Cinnamon desktop (Linux Mint or other distros with Cinnamon)
- Root privileges to modify system files & compile schemas
- Default paths (adjust in script if your distro differs):
/usr/share/glib-2.0/schemas/org.cinnamon.gschema.xml/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py/usr/share/cinnamon/js/ui/appSwitcher/appSwitcher.js
Before
After
git clone https://github.com/<your-username>/cinnamon-alt-tab-current-monitor-toggle.git
cd cinnamon-alt-tab-current-monitor-toggle
chmod +x cinnamon-current-monitor-toggle.sh./cinnamon-current-monitor-toggle.sh patchEnable/disable at runtime:
gsettings set org.cinnamon alttab-switcher-show-current-monitor true # enable
gsettings set org.cinnamon alttab-switcher-show-current-monitor false # disable./cinnamon-current-monitor-toggle.sh unpatchIf it detects manual/unmarked edits, it leaves them intact and warns you.
./cinnamon-current-monitor-toggle.sh statusShows presence of the schema key, settings toggle, JS logic, and whether our markers are present.
- Schema: Skips insertion if
org.cinnamonalready has the key - Settings: Skips if
cs_windows.pyalready references the key - JS: Skips if
appSwitcher.jsalready contains the logic (with or without our markers)
Unpatch removes only our BEGIN/END:CURRENT_MONITOR_PATCH blocks. Manual changes are not touched.
- Backups are created next to each modified file (e.g.
*.bak.YYYYMMDD-HHMMSS) - If Cinnamon doesn’t come back after restart, log out/in or run:
cinnamon --replace &
- GSettings overrides (
*.gschema.override) cannot add new keys; we edit the schema and recompile. - Distro updates may overwrite these files; simply run
patchagain if needed.
MIT — see LICENSE.

