Compare commits

..

3 Commits

Author SHA1 Message Date
a282a95c4e xdotool utilized. 2021-05-06 19:45:48 +02:00
07555845a1 README adapted. 2021-05-06 19:45:30 +02:00
f721f92b59 Cosmetics 2021-05-06 19:07:33 +02:00
4 changed files with 41 additions and 23 deletions

View File

@ -34,6 +34,7 @@ hideWindowWhenIdle=true
logFolderPath=/var/log/rhasspyVisualConversationTool
logLevel=5
logFileEnabled=false
mqttClientServerHostname=mqtt.yourServer.com
mqttClientServerPort=1883
@ -60,6 +61,8 @@ Put this content into the file (adapt the folder if you changed it above):
```
#!/bin/bash
export DISPLAY=:0.0
while(true)
do
cd /home/pi/RhasspyVisualConversationTool/
@ -72,6 +75,15 @@ done
Make it runnable: _chmod 775 /home/pi/Desktop/startConversationTool.sh_
### Install xdotool to wake up the screen automatically
When you address Rhasspy the screen will be turned on. For that feature the external application xdotool is utilized.
You may still need to install it by executing
```
sudo apt install -y xdotool
```
### Make the script autostart with the graphical user interface
Create this file: _/home/pi/.config/autostart/conversationTool.desktop_

View File

@ -75,3 +75,4 @@ RhasspyVisualConversationTool*1883
keystore.jks
res
RhasspyVisualConversationTool-settings.ini
/RhasspyVisualConversationToolLogFile.txt

View File

@ -127,14 +127,14 @@ public class GUI
if(!initialConnectionEstablished)
initialConnectionEstablished = true;
connectionStatusTextField.setText("Connected to: " + Settings.mqttClientServerHostname);
connectionStatusTextField.setText("Connected: " + "to " + Settings.mqttClientServerHostname);
if(Settings.hideWindowWhenIdle)
minimizeDelayed();
}
else
{
connectionStatusTextField.setText("Not connected");
connectionStatusTextField.setText("Connected: " + String.valueOf(MQTT.getInstance().getClient().isConnected()));
getFocus();
}
}
@ -337,7 +337,13 @@ public class GUI
@Override
public void run()
{
try
Miscellaneous.runExternalApplication("/usr/bin/xdotool key ctrl", 0, null, null);
}});
t.start();
}
void moveMouseCursor()
{
/*
* Move the mouse cursor
@ -348,6 +354,8 @@ public class GUI
* still black screen.
*/
try
{
Robot robot = new Robot();
for(int xCoord = 500; xCoord < 550; xCoord++)
for(int yCoord = 500; yCoord < 550; yCoord++)
@ -357,9 +365,6 @@ public class GUI
{
}
}});
t.start();
}
void getFocus()