GithubHelp home page GithubHelp logo

madhavjivrajani / halp Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 1.0 592 KB

Display a message in morse code on your capslock LED, keyboard backlight or using your screen brightness!

License: Apache License 2.0

Go 100.00%
cli golang morse-code systems linux

halp's Introduction

halp

halp is a command line utility that lets you display messages in morse code on your capslock LED, keyboard backlight (if you have it) or using your screen's brightness!

Note:

halp will only work if you're running Linux. The original purpose of developing this was to learn more about the concept of 'everyhting in linux is a file' and learn more about how permissions in linux work. The idea originated after watching this video.

Installation

Use the executable:

curl -sSL https://github.com/MadhavJivrajani/halp/releases/download/<tag>/halp --output halp
chmod +x halp
mv halp /usr/bin # to make the executable available system wide

Installation can also done using the go get command which will take care of installation of any libraries and dependencies nescessary. This will also install the halp executable which can be used anywhere in the termnial provided $GOPATH/bin is in your PATH.

go get -u github.com/MadhavJivrajani/halp

Or you can clone this repository and work directly with the halp executable!

git clone https://github.com/MadhavJivrajani/halp.git
cd halp
go build -o halp main.go
mv halp /usr/bin # to make the executable available system wide

Usage:

A verryyy normal and usual application built to help you send SoS messages.

The tool will by default switch off the LED before displaying the morse code
message and will restore it back to this initial state when the message finishes displaying

Syntax:
halp -m <message>

Usage:
  halp [flags]
  halp [command]

Available Commands:
  help        Help about any command
  reset       Reset the resource state to 'value'

Flags:
      --config string    config file (default is $HOME/.halp.yaml)
  -h, --help             help for halp
  -k, --keyboard         use keyboard backlight
  -m, --message string   message to diplay in morse code
  -p, --path string      /path/to/capslockLED (default "/sys/class/leds/input3::capslock")
  -s, --screen           use screen backlight

Use "halp [command] --help" for more information about a command.

Commands:

reset

It will default to a capslock LED path, you can try using the -s and the -k flags,
to reset to value for screen and keyborad resources respectively

Syntax:
halp reset [--keyboard][--screen][--path][--value]

Usage:
  halp reset [flags]

Flags:
  -h, --help          help for reset
  -k, --keyboard      reset keyboard backlight
  -p, --path string   /path/to/resource (default "/sys/class/leds/input3::capslock")
  -s, --screen        reset screen backlight
  -v, --value int     reset the resource to this value

Disclaimer

I am not responsible for anything going wrong with the system halp is run on, this is an educational project.

halp's People

Contributors

madhavjivrajani avatar samyak2 avatar souravtecken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

souravtecken

halp's Issues

Path to the LED file is different on my system :(

The path in my system is /sys/class/leds/input4::capslock/brightness (4 instead of 3).

Now I can't send an emergency message, pls halp :(


(maybe consider looking for input[0-9]::capslock inside that directory?)

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.