Skip to content

Pause Spotify when the mute key is pressed on Debian-based operating systems.

License

Notifications You must be signed in to change notification settings

softwarespot/pausefy

Repository files navigation

Pausefy

Go Tests

Pause Spotify when the mute key is pressed on Debian-based operating systems.

Application demo

Prerequisites

Installation

Build the binary pausefy executable to the directory ./bin i.e. ./bin/pausefy.

make

Usage

Start and stop

Starts the application ./bin/pausefy as a background process and stores the process ID (PID) to the file ./scripts/pid. The process output i.e. STDOUT is written to the file ./scripts/nohup.out.

make start

Stops the application ./bin/pausefy, using the process ID (PID) stored in the file ./scripts/pid as well as removing the files ./scripts/pid and ./scripts/nohup.out.

make stop

Version

Display the version of the application and exit.

# As text
./bin/pausefy --version

# As JSON
./bin/pausefy --json --version

Help

Display the help text and exit.

./bin/pausefy --help

Dependencies

IMPORTANT: One dependency is used, which is an adapter for dbus.

I could easily use Cobra (and usually I do, because it allows me to write powerful CLIs), but I felt it was too much for such a tiny project. I only ever use dependencies when it's say an adapter for an external service e.g. Redis, MySQL or Prometheus.

Linting

Docker

docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run -v --tests=false --disable-all -E durationcheck,errorlint,exhaustive,gocritic,gosimple,ineffassign,misspell,predeclared,revive,staticcheck,unparam,unused,whitespace --max-issues-per-linter=10000 --max-same-issues=10000

Local

golangci-lint run --tests=false --disable-all -E durationcheck,errorlint,exhaustive,gocritic,gosimple,ineffassign,misspell,predeclared,revive,staticcheck,unparam,unused,whitespace --max-issues-per-linter=10000 --max-same-issues=10000

License

The code has been licensed under the MIT license.

About

Pause Spotify when the mute key is pressed on Debian-based operating systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published