Sd-Replacement

The program which makes your life easier!

Setup

At first, the setup is simple.

So, Let's start!
At first, clone the repo:

git clone https://github.com/mawoka-myblock/sd-replacement

Go into the new sd-replacement and
Install the requirements:

pip install -r requirements.txt

Lastly, run the script:

python3 main.py

Now it asks you some things and gives you your IP-Adress
and your PIN. Keep it! You will need it later!

Configuration

The configuration should be easy to understand,
but i'll explain it anyway. Let's start by looking at the example:

Config:
  Key: 193749 # The key required for authentication 
  Port: 4000 # To adjust the port manually also if it doesn't work...
Mappings: # Here you can specify everything
  c:   # If the button "c" gets pressed, do the following:
    - alt # Press ALT
    - f4  # And F4
  b: # If the button "b" gets pressed, press...
    - ctrl # ...CTRL
    - c # ...c
  b2: # The second button in the interface, no keyboard-button
     - a
     - b
     - c    
Commands:  # Here can be put shell-commands
  l:   # If the button "l" is pressed, execute...
    - brave https://ddg.gg # ... brave https://ddg.gg

Note: you cannot specify more than one command BUT you can do this:

brave https://ddg.gg && brave https://mawoka.eu.org

So the config looks like this for example:

...
Commands:
  l:
    - brave https://ddg.gg && brave https://mawoka.eu.org
                

Sd-Client

You can access the client

You access the settings with holding for 2 sec anywhere!
The client is served over http, which is the only solution, to use it.

Important Note

The buttons are numbered! You could see that if you didn't change any names of these buttons!
The names for the buttons to use them in your config-file are b and the number,
for example b3 for Button 3