Skip to content

Instantly share code, notes, and snippets.

@lucascosti
Created February 21, 2018 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucascosti/89096dfe16ef565a8aa123a6bfd87b8c to your computer and use it in GitHub Desktop.
Save lucascosti/89096dfe16ef565a8aa123a6bfd87b8c to your computer and use it in GitHub Desktop.
Cinnamon Window List Width change
#!/usr/bin/python
import sys
import fileinput
file = "/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js"
#file = "applet.js"
searchExp = "alloc.natural_size = 150 * global.ui_scale;"
replaceExp = "//***Lucas**** Replaced: alloc.natural_size = 150 * global.ui_scale;\n alloc.natural_size = 400 * global.ui_scale;"
for line in fileinput.input(file, inplace=1):
if searchExp in line:
line = line.replace(searchExp,replaceExp)
sys.stdout.write(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment