September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -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")
|
||||
9
Task/Video-display-modes/Julia/video-display-modes.julia
Normal file
9
Task/Video-display-modes/Julia/video-display-modes.julia
Normal 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
|
||||
19
Task/Video-display-modes/Perl/video-display-modes.pl
Normal file
19
Task/Video-display-modes/Perl/video-display-modes.pl
Normal 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";
|
||||
8
Task/Video-display-modes/Python/video-display-modes.py
Normal file
8
Task/Video-display-modes/Python/video-display-modes.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue