GithubHelp home page GithubHelp logo

kunalbagaria / rustyvibes Goto Github PK

View Code? Open in Web Editor NEW
197.0 3.0 25.0 15.08 MB

A Rust CLI that makes mechanical keyboard sound effects on every key press

Home Page: https://github.com/kunalbagaria/rustyvibes

License: MIT License

Rust 100.00%
rust mechvibes cli tool mechanical keyboard key inputs macos linux windows

rustyvibes's Introduction

Rustyvibes

A Rust CLI that makes mechanical keyboard sound effects on every key press

Rustyvibes.mp4

Installation

cargo install rustyvibes

Linux

You Will Need To install Advanced Linux Sound Architecture [ ALSA ]

Ubuntu / debian

sudo apt-get install alsa-tools

Fedora

sudo dnf install alsa-lib-devel

Usage

rustyvibes <soundpack_path> -v <volume> (0-100 | optional)

Download Soundpacks: Here


Mechvibes vs. Rustyvibes

How does Rustyvibes compare to its competitors like Mechvibes? Mechvibes uses Electron and Chromium which is very resource intensive. Rustyvibes on the other hand is made with Rust and can be upto 10x-100x more resource efficient.

Mechvibes Soundpacks: Here

Certain custom soundpacks may not work with Rustyvibes, you can use this tool to fix those


Privacy and Permissions

Rustyvibes is a fully open-sourced project and never uses any network activity at all. macOS by default will ask you for input monitoring permissions when you start the app for the first time, if you were unable to enable it the first time, you'll need to add your default terminal you're using in the allowed input monitoring apps

image

Contribute to this project

buymeacoffee

rustyvibes's People

Contributors

b0ney avatar binarybana avatar kunalbagaria avatar on3ye avatar riyuzenn avatar sovenok-hacker avatar surajraika 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  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  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  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

rustyvibes's Issues

[Wayland] Works only with Electron (or web) apps

Hello! I tried Rustyvibes on Arch Linux with Wayland (SwayWM) and for first time when I ran in terminal (of course after compiling from source code) I thought sound doesn't work, but when I switched to Discord window I heard sounds.
I just didn't hear anything in terminal, I heard sounds only in Discord window.

The app crashing after pressing certain keys

The program works perfectly with all keys except one(in MacOS) that is the esc key. As soon as one presses the esc key,

thread '<unnamed>' panicked at /Users/purushottamsharma/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustyvibes-1.0.9/src/play_sound.rs:53:82: called Result::unwrap()on anErrvalue: Os { code: 2, kind: NotFound, message: "No such file or directory" } note: run withRUST_BACKTRACE=1environment variable to display a backtrace thread '<unnamed>' panicked at /Users/purushottamsharma/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustyvibes-1.0.9/src/play_sound.rs:49:60: calledResult::unwrap()on anErr value: PoisonError { .. }

such errors pop up and no further key press produces any sound.

Failed to install rustyvibes

Hi, i just tried installing rustyvibes using cargo install rustyibes on windows and got tons of errors
The issue seems like to be coming from link.exe returning the error code of 1181
pastebin

Not working with some soundpacks

I downloaded soundpack "Akko Lavenders" from the mechvibes custom soundpacks.
It had same structure of other soundpacks with works with rustyvibes (sound files and config.json) but it didn't work
I converted all mp3 files to wav, and changed config.json to match it. still didnt worked. It gives error:

Rustyvibes is running
fALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
thread '<unnamed>' panicked at /home/sahaj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustyvibes-1.0.9/src/play_sound.rs:53:82:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
gALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
thread '<unnamed>' panicked at /home/sahaj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustyvibes-1.0.9/src/play_sound.rs:49:60:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }

Installation failed on Ubuntu 21.10

I tried to install rustyvibes on my Ubuntu 21.10 system with cargo install rustyvibes but the installation failed with the warning and error messages:
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rustyvibes v1.0.8`, intermediate artifacts can be found at `/tmp/cargo-installgSvcr6`

Any fixes to this? (Entire installation error screenshot attached)

Screenshot from 2022-04-22 17-31-11

Regular crash with particular Keys

The program works perfectly with all keys except one(in MacOS) that is the esc key. As soon as one presses the esc key,

thread '<unnamed>' panicked at /Users/purushottamsharma/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustyvibes-1.0.9/src/play_sound.rs:53:82: called Result::unwrap()on anErrvalue: Os { code: 2, kind: NotFound, message: "No such file or directory" } note: run withRUST_BACKTRACE=1environment variable to display a backtrace thread '<unnamed>' panicked at /Users/purushottamsharma/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustyvibes-1.0.9/src/play_sound.rs:49:60: calledResult::unwrap()on anErr value: PoisonError { .. }

such errors pop up and no further key press produces any sound.

Cant get sound to work on macOS big Sur

I installed the CLI via brew, followed the usage instructions writing it like this
rustyvibes /Users/.../Downloads/Soundpacks/cherrymx-black-abs
which is where the sound files are located, the program started running but no sound is working, the first time I ran it it asked for permissions on accesability I clicked open accesibility preferences but nothing appeared, so i searched for the rustyvibes executable which was found in /usr/local/bin/rustyvibes and I dropped it on the accesibility panel, even then it still didnt work, any ideas on how to get it to work?
I downloaded MechVibes just to check it out and I enjoy it BUT its really resource intensive

Unable to install on Ubuntu 22.04, missing 'alsa"?

This is the error my terminal showed when doing cargo install rustyvibes:

❯ cargo install rustyvibes
    Updating crates.io index
  Installing rustyvibes v1.0.9
   Compiling libc v0.2.139
   Compiling proc-macro2 v1.0.49
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6
   Compiling syn v1.0.107
   Compiling autocfg v1.1.0
   Compiling pkg-config v0.3.26
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling bitflags v1.3.2
   Compiling scopeguard v1.1.0
   Compiling thiserror v1.0.38
   Compiling lock_api v0.4.9
   Compiling memoffset v0.6.5
   Compiling proc-macro-error-attr v1.0.4
   Compiling io-lifetimes v1.0.3
   Compiling alsa-sys v0.3.1
   Compiling parking_lot_core v0.8.6
error: failed to run custom build command for `alsa-sys v0.3.1`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installj00Po2/release/build/alsa-sys-4ca086f333ea3780/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ALSA_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=ALSA_STATIC
  cargo:rerun-if-env-changed=ALSA_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at '`"pkg-config" "--libs" "--cflags" "alsa"` did not exit successfully: exit status: 1
  error: could not find system library 'alsa' required by the 'alsa-sys' crate

  --- stderr
  Package alsa was not found in the pkg-config search path.
  Perhaps you should add the directory containing `alsa.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'alsa' found
  ', /home/fsevenm/.cargo/registry/src/github.com-1ecc6299db9ec823/alsa-sys-0.3.1/build.rs:13:18
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rustyvibes v1.0.9`, intermediate artifacts can be found at `/tmp/cargo-installj00Po2`

I have alsa installed.

❯ which alsa
/usr/sbin/alsa

Unmapped key: Unknown(248)

Whenever I run "rustyvibes ~/Downloads/Soundpacks/{switch}" in a terminal (I'm on linux),
After a while it displays "Unmapped key: Unknown(248)", I use cherrymx-brown-abs and nk-cream

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.