Coder Social home page Coder Social logo

m1ndo / neptune Goto Github PK

View Code? Open in Web Editor NEW
29.0 2.0 0.0 24.34 MB

Neptune is a mechanical keysound app like Mechvibes except its faster and written in Go

License: GNU Affero General Public License v3.0

Go 90.60% Makefile 9.40%
keyboard-emulation keysound mechanical-keyboard mechvibes

neptune's Introduction

Neptune

Neptune is versatile application that produces a sound when keys are pressed. It offers the advantage of providing a realistic typing experience without disturbing those around you. With its superior speed, minimal almost no CPU usage, and low memory footprint (6-17MB), Neptune is an efficient solution for whether you want to simulate a mechanical keyboard, turn it into a piano, or experiment with other sounds. Developed using Go, Neptune ensures optimal performance and responsiveness.

Supported

  • [X] Linux (Works in both X11/Wayland)
  • [X] Windows (Works)
  • [-] MacOs (Works)
  • [-] BSD (Untested)

Screenshot // Demo (Sound on)

demo.mp4

Installation.

By default i provide pre-built binaries for both Linux and Windows, I’d include MacOS as well if i had a MacOs machine to build the app, although it is possible to cross-compile from Linux to MacOs its very troublesome and requires building a toolchain and whatnot.

Runtime dependencies (Linux Only).

There’s few runtime dependencies required in order to run/build Neptune (cli or gui). If you’re running Ubuntu/Debian based, there’s a high change you won’t need to install any of the following dependencies.

apt install libx11-6 libxtst6 libx11-xcb1 libxcb-xkb1 libxkbcommon0 libxkbcommon-x11-0 libasound2 libayatana-appindicator3-1 libxxf86vm1 libgl1

ARCH use the AUR to install the dependencies and the package.

Binaries (CLI / GUI).

Both Windows And Linux built binaries are for x86_64 (amd64) architecture only more to come soon. Headover to the Releases and download the appropriate build for your machine.

Linux

Arch Linux (AUR)

yay -S realneptune # (BINARY)
yay -S realneptune-cli # (BINARY)
# OR BUILD (GIT VERSION)
yay -S realneptune-git
yay -S realneptune-cli-git

Ubuntu/Debian

sudo dpkg -i Neptune-1.0.2-1.deb
# CLI
sudo dpkg -i Neptune-Cli-1.0.2-1.deb

Other distros.

GUI

To install Neptune your Linux distribution (make sure you have download the latest release)

mkdir Neptune && tar -xf Neptune.tar.xz -C Neptune/ && cd Neptune; sudo make install
CLI
sudo wget https://github.com/M1ndo/Neptune/releases/download/v1.0.2/Neptune-Cli -O /usr/bin/Neptune && chmod +x /usr/bin/Neptune

Windows

Important Notice Windows Defender will mistakenly flag the executable as malicious. But its not malicious because i don’t own a signing certificate (This issue should disappear later) If you get a defender smart screen just click on Show and Run this file .

MacOs

Unavailable at the moment (Soon)

Building.

To build Neptune you’ll have to satisfy few requirements.

  • Golang version >1.19
  • GCC or Clang compiler
  • Mingw64 (Windows)
  • make
  • Fyne (Optional)

Use TAGS=”nosystray” if you don’t wanna build with a systray (Mandatory for MacOs “systray broken”). Use PKG=fyne to package/build with fyne.

To change architecture and compiler, use eg.

GOARCH=arm CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ make linux # windows , darwin

Linux

Make sure you have all runtime dependencies installed.

make linux
# OR
make linux-cli

Windows

make windows

MacOs

TAGS="nosystray" make darwin
# OR CLI
TAGS="nosystray" make darwin-cli

Command Line

NOTE: GUI Neptune is also built with CLI Mode To run Neptune in CLI mode

Neptune -cli -download # (Downloads Missing sounds "First time run")
Neptune -cli -soundkey "Alpacas" # Use Alpacas Soundkey
Neptune -lst # List Available installed sound keys.

CLI Options

Usage of Neptune:
  -cli
        Run in CLI instead of GUI
  -download
        Download all other soundkeys
  -lst
        List all available sounds
  -sounddir string
        Sounds directory
  -soundkey string
        Soundkey to use default (nk-cream)
  -verbose
        Verbose output (Debugging)
  -volume float
        Set volume (0 to 1) (default 1)

Keysounds.

By default nk-cream keysounds are embedded in the app so it doesn’t require any assets. By default when your first run the app on GUI mode, it will download the missing sounds and the app will restart itself.

Custom Sounds keys

View this Tutorial Showing how to create your own soundkey.

Setting/Creating a custom keys is very simple and doesn’t require to write any configurations. Be in the following folder

  • For Linux: ~/.local/share/Neptune
  • For Windows: %AppData%\Neptune (C:\Users\Ybenel\Local\Appdata\Roaming\Neptune)
  • For MacOs: Library\Application Support\Neptune

create a folder with any name you want then create a file called config.json (don’t worry there’s no configuration) Then let’s say you want to create a custom key for “key a” all you have to do is to move your custom sound file. It should be .wav or .ogg and call it a.wav and that’s it .

  • So it would be like alt -> alt.wav or alt.ogg

If you’re not sure about the key name read this file variable LEcode2Char

Fallback sounds.

Let say you want to create a custom sound but you don’t wanna customize each key. This is where fallback sound keys come in. all you have to do is have a sound file that will be played for every other key that doesn’t have its sound file. The fallback file can be anywhere from (it only needs to have a keyword fallback) And there could be multiple fallback files (all fallback files will be used randomly on each click)

fallback.wav
fallback2.wav
fallback3.ogg
fallbackgg.wav

Key Events (up and down)

Neptune supports keyevents. so that when you click on a key it will play a sound and when u release that key it will play another sound.

To define a multi event keysound. just append the keyword -up to the soundfile.

Let’s say you have a soundfile for key “shift”, like shift.wav this will be played when the key is pressed. For when its released that soundfile should be shift-up.wav.

  • Key like alt.wav its release event sound file will be alt-up.wav

This also works for fallback keys, so there could fallback.wav fallback-up fallback2.ogg fallback2-up.ogg and so on. However there one thing you add to let Neptune know that this soundkey supports multi events.

Edit config.json in soundkey directory you created and add this (name is optional).

{
  "name": "blabla",
  "support-events": true
}

Donate.

If you wanna consider supporting this project by donating, please spare some cash Here

Author

Written by ybenel

License

AGPLv3

neptune's People

Contributors

m1ndo 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

Watchers

 avatar  avatar

neptune's Issues

Add support to run on startup

Please add support to run on startup. I haven't tested but I believe I could manually do this by running the portable executable hidden on startup, although this is rather cumbersome.

Edit: it seems that there is no bundled Neptune CLI for Windows, so even the solution I proposed above is not possible.

Edit: just read the docs again, turns out Neptune GUI is bundled with Neptune CLI. Created a scheduled task using run-hidden.exe manually. Works fine. Though I'd still like to see this built in.

Audio plays after i lift instead of when i press.

The audio seems to be playing on lifting the finger instead of pressing it which makes it sound weirdly behind when typing.

I type decently fast so it sounds like it's lagging behind a lot.

The lag is due to the sound being played after as far as i can tell.

One other thing i would recommend is to keep the same parsing methods for audios and configs as mechvibes as that would make it directly compatible you'd just need the .wav file and the json config file they provide.

They currently have an EG Oreo sound which i prefer but i can't be willing to spend time to just make this work on this by creating custom sounds in altogether new patterns.

[AUR] Missing runtime dependency

Hi, there is a missing shared lib in the AUR package (realneptune):

> Neptune 
Neptune: error while loading shared libraries: libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory

Program persists after closing

OS: Windows 11 23H2

Program persisting after closing should have a notification to indicate to end user of this behavior & have a method of reopening (i.e. system tray)

This has the side-effect of persisting sounds after closing the program which could be undesirable & at minimum using resources (though not much) after closing

Reproduction steps:

  • Close program by clicking [X] at top left
  • Program running in background can be killed from taskmgr

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.