πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #146664

--

#146664
From: Jeff-Relf.Me
Date: Sun, 23 Dec 2012 23:19
95 lines
6325 bytes
<style>  :not(:link):not(:visited){color:rgb(255,111,111)} :link{color:rgb(155,155,155)}  :visited{color:rgb(155,155,0)}  </style> <body bgcolor=black style='margin: 0'><pre style='color: rgb(255,111,111); padding:0 1em 1em 1em; font-size: 15px;  font-family: DejaVu Sans Mono, Lucida Console, monospace, MS Mincho; background: black;'>Β 
I'm enjoying my (slower) 20 watt PC;
it's forced me to write (nearly) sane code.

Now, when displaying [ 127 columns x 100 lines ] of "console" text,
1200 x 1920 pixels, I get 20 frames per second, instead of 12 ( or 1 ).
When there's less text, I get over 100 fps, "flipping" the "back buffer".

Also, I switched to the DejaVu Sans Mono font face ( from MS Mincho )
because it looks better in portrait mode, where my 127 columns (required)
span only 1,200 pixels, not 1,920. <A hRef="http://Jeff-Relf.Me/Diff.PNG" style='color:rgb(155,155,155)' target=_blank>screenshot</A>.

Problem is, I can't stop playing around with my new hard/soft ware.
My bosses are none happy; I can't control myself, obviously.

I NEVER see Win8's "Start Screen" ( Metro ),
and I LOVE how my desktop no longer has Win7/XP's "Start Button".
I wrote a "Start Toolbar" because, usually, MY CODE IS BEST ( for me ).

Launching apps is trickier than you might think.

In order to avoid the super bright/annoying/long white flash,
[ i.e. the "{ WPF app / Win8 Aero } from a black background" thing ],
I prevent the app from displaying anything for the first 1 to 4 seconds.

FireFox and Visual Studio won't launch minimized;
so launching them means I GET FLASHED... not good.
So my window must be "TopMost" while they start up.

To "deβ‹…minimize" ( i.e. to restore my keyboard/mouse focus ) ASAP,
I call SetForegroundWindow() whenever a WPF App calls my "Class";
like this:

  #define Record  PostMessage

  long __stdcall WinProc( HWND _Win, uint WM, uint C, long C2 ) {

    if ( TopMost ) { SetForegroundWindow( Win ); return 1 ;  }

    return !Win || _Win != Win 
    ? DefWindowProc( _Win, WM, C, C2 ) : Record( Win, WM, C, C2 ), 1 ;  }

Why that works, I've no idea, I just stumbled upon it.
Timing is everything, I'm sure.  Fucking random, scary. Google is mute.

Likewise, GetForegroundWindow() must be called 30 times a second;
otherwise, I'd not know, ASAP, when it's safe to exit "TopMost" mode.

Two seconds of "TopMost" isn't good,
but it's better than being flashed for a split second.

  inline WinUp() { ForeWin = GetForegroundWindow();
    return Up = ForeWin && ForeWin == Win ;  }
  β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…
  if ( TopMost && WinUp() != prevUp )
    prevUp = Up, ( ( Knocked += !Up ) < Times ? 0 : EoBad = Secs + .7 );

"Knocked" counts how many times I've been shoved to the background.

When it hits a certain number, specific to an app,
it's safe to leave TopMost mode ( .7 seconds later ); this way,
my app stays in the foreground and exits TopMost mode sooner.

Code from <A hRef="http://Jeff-Relf.Me/X.CPP" style='color:rgb(155,155,155)' target=_blank>X.CPP</A> (Visual C++).
β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…β‹…
I changed the color of IE / Win_8 visted/unvisited links by editing:

  <A hRef="http://Jeff-Relf.Me/Jeff_Relf.Theme.TXT" target=_blank style='color:rgb(155,155,155)' target=_blank>My IE / Win_8 "Theme"</A>.
  [ C:\Windows\Resources\Themes\Jeff_Relf.Theme ]

After editing the text, I activate it by switching themes.
Specifically, I commented/edited:

  ; unVisitedβ‹…Links( IE ).  Win_8 Flatβ‹…Link.
  HotTrackingColor= 155 155 155

  ; Text(IE9).  Visitedβ‹…Links(IE9) but with half the red/blue, same green.
  ; Folder File Names.  Findβ‹…Box text, Visual Studio.  Win_8 Static Text.
  WindowText= 222 111 77

<A hRef="http://Jeff-Relf.Me/Win_8_.REG" target=_blank style='color:rgb(155,155,155)' target=_blank>Registry Settings</A> to change font faces/colors/sizes.
;  In Windows 8, this is the only way change these settings:
;    [HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
;      lfCaptionFont.lfHeight 239 255 255 255, 0 0 0 0, 0 0 0 0, 0 0 0 0, lfWeight 144 1 0 0,
;      lfItalic 0, 0, 0, 1, 0, 0, 0, 0, 
;      lfFaceName 68 101 106 97 86 117 32 83 97 110 115 32 77 111 110 111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
;
; [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\FontSmoothing]
; To dim the white flash, "Animate Min/Max window transitions":
;   [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\AnimateMinMax]
;   "DefaultApplied"=dword:00000001

I also changed the color of <A hRef="http://Jeff-Relf.Me/userContent.CSS.TXT" target=_blank style='color:rgb(155,155,155)' target=_blank>Web Pages</A>, <A hRef="http://Jeff-Relf.Me/userChrome.CSS.TXT" target=_blank style='color:rgb(155,155,155)' target=_blank>FireFox</A> and <A hRef="http://Jeff-Relf.Me/Console.XML.TXT" target=_blank style='color:rgb(155,155,155)' target=_blank>(DOS) "Console 2"</A>.

To skip the Start Screen ( Metro ), see:  WinAero.COM
Technical Details
Message-ID: <Jeff-Relf.Me@Dec.23{3.19.PM.Seattle.2012}>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <Jeff-Relf.Me@Dec.23{3.19.PM.Seattle.2012}>
Subject: --
Date: Sun, 23 Dec 2012 23:19:32 +0000
From: Jeff-Relf.Me <@.>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!.POSTED!not-for-mail
Newsgroups: comp.os.linux.advocacy, alt.free.newsservers, sci.physics, alt.astronomy
 alt.astronomy
Organization: Glorb Internet Services, http://www.glorb.com
Lines: 95
NNTP-Posting-Host: XJGH+5GM8EvggnDfgIBqtQ.166.posting.glorb.com
Content-Type: Text/HTML; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@glorb.com
NNTP-Posting-Date: Sun, 23 Dec 2012 23:19:32 +0000 (UTC)
User-Agent: Jeff-Relf.Me/X.HTM
X-Notice: Scanned by Mr. Bill