Esempio n. 1
0
	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()
Esempio n. 2
0
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:
Esempio n. 3
0
	def setcursorcolor(r,g,b):
		config.rgb_cursor=(r,g,b)
		config.apply()
Esempio n. 4
0
	def setboth(self,a):
		config.typeface='-'.join(a)
		config.apply()
		misc.debug("new typeface: "+config.typeface)
		return 0
Esempio n. 5
0
	def switchdarkmode(self):
		config.isdarkmode^=1
		config.apply()
Esempio n. 6
0
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()
Esempio n. 7
0
def reset_palette():
    config.lightmode = lights_global[:]
    config.darkmode = darks_global[:]
    config.apply()
Esempio n. 8
0
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()
Esempio n. 9
0
def testsurface():
    config.columns = 50
    config.rows = 18
    config.windims = (8 + 14 * config.columns, 27 * config.rows)
    config.apply()
    return 0
Esempio n. 10
0
def increasewindow():
    config.typeface = "monospace-18"
    config.celldims = (15, 28)
    config.windims = (15 * 68, 28 * 20)
    config.apply()
    return 0