Skip to content

Put your battle station into an appropriate color scheme

Notifications You must be signed in to change notification settings

janschejbal/battlestations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Battlestations

A collection of scripts to put your battle station into an appropriate color scheme. Requires Gnome Shell.

Best combined with an IoT command to switch to red lighting and appropriate sound effects.

Greyscale mode can be useful when handling memetic hazards like the McCollough effect.

Usage

colorize.sh is the main script, the rest are leftovers from development.

  • Call it without parameters to clear effects
  • Call it with a color name (e.g. ./colorize.sh '#0f0' - don't forget to quote/escape hex codes containing #)
  • Setting the color to white results in an effect equivalent to desat.sh (greyscale display)

Helpful snippets

Restart Gnome

Alt+F2 r Enter

Useful when you've accidentally blacked out your screen with the wrong effect...

Looking Glass

Alt+F2 lg Enter

or

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.lookingGlass.toggle();'

Effects

Looking glass or JS/extension:

// Likely not needed in Looking Glass
const Clutter = imports.gi.Clutter;
const Main = imports.ui.main;

// You may want to use "const e" in an extension
e = new Clutter.DesaturateEffect();
Main.uiGroup.add_effect(e);
Main.uiGroup.remove_effect(e);

col = new imports.gi.Clutter.ColorizeEffect();
red = Clutter.Color.from_string("#ff0000")[1];
col.set_tint(red);
Main.uiGroup.add_effect(col);

Main.uiGroup.clear_effects();

or shell:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.uiGroup.add_effect(new imports.gi.Clutter.DesaturateEffect());'

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "Main.uiGroup.clear_effects(); const e = new imports.gi.Clutter.ColorizeEffect(); const c = imports.gi.Clutter.Color.from_string('#0f0'); if (c[0]) { e.set_tint(c[1]); Main.uiGroup.add_effect(e); }"

Clear effects

Looking Glass:

Main.uiGroup.clear_effects()

Shell:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.uiGroup.clear_effects();'

Worth looking into

Shader effects!

Started working on this but couldn't get it to work. May not be possible without subclassing ClutterShaderEffect.

Sound effect sources

License

Penta-licensed under Public Domain, CC0, MIT, WTFPL, Apache v2 (in plaintext: do whatever you want with this).

(c) 2020 Jan Schejbal

By contributing to this repository you agree to license your code under the same terms.

About

Put your battle station into an appropriate color scheme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages