diff --git a/README.md b/README.md
index d4846ab..d5da147 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
## Overview:
+
This project is designed to control a home theater PC (HTPC) with a pepper jobs remote control.
The buttons on the remote control are hard coded to common windows shortcuts, depending on the desktop environment some of these will work as generic shortcuts in linux out of the box, but this project aims to expand their functionality and provide custom commands based on the application that has focus.
@@ -12,7 +12,7 @@ Another goal of this project is to simplify modifications by allowing easy custo
Beelink Ser5 Mini PC
-
+
Pepper Jobs Remote
@@ -27,24 +27,28 @@ The computer could be anything, the hardware requirements are what you want to d
The cec adapter is optional, but allows the computer to turn the tv on and off via software which is mapped to the power button on the remote. It is also not necessary if running on a raspberry pi since cec is built into the hardware.
### OS:
+
I am running EndeavourOS on the computer, but this could be any linux distro with the following software installed.
### Software:
+
#### required:
+
Xorg
xfce4
xdotool
wmctrl
#### optional:
+
libcec # for cec controls
kodi
freetube
spotify
\# other apps etc...
-
### How it works:
+
1. The button combos that are hardcoded on the remote are mapped as keyboard shortcuts in xfce to run the buttons.sh script with the button name as $1 when pressed
2. buttons.sh runs get_active_window.sh to find what program is active
3. It then looks for this program in the scripts in the app folder and initializes it if it finds it
@@ -52,6 +56,7 @@ spotify
5. If it does not find the button it will look for the button in apps/default_commands.sh and run it if it finds it
### Notes:
+
find_or_open.sh will check running programs, if what it is looking for is running already it will give it focus, if it is not it will launch the program.
When possible I am using commands that will preform the desired actions in the specified software. If that is not possible instead I simulate key presses using xdotool to use keyboard shortcuts provided by the application.
@@ -67,6 +72,7 @@ close is alt+f4,>br?
tab is tab. Additionally, in xfce config, cycle_windows_key is remapped to just tab instead of standard alt + tab, so this button can be used to cycle through open programs.
### Button Names:
+
\# if no comment the name matches the word(s) on the remote
sleep, # power
main,
@@ -91,4 +97,5 @@ split_left, # bottom row right middle
split_right, # bottom row right
#### Future Plans:
+
In the future I plan to migrate this project to Nixos
diff --git a/apps/default_commands.sh b/apps/default_commands.sh
index c7878d8..48f28bd 100644
--- a/apps/default_commands.sh
+++ b/apps/default_commands.sh
@@ -15,9 +15,17 @@ all(){
sleep .2
xdotool key Left
;;
- "forward" | "back" | "split_up" | "split_down")
+ "split_up" | "split_down")
debug "no op"
;;
+ "back")
+ echo "toggling livingroom lights"
+ curl -X POST -d '' $LIVINGROOM_LIGHTS_ENDPOINT
+ ;;
+ "forward")
+ echo "toggling kitchen lights"
+ curl -X POST -d '' $KITCHEN_LIGHTS_ENDPOINT
+ ;;
"split_right")
bluetoothctl disconnect 4C:B9:9B:11:4B:31
;;
diff --git a/images/beelink.jpg b/images/beelink.jpg
new file mode 100644
index 0000000..879757f
Binary files /dev/null and b/images/beelink.jpg differ