diff --git a/src/main/python/main_window.py b/src/main/python/main_window.py index 484a15f..c86ccbe 100644 --- a/src/main/python/main_window.py +++ b/src/main/python/main_window.py @@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QWidget, QComboBox, QToolButton, QHBoxLayout, QVBoxL import json import os +import sys from urllib.request import urlopen from editor_container import EditorContainer @@ -69,10 +70,14 @@ class MainWindow(QMainWindow): self.tabs.currentChanged.connect(self.on_tab_changed) self.refresh_tabs() - self.lbl_no_devices = QLabel(tr("MainWindow", 'No devices detected. Connect a Vial-compatible device and press ' - '"Refresh"\n' - 'or select "File" → "Download VIA definitions" in order to enable' - ' support for VIA keyboards.')) + no_devices = 'No devices detected. Connect a Vial-compatible device and press "Refresh"
' \ + 'or select "File" → "Download VIA definitions" in order to enable support for VIA keyboards.' + if sys.platform.startswith("linux"): + no_devices += '

On Linux you need to set up a custom udev rule for keyboards to be detected. ' \ + 'Follow the instructions linked below:
' \ + 'https://get.vial.today/getting-started/linux-udev.html' + self.lbl_no_devices = QLabel(tr("MainWindow", no_devices)) + self.lbl_no_devices.setTextFormat(Qt.RichText) self.lbl_no_devices.setAlignment(Qt.AlignCenter) layout = QVBoxLayout()