blink

package module
v0.0.0-...-d04452c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2017 License: Unlicense Imports: 6 Imported by: 1

README

This package lets you make your keyboard lights blink. You can use blinking keyboard lights for all kinds of fun things, such as notifications of when someone visits your website!

Install

If you just run "go install" on this, you'll end up with a binary that's only usable by running sudo, and that's no fun!

Instead, since this binary is quite harmless, we want anyone to be able to run it as root! So, to do that we can do this:

# Assuming you're in this directory, will put an executable named "blink"
# in current directory
go build -o blink ./cmd/blink
# Set the owning user to be root
sudo chown root blink
# Set the sticky bit on the executable owned by root, so no matter who
# launches it it's launched with root priveleges.
sudo chmod u+s blink

And now that you've got your magical "always runs as root" executable, you can place it wherever you want (such as in your $PATH).

Documentation

Overview

+build linux

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(onLen time.Duration) error

Do will turn on the keyboard lights for the given amount of time. Yes ALL the keyboard lights.

func DoOnDelim

func DoOnDelim(duration time.Duration, r io.Reader, delimiter string) error

DoOnDelim will call blink for duration every time a delimiter is read on the reader and will not blink for at least that duration.

Types

This section is empty.

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL