Giter VIP home page Giter VIP logo

pi-display's Introduction

PiDisplay

PiDisplay System Tray Icon

PiDisplay is a system tray utility built for Raspberry Pi for switching between HDMI and UCTRONICS 3.5" LCD displays. The default method involves running bash scripts in the terminal, so PiDisplay simplifies this process by putting simple options in a dropdown menu from the system tray.

This app is build specifically for this UCTRONICS screen

The script was initially develope directly on the Pi with UC Davis's c-STEMBian installed. c-STEMBian is a curated OS built on Raspbian with a wide selection of c-STEM packages.

Installation

Open up the terminal and copy and paste this command:

wget -nd -P ~/PiDisplay https://raw.githubusercontent.com/bearcanrun/pi-display/master/install &&  sudo chmod +x ~/PiDisplay/install  && cd ~/PiDisplay && sudo ./install

Note: In Raspbian's terminal, you have to use paste from menu Edit > Paste or right click and then choose "paste."

Using PiDisplay

PiDisplay is set to automatically load when the Pi reboots.

If you quite PiDisplay and wish to restart it without rebooting, open up the terminal and run:

sudo systemctl start PiDisplay

Uninstall

Open up the terminal and run:

sudo /home/pi/PiDisplay/uninstallPiDisplay.sh

Development

Tracking down dependencies for the various Python environments can be challenging.

Getting started

git clone https://github.com/bearcanrun/pi-display.git
cd pi-display

Raspberry Pi w c-STEMBian

Install dependencies as follows: Upgrade to latest PIP:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

Install GTK3+ and AppIndicator

sudo apt-get install python3-gi python-appindicator
pip install gobject PyGObject notify2

Notes:

  • Icons located in /usr/share/icons/

MacOS X (>=10.12)

Install dependencies as follows: Upgrade to latest PIP:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

Install GTK3+ and AppIndicator

brew install gtk+3 pygobject3
pip3 install notify2

Production

Standalone Binary

Note tha pyinstaller only creates binaries for the specific architecture running it. So to create a Raspbian binary, it must be done on the Raspberry Pi.

Install pyinstaller and upx

pip3 install --user pyinstaller
sudo apt-get install upx-ucl

Build

python3.5 -m PyInstaller ./python/pi-display/PiDisplay.py --onefile --upx-dir /usr/bin 

PyPi package

Creat Source Dist:

python3 setup.py sdist

To build run:

python3 setup.py sdist --formats=gztar

If you haven't already, register an account on PiPy

For uploading dist bundle, install twine (secure replacement for setup.py upload):

pip install --user --upgrade twine

Test package upload:

python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Upload dist:

python3 -m twine upload dist/*

About

The development of this utility was inspired by the Calistoga STEM Camp Summer 2019.

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.