Git Product home page Git Product logo

conditioning's Introduction

Conditioning

Slide show software for conditioning affirmations.

Commands are:

  • LEFT+RIGHT ARROWS (go back and forth in slide show)
  • SPACE (start/stop slide show)
  • R (toggle order of slideshow to random)
  • L (reload from file)

Speed of the slide show is set in the config.json.

Building

This software is written in golang 1.14 and built with the GTK.

Golang is pretty simple to install (https://golang.org/doc/install), GTK a little harder, follow the steps here: https://github.com/gotk3/gotk3

The crux of it is that some package need to exist in ubuntu for the build to work, and the very first time it builds it will take quite a while.

Critically there are two values that need to be set in the local environment:

  • GOPATH is where golang will put temporary files that it works with.
  • GOBIN (usually $GOPATH/bin) is where the binary executable will be built.

The ruh.sh scripts in this repo rely on GOBIN being set in order to find the executable.

The root-level run.sh will do a build then run so, once the necessary parts are on the local machine the whole software can be launched from

./run.sh

(If you cannot execute the shell script, give it executable privileges: sudo chmod a+x run.sh)

The Affirmations File

Every line in the affirmatinos file is either:

  • An affirmation.
  • A comment that is ignored (line begins with "//").
  • A blank line.

The first non-blank line beginning with "//" is the window title for the slide show.

For affirmations, the first part of the line is the affirmation.

The second part of the line, between "[" and "]" indicates the font, color, and positioning of the affirmation; and the image, image size, and image position.

Those parts are optional. If both the font is configured and the image is configured, their relative settings are separated by a space.

The font settings are:

  • color, "b" (black with white outline) or "w" (white with black outline).
  • font size, a number.
  • offset from center, an x, y value with negative going up and to the left, and positive going down and to the right.

The images settings are:

  • image name without path, expects the file to be in the images folder next to the affirmations file used
  • image size, a decimal value where 1.0 is 100% size of the image
  • offset from center, an x, y value with negative going up and to the left, and positive going down and to the right.

The affirmations.example.txt shows examples of all these setttings.

The Configurations File

The Configurations file is a JSON formatted file that has settings like the screen size, slide show speed, and default fonts and outline widths.

If you're not familiar with JSON files they are meant to be modified by hand but can be finicky. It is sometimes handy to put a misbehaving file in an online JSON parser and let the parser point out the place in the file that is barfing.

The examples run.sh

The run.sh in examples show a setup that allows multiple slide shows using a single config. The run.sh expects to find the executable in the $GOBIN path and takes a subdirectory (a specific slide show) as a parameter. It is executed like this:

cd examples
./run.sh slideshow1

Royalty Free Stock Images

Thanks to https://www.pexels.com/ and the artist there for their royalty free stock images in the examples.

conditioning's People

Contributors

glemzurg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.