Can I use a dark theme for everything?

General discussion related to "Everything".
geek
Posts: 3
Joined: Wed Nov 23, 2016 4:18 am

Can I use a dark theme for everything?

Postby geek » Thu Dec 07, 2017 1:18 am

I used to use it in the night, so its original ui is too light for me, can I use a dark theme for it?

NotNull
Posts: 754
Joined: Wed May 24, 2017 9:22 pm

Re: Can I use a dark theme for everything?

Postby NotNull » Thu Dec 07, 2017 3:50 pm

There are no themes, but you can change individual colors and styles of different types of items in the result list:
Menu:Tools > Options > Fonts and Colours

Change the "Normal" setting and most related settings change with it.

FWIW, my non-default Everything.ini colour settings are:

Code: Select all

normal_background_color=#c0c59c
normal_foreground_color=#0044aa
normal_bold=1
highlighted_foreground_color=#000000
selected_foreground_color=#ffffff


And that makes a huge difference (I dont like staring at a black on white window either; your eyes /brains get tired of that)

EDIT: If you created your 'dark theme', please post it on these forums. Others might benefit from that (I certainly will try it)

NotNull
Posts: 754
Joined: Wed May 24, 2017 9:22 pm

Re: Can I use a dark theme for everything?

Postby NotNull » Sat Dec 09, 2017 8:28 pm

BTW: a quick way to get your non-default colour settings, is by issuing next command in a CMD / Powershell console:
(when you are in the folder where your Everything.ini is located)

Code: Select all

findstr  "_bold= _color= _font= _font_size="  .\Everything.ini | findstr /v /e "="


For most people this command will do too:
(without going to the folder where your Everything.ini is located)

Code: Select all

findstr  "_bold= _color= _font= _font_size="  "%APPDATA%\Everything\Everything.ini" | findstr /v /e "="

Stamimail
Posts: 660
Joined: Sat Aug 31, 2013 9:05 pm

Re: Can I use a dark theme for everything?

Postby Stamimail » Sat Dec 09, 2017 10:03 pm

geek wrote:I used to use it in the night, so its original ui is too light for me, can I use a dark theme for it?

I think that the better solution for such a case, is using a dimmer program.
There are many dimmer programs out there, letting you to dim the screen.
From my experience those programs that trying to dim the screen by using "transparent black screen" (like PangoBright), give only a partial solution (they don't manage to dim Alt+Tab screen).
Programs that change color values of a screen (Gamma), are better in this respect.
Now I'm using a program called "Twilight Screen Dimmer". It's an old program so I'm not sure you can find it on internet.
I contacted its developer, Brian, trying to improve a little this app, but it was appear that the source files lost.
... at the bottom line, that's what I got:

Code: Select all

21.9.2015
   
Hi

I would have used the Gamma Ramp API.  This is an extract found with Google:

Some video cards allows you to programmatically modify the Gamma Ramp values. You can use this feature to change the brightness of the entire screen.

The SetDeviceGammaRamp API function receive an array of 256 RGB values. Increasing the values in this array will make your screen brighter, and decreasing these values will make your screen darker. You can also increase or decrease the intensity of the red/green/blue components.

Something like this example, if it is of use:

VAR
  GammaArray: ARRAY[0..2, 0..255] OF Word;

FUNCTION GetBrightNess: integer;
VAR
  Value: integer;
BEGIN
  GammaDC := GetDC(0);

  IF NOT GetDeviceGammaRamp(GammaDC, GammaArray) THEN BEGIN
    RESULT := 0;
    EXIT;
  END;

  ReleaseDC(0, GammaDC);
  Value := GammaArray[0, 127] + GammaArray[1, 127] + GammaArray[2, 127];

  RESULT := (Value DIV 381) - 128;
END;

FUNCTION SetDisplayBrightness(Brightness: Byte): Boolean;
VAR
  I, Value: Integer;
BEGIN
  Result := False;
  GammaDC := GetDC(0);

  IF GammaDC <> 0 THEN BEGIN
    FOR I := 0 TO 255 DO BEGIN
      Value := I * (Brightness + 128);
      IF Value > 65535 THEN
        Value := 65535;
      GammaArray[0, I] := Value; // R value of I is mapped to brightness of Value
      GammaArray[1, I] := Value; // G value of I is mapped to brightness of Value
      GammaArray[2, I] := Value; // B value of I is mapped to brightness of Value
    END;

    Result := SetDeviceGammaRamp(GammaDC, GammaArray);

    ReleaseDC(0, GammaDC);
  END;
END;

I would have reduced/increased Brightness in SetDisplayBrightness with the slider.

Hope that helps

Brian

I'm not a developer, so i can't go on. :(

Anyway, my main suggestions for improvement were:

Code: Select all

My suggetsions:
1. Make it Portable, Settings will be in INI fille.
2. You should make it a way, that when the app exit or crashed, the default values are restored.
3. You may add a Parameter for the EXE, so that we can make a .lnk file with this Paramete, to Start/Exit the program by this .lnk file.

Cleoss
Posts: 27
Joined: Wed Mar 07, 2018 7:10 am

Re: Can I use a dark theme for everything?

Postby Cleoss » Sat Mar 10, 2018 7:58 am

NotNull wrote:BTW: a quick way to get your non-default colour settings, is by issuing next command in a CMD / Powershell console:

Code: Select all

findstr  "_bold= _color= _font= _font_size="  .\Everything.ini | findstr /v /e "="



Thx for idea for the script! Now we have a script that changes all params we want AT ONCE.

NotNull wrote:FWIW, my non-default Everything.ini colour settings are:

Code: Select all

normal_background_color=#c0c59c
normal_foreground_color=#0044aa
normal_bold=1
highlighted_foreground_color=#000000
selected_foreground_color=#ffffff


EDIT: If you created your 'dark theme', please post it on these forums. Others might benefit from that (I certainly will try it)


With my script you can put some strings with Everything's parameters (and set for them all values as u like it) to the file "Evytn.ini" (which must lay in the same folder with the script), and this script will copy all parameters to the main Everything's ssettings' file "Everything.ini", once u run that script from the Clickermann it will apply selected sets and reload the Everything with these new settings. With this script u can share ur fav settings with forum members and apply them fast. You need to show only those settings that u need (it could be a single parameters). Sure, parameters shouldn't be blank. And everybody can rapidly create color schemes, test them and then post to this topic!

Disclaimer: please, backup your setting file "Everything.ini" before you run the script!

Here's the script:

Code: Select all

// 08-Mar-2018
#name "iniCy"
$input="Evytn.ini"
//%APPDATA%\Everything\Everything.ini
$output="E:\port\PortableApps\~~etc\Everything-1.4.1.877.x64\Everything.ini" //err wit iniwr
//$output="Everything.ini"
$output2="Everything.ini"
//$tmp="E:\port\PortableApps\~~clickermann_last\Clickermann4.13b3\projects\tmp\"
$tmp="E:\port\PortableApps\~~clickermann_last\Clickermann4.13b3\projects\"
$output3=strconcat($tmp,$output2)
$defaultDiv="Everything"
$app="E:\port\PortableApps\~~etc\Everything-1.4.1.877.x64\Everything.exe"
logclear
$amt=600
$bat="cy.bat"

execute($app,"-exit")
print("Reopening the app!")
wait(5)
print("Press NO in Error/EXECUTE dialogue twice!!!")
$quot=tfread("quot.txt",1)
copy /Y "C:\Clickermann\projects\1.txt" "C:\Clickermann\projects\1_copy.txt"
$bat1=strconcat("copy /Y ",$quot,$output,$quot," ",$quot,$output3,$quot)
strwriteln($bat,$bat1,1)
waitms($amt)
execute($bat)
wait(5)

$lnz=tfCount($input)

$parsed=0
$inln=0
while($parsed=0)
   inc($inln)
   if($inln>$lnz)
      $parsed=1
   end_if
   //$curln=strReadLn($input,$inln)//err
   $curln=tfRead($input,$inln)
   if(strcut($curln,1,1)="[")
      arrpush($divs,$inln)
      $curdiv=strcut2($curln,2,strlen($curln)-1)
      arrpush($divs,$curdiv)
      //print("Line ",$inln,": Div ",$curdiv)
   end_if
end_cyc
arrpush($divs,$lnz+1)
$divamt=int(arrsize($divs)/2)
print("Totally ",$divamt," div(s). ")
if($divamt=0)
   arrpush($divs,1)
   arrpush($divs,$defaultDiv)
   $divamt=1
end_if
for($i=0,$i<$divamt)//+1
   $curdiv=$divs[$i*2+1]
   print($curdiv,": ")
   $params=0
   $blank=0
   for($j=$divs[$i*2]+1,$j<$divs[$i*2+2])
      $curline=strReadLn($input,$j)
      $eq=strpos($curline,"=")
      if($eq=0)
         //print("No params in the line! ")
      else
         $curpar=strcut2($curline,1,$eq-1)
         $curval=strcut2($curline,$eq,strlen($curline))
         inc($params)
         //print($curval)
         //print($curpar, " iZ ",$curval," (",strlen($curval),") ")
         if(strlen($curval)>1)// err with ="=#"
            //print("!")
            $val=strcut2($curval,2,strlen($curval))
            //print($curpar, " iZ ",$val)
            INIWRITE($output2,$curpar,$val,$curdiv)//err wi $output3
            inc($blank)
            waitms(900)
           
         else
            //print($curpar, " iZ ",strcut2($curval,2,strlen($curval)))
            //print($curpar, " iZ ",$curval)
         end_if
      end_if
   end_cyc
   print($params," param(s) in the div, ",$blank," of them are NOT blank!")
end_cyc
print("Launching the app!")
$bat2=strconcat("copy /Y ",$quot,$output3,$quot," ",$quot,$output,$quot)
strwriteln($bat,$bat2,1)
waitms($amt)
execute($bat)
wait(3)
execute($app)
halt


One problem we got during the script execution is that u should close the error messages twice per cycle, but u can switch off one of them in Settings > Interpretation > Ignore run-time errors > Apply. Both errors looks so:
Image and Image
So each run plz press "No" buttons (two times per run). Unfortunatelly, I can't correct these errors in the script. Before using the script, u should set it up with the path to both ur ini-files.

The copy of script is enclosured to the post, too (in 7Zip archieve, 1kb).


Stamimail wrote:I think that the better solution for such a case, is using a dimmer program.
From my experience those programs that trying to dim the screen by using "transparent black screen" (like PangoBright), give only a partial solution (they don't manage to dim Alt+Tab screen).
Programs that change color values of a screen (Gamma), are better in this respect.
Now I'm using a program called "Twilight Screen Dimmer". It's an old program so I'm not sure you can find it on internet.
I contacted its developer, Brian, trying to improve a little this app, but it was appear that the source files lost.
... at the bottom line, that's what I got:

Code: Select all

VAR
  GammaArray: ARRAY[0..2, 0..255] OF Word;

FUNCTION GetBrightNess: integer;
VAR
  Value: integer;
BEGIN
  GammaDC := GetDC(0);


I'm not a developer, so i can't go on. :(

Anyway, my main suggestions for improvement were:

Code: Select all

My suggetsions:
1. Make it Portable, Settings will be in INI fille.
2. You should make it a way, that when the app exit or crashed, the default values are restored.
3. You may add a Parameter for the EXE, so that we can make a .lnk file with this Paramete, to Start/Exit the program by this .lnk file.


I use dimmers, too. In the Windows I use dimmer of year 2007th by Nelson Pires, simple app with slider, but it has no development. It has the same lags as the app u mentioned (PangoBright, I tested it) are:
  • It blocks the popuping of Windows' task panel with its transparent layer which is over all windows.
  • As u wrote, it dims not all windows. But I know how to correct partially this behaviour. First, you need to elevate the app upto admin, the second is that it's dimming only that windows that was opened during its launch, so it can't recognize new windows, but u can reopen the dimmer. But however it won't dim the Alt-Tab windows coz it's "new" each time, it's created from the scratch.
But anyway this dimmer by N. Pires has some profits u noticed above:
  1. it's tiny et portable
  2. It has transparency setting in xml file, it seems to store it on change, so it can restore em after crash, or otherwise u can automatically write there a value u need, coz it's just a text in xml format, it's not binary
  3. has a wide range of opacity (5--95 percent), more than in Pango, and steps are percents, not 10s of percents

The code u supplied above is like Pascal for me, but I'm not sure. I used one well-known dimmer that changes gamma, but I didn't like it: it's uncontrolable and has just a bit of settings.

On my Android with amOLED I use the dimmer Image "Display Brightness", it can adjust phone screen brightness upto 0% (from ver. 5.1?), very nice on OLED in the darkness. Also it has useful invisible overlay button which is accessible all the time, and a lot of other features.
You do not have the required permissions to view the files attached to this post.

NotNull
Posts: 754
Joined: Wed May 24, 2017 9:22 pm

Re: Can I use a dark theme for everything?

Postby NotNull » Sat Mar 10, 2018 3:40 pm

Cleoss wrote:With my script you can put some strings with Everything's parameters (and set for them all values as u like it) to the file "Evytn.ini" (which must lay in the same folder with the script), and this script will copy all parameters to the main Everything's ssettings' file "Everything.ini", once u run that script from the Clickermann it will apply selected sets and reload the Everything with these new settings. With this script u can share ur fav settings with forum members and apply them fast. You need to show only those settings that u need (it could be a single parameters). Sure, parameters shouldn't be blank. And everybody can rapidly create color schemes, test them and then post to this topic!

Disclaimer: please, backup your setting file "Everything.ini" before you run the script!


I use a CMD script for that same purpose:

  • Create a textfile with settings to change. Format can be

    Code: Select all

    [Everything]
    maximized=1
    alternate_row_color=1

    or

    Code: Select all

    maximized=1
    alternate_row_color=1

  • Drag this file to INJECT.cmd
  • Done

The script will stop a running Everything, inject the settings and start Everything.

Don't forget to change the settings (INI= ; EXE=) in the script to your situation


INJECT.cmd

Code: Select all

@echo off
setlocal
::______________________________________
::
::   SETTINGS
::______________________________________
::

::   Location of Everything.exe
   set EXE=c:\tools\everything\everything.exe
::   Location of Everything.ini
   set INI=c:\tools\everything\everything.ini

   
::______________________________________
::
::   INIT
::______________________________________
::

::   Check parms
   If not exist %1 (
      echo File does not exist!
      pause
      goto :EOF
   )

::   Create backup
   copy /y "%INI%" "%INI%.InjectBackup"

::______________________________________
::
::   ACTION!
::______________________________________
::

::   Stop running Everything
   start /wait "" "%EXE%" -quit

::   Inject settings   
   copy "%INI%" + %1

::   Start Everything
   start "" "%EXE%"




Stamimail wrote:I think that the better solution for such a case, is using a dimmer program.


Try f.lux
You can unzip the installer (it's a SFX) and run flux.exe. If you're asked for elevation: ignore it; it's not needed.

Cleoss
Posts: 27
Joined: Wed Mar 07, 2018 7:10 am

Re: Can I use a dark theme for everything?

Postby Cleoss » Mon Mar 12, 2018 9:15 am

NotNull wrote:I use a CMD script for that same purpose:

  • Drag the file to INJECT.cmd
  • Done

The script will stop a running Everything, inject the settings and start Everything.
Don't forget to change the settings (INI= ; EXE=) in the script to your situation


INJECT.cmd

Code: Select all

@echo off
setlocal
::______________________________________
::
::   SETTINGS
::______________________________________
::

::   Location of Everything.exe
   set EXE=c:\tools\everything\everything.exe
::   Location of Everything.ini
   set INI=c:\tools\everything\everything.ini

   
::______________________________________
::
::   INIT
::______________________________________
::

::   Check parms
   If not exist %1 (
      echo File does not exist!
      pause
      goto :EOF
   )

::   Create backup
   copy /y "%INI%" "%INI%.InjectBackup"

::______________________________________
::
::   ACTION!
::______________________________________
::

::   Stop running Everything
   start /wait "" "%EXE%" -quit

::   Inject settings   
   copy "%INI%" + %1

::   Start Everything
   start "" "%EXE%"




It's nice solution, it's even faster than mine :D Good that you can master that PowerSheel script quick! I've saved it to my scripts))

Stamimail wrote:I think that the better solution for such a case, is using a dimmer program.


NotNull wrote:Try f.lux
You can unzip the installer (it's a SFX) and run flux.exe. If you're asked for elevation: ignore it; it's not needed.


I tried FLux, and I was writing exactly about it, but I didn't like the way the app changes gamma, that orange tint.


Return to “General”