Last active
January 4, 2026 07:46
-
-
Save vasi/b9cf09423aecba6d036cc4eb9397086c to your computer and use it in GitHub Desktop.
Dynamically change the number of Compiz desktops #dalitrixie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import sys | |
| import compizconfig | |
| if len(sys.argv) != 2: | |
| print("Usage: dynamic-desktops [+N | -N]") | |
| sys.exit(1) | |
| change = int(sys.argv[1]) | |
| context = compizconfig.Context() | |
| hsize = context.Plugins['core'].Screens[0]['hsize'] | |
| hsize.Value = max(1, hsize.Value + change) | |
| context.Write() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| perl -i -pe 's/(?<=vwidth = )(\d+)/$1 + '$1' || 1/e' ~/.config/wayfire.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment