def setbrightness(self,pct): self.lastpct=pct for i in range(16): config.lightmode[i]=(int(self.lightmode[i][0]*pct/100),int(self.lightmode[i][1]*pct/100),int(self.lightmode[i][2]*pct/100)) config.darkmode[i]=(int(self.darkmode[i][0]*pct/100),int(self.darkmode[i][1]*pct/100),int(self.darkmode[i][2]*pct/100)) # vte.stderr(str(i)+": "+("%x"%config.darkmode[i][0])+("%x"%config.darkmode[i][1])+("%x"%config.darkmode[i][2])) config.apply()
import subprocess import os import sys import shutil ahkPath = "\"Ahk2Exe\\Ahk2Exe.exe\"" from config import config, apply, save apply(globals()) studioMode = ("--studio" in sys.argv) or ("-s" in sys.argv) # Install to studio directory legacyMode = ("--legacy" in sys.argv) or ("-l" in sys.argv) # Enable legacy mode config["legacyMode"] = legacyMode save() import installUtil installUtil.setStudio(studioMode) if installUtil.isStudio(): print("Using studio settings") if installUtil.verifyAndMerge(): print("Merged wrapper with latest version folder: "+installUtil.getInstallLocation()) if os.path.isdir("__pycache__"): shutil.rmtree("__pycache__") print("Updated python files") if compressWrapper: compressWrapper = "1" else:
def setcursorcolor(r,g,b): config.rgb_cursor=(r,g,b) config.apply()
def setboth(self,a): config.typeface='-'.join(a) config.apply() misc.debug("new typeface: "+config.typeface) return 0
def switchdarkmode(self): config.isdarkmode^=1 config.apply()
def OnResize(): # can choose to change font size and/or change rows/cols # vte.stderr("OnResize: "+str(config.windims)) config.columns = int(config.windims[0] / config.celldims[0]) config.rows = int(config.windims[1] / config.celldims[1]) config.apply()
def reset_palette(): config.lightmode = lights_global[:] config.darkmode = darks_global[:] config.apply()
def palette(cmd): if len(cmd) != 7: return p = config.darkmode if config.isdarkmode else config.lightmode p[unhex(cmd[0])] = (unhex(cmd[1:3]), unhex(cmd[3:5]), unhex(cmd[5:7])) config.apply()
def testsurface(): config.columns = 50 config.rows = 18 config.windims = (8 + 14 * config.columns, 27 * config.rows) config.apply() return 0
def increasewindow(): config.typeface = "monospace-18" config.celldims = (15, 28) config.windims = (15 * 68, 28 * 20) config.apply() return 0