diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c921e866..d67a0b3c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,20 +1,20 @@
name: Build
-
on:
- push:
- branches:
- - master
pull_request:
- branches:
- - master
- workflow_dispatch:
jobs:
- build:
- uses: linuxmint/github-actions/.github/workflows/do-builds.yml@master
- with:
- commit_id: master
- ############################## Comma separated list - like 'linuxmint/xapp, linuxmint/cinnamon-desktop'
- dependencies:
- ##############################
+ flatpak:
+ name: "Flatpak"
+ runs-on: ubuntu-latest
+ container:
+ image: bilelmoussaoui/flatpak-github-actions:kde-6.7
+ options: --privileged
+ steps:
+ - uses: actions/checkout@v4
+ - uses: flatpak/flatpak-github-actions/flatpak-builder@master
+ name: "Build"
+ with:
+ upload-artifact: false
+ bundle: io.github.junalmeida.webapps_manager.flatpak
+ manifest-path: io.github.junalmeida.webapps_manager.json
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 00000000..627f2367
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,39 @@
+name: Deploy
+on:
+ release:
+ types: [created]
+
+jobs:
+ flatpak:
+ name: "Flatpak"
+ runs-on: ubuntu-latest
+ container:
+ image: bilelmoussaoui/flatpak-github-actions:kde-6.7
+ options: --privileged
+ steps:
+ - uses: actions/checkout@v4
+ - name: "Set Version"
+ shell: bash
+ run: |
+ VERSION=${GITHUB_REF##*/}
+ echo "APP_VERSION=$VERSION" >> $GITHUB_ENV
+ echo "APP_VERSION=$VERSION" > src/version.py
+ - uses: flatpak/flatpak-github-actions/flatpak-builder@master
+ name: "Build"
+ with:
+ upload-artifact: false
+ bundle: io.github.junalmeida.webapps_manager.flatpak
+ manifest-path: io.github.junalmeida.webapps_manager.json
+ cache-key: flatpak-builder-${{ github.sha }}
+ - name: Upload to Release
+ uses: softprops/action-gh-release@v2
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ files: |
+ **/io.github.junalmeida.webapps_manager.flatpak
+ # - uses: flatpak/flatpak-github-actions/flat-manager@v6
+ # name: "Deploy"
+ # with:
+ # repository: flathub
+ # flat-manager-url: https://flatpak-api.elementary.io
+ # token: some_very_hidden_token
diff --git a/.gitignore b/.gitignore
index 739c2f4b..ce99e2d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,168 @@
-# Python Byte-compiled / optimized files
+# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# .python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# UV
+# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
+# This is especially recommended for binary packages to ensure reproducibility, and is more
+# commonly ignored for libraries.
+#uv.lock
+
+# poetry
+# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
+# This is especially recommended for binary packages to ensure reproducibility, and is more
+# commonly ignored for libraries.
+# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
+#poetry.lock
+
+# pdm
+# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
+#pdm.lock
+# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
+# in version control.
+# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
+.pdm.toml
+.pdm-python
+.pdm-build/
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
+# PyCharm
+# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
+# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
+# and can be added to the global gitignore or merged into this file. For a more nuclear
+# option (not recommended) you can uncomment the following to ignore the entire idea folder.
+#.idea/
+.flatpak-builder/
+.flatpak/
\ No newline at end of file
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000..6f793fe5
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,6 @@
+{
+ "recommendations": [
+ "ms-python.vscode-python-envs",
+ "ms-python.python"
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 00000000..63a88129
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,32 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "start app",
+ "type": "debugpy",
+ "request": "launch",
+ "console": "integratedTerminal",
+ "module": "webapps_manager"
+ },
+ {
+ "name": "attach to flatpak",
+ "type": "debugpy",
+ "request": "attach",
+ "justMyCode": false,
+ "connect": {
+ "host": "localhost",
+ "port": 5678
+ },
+ "preLaunchTask": "debug-flatpak",
+ "pathMappings": [
+ {
+ "localRoot": "${workspaceFolder}/src",
+ "remoteRoot": "/app/lib/python3.11/site-packages/webapps_manager"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..b018d791
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,12 @@
+{
+ "python-envs.defaultEnvManager": "ms-python.python:venv",
+ "python-envs.pythonProjects": [],
+ "python.analysis.typeCheckingMode": "standard",
+ "files.watcherExclude": {
+ "**/.git/objects/**": true,
+ "**/.git/subtree-cache/**": true,
+ "**/.hg/store/**": true,
+ ".flatpak/**": true,
+ "_build/**": true
+ }
+}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 00000000..3fb85086
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,62 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "type": "process",
+ "command": "flatpak-builder",
+ "label": "build-flatpak",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "args": [
+ "--ccache",
+ "--force-clean",
+ "--install-deps-from",
+ "flathub",
+ "--state-dir=.flatpak/flatpak-builder",
+ ".flatpak/repo",
+ "./io.github.junalmeida.webapps_manager.json"
+ ],
+ "problemMatcher": []
+ },
+ {
+ "type": "process",
+ "command": "flatpak-builder",
+ "label": "debug-flatpak",
+ "isBackground": true,
+ "dependsOn": "build-flatpak",
+ "problemMatcher": [
+ {
+ "base": "$python",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "Starting...",
+ "endsPattern": "Waiting for debugger attach"
+ }
+ }
+ ],
+ "args": [
+ "--env=XDG_SESSION_TYPE=${env:XDG_SESSION_TYPE}",
+ "--run",
+ "${workspaceFolder}/.flatpak/repo",
+ "io.github.junalmeida.webapps_manager.json",
+ "python",
+ "-c",
+ "from webapps_manager import debug; debug()",
+ ]
+ },
+ {
+ "type": "process",
+ "command": "flatpak-builder",
+ "label": "shell-flatpak",
+ "args": [
+ "--env=XDG_SESSION_TYPE=${env:XDG_SESSION_TYPE}",
+ "--run",
+ "${workspaceFolder}/.flatpak/repo",
+ "io.github.junalmeida.webapps_manager.json",
+ "bash",
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 00000000..793cf8e4
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+include src/*.ui
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 01aced93..00000000
--- a/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: buildmo
-
-buildmo:
- @echo "Building the mo files"
- # WARNING: the second sed below will only works correctly with the languages that don't contain "-"
- for file in `ls po/*.po`; do \
- lang=`echo $$file | sed 's@po/@@' | sed 's/\.po//' | sed 's/webapp-manager-//'`; \
- install -d usr/share/locale/$$lang/LC_MESSAGES/; \
- msgfmt -o usr/share/locale/$$lang/LC_MESSAGES/webapp-manager.mo $$file; \
- done \
-
-clean:
- rm -rf usr/share/locale
diff --git a/README.md b/README.md
index d7d6e5b9..780b28de 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
-# Webapp Manager
-
+# Webapp Manager for KDE Plasma 6
-Run websites as if they were apps.
+Run websites as if they were apps using the native browser.
+
+
FAQ
===
diff --git a/etc/xdg/menus/applications-merged/webapps.menu b/app/etc/xdg/menus/applications-merged/io.github.junalmeida.webapps_manager.menu
similarity index 65%
rename from etc/xdg/menus/applications-merged/webapps.menu
rename to app/etc/xdg/menus/applications-merged/io.github.junalmeida.webapps_manager.menu
index 0fc90cf8..890a0f09 100644
--- a/etc/xdg/menus/applications-merged/webapps.menu
+++ b/app/etc/xdg/menus/applications-merged/io.github.junalmeida.webapps_manager.menu
@@ -3,8 +3,8 @@