diff --git a/src/core/window.py b/src/core/window.py
index 2d2b0d7..1f268c3 100644
--- a/src/core/window.py
+++ b/src/core/window.py
@@ -15,16 +15,31 @@ from .container import Container
+class MissingConfigError(Exception):
+ pass
+
+
class Window(SignalsMixin, Gtk.ApplicationWindow):
"""docstring for Window."""
def __init__(self, args, unknownargs):
super(Window, self).__init__()
- self._SCRIPT_PTH = os.path.dirname(os.path.realpath(__file__))
- self._ICON_FILE = f"{self._SCRIPT_PTH}/../resources/icon.png"
- self._CSS_FILE = f"{self._SCRIPT_PTH}/../resources/stylesheet.css"
+ self._USER_HOME = os.path.expanduser('~')
+ self._USR_PATH = f"/usr/share/{app_name.lower()}"
+ self._CONFIG_PATH = f"{self._USER_HOME}/.config/{app_name.lower()}"
+ self._ICON_FILE = f"{self._CONFIG_PATH}/icon.png"
+ self._CSS_FILE = f"{self._CONFIG_PATH}/stylesheet.css"
+ if not os.path.exists(self._ICON_FILE):
+ self._ICON_FILE = f"{self._USR_PATH}/icon.png"
+ if not os.path.exists(self._ICON_FILE):
+ raise MissingConfigError("Unable to find the application icon.")
+
+ if not os.path.exists(self._ICON_FILE):
+ self._CSS_FILE = f"{self._USR_PATH}/stylesheet.css"
+ if not os.path.exists(self._ICON_FILE):
+ raise MissingConfigError("Unable to find the stylesheet.")
self.setup_win_settings()
self.setup_styling()
diff --git a/src/resources/Main_Window.glade b/src/resources/Main_Window.glade
deleted file mode 100644
index 7931fad..0000000
--- a/src/resources/Main_Window.glade
+++ /dev/null
@@ -1,436 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/resources/stylesheet.css b/src/resources/stylesheet.css
deleted file mode 100644
index d1acba0..0000000
--- a/src/resources/stylesheet.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* * {
- background: rgba(0, 0, 0, 0.64);
- color: rgba(255, 255, 255, 1);
-}
-
-#popoutkeyboard {
- background-color: rgba(0, 65, 125, 1);
-} */
diff --git a/src/resources/Unicode Emoji List.txt b/user_config/usr/share/mouse keyboard/emoji.txt
similarity index 100%
rename from src/resources/Unicode Emoji List.txt
rename to user_config/usr/share/mouse keyboard/emoji.txt
diff --git a/src/resources/icon.png b/user_config/usr/share/mouse keyboard/icon.png
similarity index 100%
rename from src/resources/icon.png
rename to user_config/usr/share/mouse keyboard/icon.png
diff --git a/user_config/usr/share/mouse_keyboard/stylesheet.css b/user_config/usr/share/mouse keyboard/stylesheet.css
similarity index 100%
rename from user_config/usr/share/mouse_keyboard/stylesheet.css
rename to user_config/usr/share/mouse keyboard/stylesheet.css
diff --git a/user_config/usr/share/mouse_keyboard/Main_Window.glade b/user_config/usr/share/mouse_keyboard/Main_Window.glade
deleted file mode 100644
index 7931fad..0000000
--- a/user_config/usr/share/mouse_keyboard/Main_Window.glade
+++ /dev/null
@@ -1,436 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- False
- Mouse Board
- center
- 260
- icon.png
- toolbar
- True
- True
- False
- center
-
-
- True
- False
- vertical
-
-
- True
- False
-
-
- True
- False
-
-
- True
- True
- 0
-
-
-
-
- 520
- True
- False
-
-
- True
- True
- gtk-go-forward
- False
- False
- Autotype Field...
-
-
- True
- True
- 0
-
-
-
-
- Type
- True
- True
- True
-
-
-
- False
- True
- 1
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- False
-
-
- True
- True
- 2
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
-
-
- True
- False
- vertical
-
-
- True
- False
- 10
- 10
- Special Characters
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- in
-
-
- True
- False
-
-
- True
- False
- vertical
- 10
- start
-
-
-
-
-
-
-
-
-
- True
- True
- 1
-
-
-
-
- False
- True
- 0
-
-
-
-
- popoutkeyboard
- True
- False
- 5
- vertical
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- True
- 1
-
-
-
-
- True
- False
- 10
- 10
- vertical
-
-
- True
- False
- start
-
-
- Del
- True
- True
- True
-
-
-
- True
- True
- 0
-
-
-
-
- Ctrl
- True
- True
- True
-
-
-
- True
- True
- 1
-
-
-
-
- Shift
- True
- True
- True
-
-
-
- True
- True
- 2
-
-
-
-
- Alt
- True
- True
- True
-
-
-
- True
- True
- 3
-
-
-
-
- PrtSc
- True
- True
- False
-
-
-
- True
- True
- 4
-
-
-
-
- gtk-add
- True
- True
- True
- True
-
-
- True
- True
- 5
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- in
-
-
- True
- False
-
-
- True
- True
- commands
-
-
-
-
-
- Commands
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
- True
- True
- 1
-
-
-
-
-
- True
- False
- True
-
-
- Up
- True
- True
- True
-
-
-
- 1
- 0
-
-
-
-
- Down
- True
- True
- True
-
-
-
- 1
- 2
-
-
-
-
- Left
- True
- True
- True
-
-
-
- 0
- 1
-
-
-
-
- Right
- True
- True
- True
-
-
-
- 2
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- True
- 2
-
-
-
-
- False
- True
- 2
-
-
-
-
- True
- True
- 1
-
-
-
-
-
-
diff --git a/user_config/usr/share/mouse_keyboard/mouse-keyboard.png b/user_config/usr/share/mouse_keyboard/mouse-keyboard.png
deleted file mode 100644
index bcf986e..0000000
Binary files a/user_config/usr/share/mouse_keyboard/mouse-keyboard.png and /dev/null differ