Selaa lähdekoodia

change yml config naming

Noah Vogt 6 kuukautta sitten
vanhempi
sitoutus
afa4ee52de
2 muutettua tiedostoa jossa 12 lisäystä ja 5 poistoa
  1. 8 2
      README.md
  2. 4 3
      VulcanBoard.py

+ 8 - 2
README.md

@@ -1,12 +1,17 @@
 # VulcanBoard
 
-a simple and stable hotkey program for desktop touchscreens.
+A hotkey board for desktop touchscreens.
 
 There are many hotkey solutions and programs like that use either
 - physical devices (Elgato StreamDeck) or
 - touchscreens (LioranBoard, MacroDeck, StreamPi)
 
-They are often very bloated but lack basic features like asynchronous command execution. They also crash way to often, so especially given their intended use for livestream production that greatly values stability, *VulcanBoard* aims to be a rock-solid alternative.
+They are often very bloated but lack basic features like
+- multitouch support on the desktop
+- asynchronous command execution
+- fullscreen mode
+
+They also crash way too often, so especially given their intended use for livestreaming production that greatly values stability, *VulcanBoard* aims to be a rock-solid alternative.
 
 ## Installation
 
@@ -26,3 +31,4 @@ It is currently still under heavy development, here are some planned changes:
 - add rounded corners
 - add fullscreen mode (maybe using a cmdline switch)
 - use constants / constant dict for default values
+- add folders

+ 4 - 3
VulcanBoard.py

@@ -101,13 +101,13 @@ class ConfigLoader:
                 error_msg("invalid button config. needs to be a list of dicts.")
 
             if (
-                not isinstance(dimensions := button.get("button", ""), list)
+                not isinstance(dimensions := button.get("position", ""), list)
                 or (not isinstance(dimensions[0], int))
                 or (not isinstance(dimensions[1], int))
                 or (0 > dimensions[0] or dimensions[0] > self.rows - 1)
                 or (0 > dimensions[1] or dimensions[1] > self.columns - 1)
             ):
-                error_msg(f"invalid button 'button' subentry: '{dimensions}'")
+                error_msg(f"invalid button 'position' subentry: '{dimensions}'")
 
             for entry in ("txt", "cmd"):
                 if not isinstance(result := button.get(entry, ""), str):
@@ -140,7 +140,8 @@ class VulcanBoardApp(App):
         config = ConfigLoader(get_config_path())
 
         button_map = {
-            (btn["button"][0], btn["button"][1]): btn for btn in config.buttons
+            (btn["position"][0], btn["position"][1]): btn
+            for btn in config.buttons
         }
 
         layout = GridLayout(