September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -0,0 +1,9 @@
def invoke(String cmd) { println(cmd.execute().text) }
invoke("xrandr -q")
Thread.sleep(3000)
invoke("xrandr -s 1024x768")
Thread.sleep(3000)
invoke("xrandr -s 1366x768")

View file

@ -0,0 +1,9 @@
if Base.Sys.islinux()
run(`xrandr -s 640x480`)
sleep(3)
run(`xrandr -s 1280x960`)
else # windows
run(`mode CON: COLS=40 LINES=100`)
sleep(3)
run(`mode CON: COLS=100 LINES=50`)
end

View file

@ -0,0 +1,19 @@
$| = 1;
my @info = `xrandr -q`;
$info[0] =~ /current (\d+) x (\d+)/;
my $current = "$1x$2";
my @resolutions;
for (@info) {
push @resolutions, $1 if /^\s+(\d+x\d+)/
}
system("xrandr -s $resolutions[-1]");
print "Current resolution $resolutions[-1].\n";
for (reverse 1 .. 9) {
print "\rChanging back in $_ seconds...";
sleep 1;
}
system("xrandr -s $current");
print "\rResolution returned to $current.\n";

View file

@ -0,0 +1,8 @@
import win32api
import win32con
import pywintypes
devmode=pywintypes.DEVMODEType()
devmode.PelsWidth=640
devmode.PelsHeight=480
devmode.Fields=win32con.DM_PELSWIDTH | win32con.DM_PELSHEIGHT
win32api.ChangeDisplaySettings(devmode,0)