Coder Social home page Coder Social logo

blinkstick-scripts's Introduction

blinkstick-scripts

A Nix flake for developing and using blinkstick scripts. This package provides an environment agnostic solution for executing BlinkStick control scripts without depending on system python packages.

Usage

Add directly to system or home packages

  1. Import the flake in the inputs of your flake file:

    inputs.blinkstick-scripts.url = "github:perstarkse/blinkstick-scripts";
  2. Add it to outputs:

    outputs = { self, nixpkgs, blinkstick-scripts, ... }: { ... };
  3. Include it in your system or user packages:

    home.packages = [ 
      ...
      blinkstick-scripts.packages."x86_64-linux".blinkstick-scripts
    ];

Add as an overlay

  1. Import the flake in the inputs of your flake file:

    inputs.blinkstick-scripts.url = "github:<username>/blinkstick-scripts";
  2. Include it in your overlay file:

    modifications = final: prev: {
      ...
      blinkstick-scripts = inputs.blinkstick-scripts.packages."x86_64-linux".blinkstick-scripts;
    };
  3. Add it to packages:

    home.packages = [ 
      ...
      blinkstick-scripts
    ];

Command Usage

Once installed, the blinkstick-scripts command can be used from the terminal with one of the following arguments: 'red', 'white', 'pink', or 'off'. This sets the color of the connected BlinkStick device.

Example:

blinkstick-scripts white

Development

This section provides instructions for building and modifying the blinkstick-scripts package, as well as how to enter the development environment.

Building

To build the package, use the following command:

nix build .#blinkstick-scripts

The resulting binary will be placed in a result/ directory at the root of the project.

Modifying the Python Script

The python script is written using pkgs.writeScriptBin. So edit the flake.nix and start replacing the code from line 46.

Entering the Development Environment

To enter the development environment, use the following command:

nix develop

This command opens a new shell where all the dependencies for the project are available. You can use this shell to test and debug your changes to the blinkstick-scripts package.

blinkstick-scripts's People

Contributors

perstarkse avatar

Stargazers

Anthony Rabbito 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.