Skip to content

Commit

Permalink
v2.1 (#98)
Browse files Browse the repository at this point in the history
* Use QT framework for handling suspend image

* Remove fb2png dependency and simplify screenshot logic

* Resolve compiler warnings


* Notifications API

* Clean up output from isConnected check

* Fix notification API in rot

* Fix resume recalling screen

* Have oxide power menu respect inhibits

* Fix #104

* Fix #106 by removing application entries if they are invalid on load

* Fix #105

* Fix #116

* Add option to show date in launcher

* Add shorthand for device settings and add in code to remove/add wifi module on suspend/resume

* Fix #112

* Added ability to modify on* events

* Add calendar menu when clock is tapped on

* Fix #27

* Fix #91

* Fix #100

* Fix wifi showing as disconnected when it's actually off

* Fix #59

* Switch to using deletelater which doesn't work :/

* More attempts to fix crash when xochtil disables wifi

* Finally fix #59

* Fix #122

* Add method to reload applications from disk

* Force application environment/program to update properly

* Get initial chroot jails setup

* Fully add user/group/workingDirectory logic

* Fix #124

* Allow adding directories to chroot

* Clean up process exit code

* Fix #125

* Clean up application quitting more. Add aboutToQuit signal to API

* Flush out Screenshot API

* Fix #128

* Allow users to click on notifications in oxide

* Make fret's notifications a little smarter

* Add lockscreen application

* Fix bug where applications are not being stored properly

* Speed up erode list and fix issue with draft import

* Update Makefile

* Allow changing process manager application, and only allow one reload at once

* Add permissions

* Support sleeping.png

* Fix #109 and add lock option

* Fix #97

* Fix #138

* Fix #100

* Add history queue of applications so that the lockscreen with open the recent app
  • Loading branch information
Eeems authored Jan 9, 2021
1 parent 49c1716 commit 33ee9fa
Show file tree
Hide file tree
Showing 124 changed files with 4,826 additions and 10,908 deletions.
65 changes: 46 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,52 @@ name: Build oxide
on: [push, pull_request]

jobs:
build-test:
build:
name: Build and package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v8
with:
name: nix-remarkable
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Build
run: nix-build --argstr system 'x86_64-linux'
timeout-minutes: 15
- name:
run: mkdir -p oxide && cp -a result/. oxide
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: oxide
path: oxide
- uses: actions/checkout@v2.3.1
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v8
with:
name: nix-remarkable
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Build
run: nix-build --argstr system 'x86_64-linux'
timeout-minutes: 15
- run: mkdir -p oxide && cp -a result/. oxide
- name: Save the build
uses: actions/upload-artifact@v2
with:
name: oxide
path: oxide
- name: Checkout toltec Git repository
uses: actions/checkout@v2
with:
repository: toltec-dev/toltec.git
ref: testing
path: toltec
- name: Package
run: |
rm -rf "$GITHUB_WORKSPACE"/toltec/package/oxide/*
echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" > "$GITHUB_WORKSPACE"/toltec/package/oxide/version.txt
cd "$GITHUB_WORKSPACE"/toltec/package/oxide
tar -czvf ./oxide.tar.gz "$GITHUB_WORKSPACE"/result/*
cp "$GITHUB_WORKSPACE"/package .
sudo apt-get install bsdtar tree
cd "$GITHUB_WORKSPACE"/toltec
make oxide
mkdir "$GITHUB_WORKSPACE"/output
find . -name '*.ipk' | while read -r file; do
cp "$file" "$GITHUB_WORKSPACE/output/$(basename $file)"
done
timeout-minutes: 15
- name: Save the packages
uses: actions/upload-artifact@v2
with:
name: packages
path: output


11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ release: clean
INSTALL_ROOT=../../release $(MAKE) -C .build/settings-manager install
INSTALL_ROOT=../../release $(MAKE) -C .build/screenshot-tool install
INSTALL_ROOT=../../release $(MAKE) -C .build/launcher install
INSTALL_ROOT=../../release $(MAKE) -C .build/lockscreen install

build: tarnish erode rot oxide
build: tarnish erode rot oxide decay fret

erode:
mkdir -p .build/process-manager
Expand All @@ -79,8 +80,14 @@ fret: tarnish
cd .build/screenshot-tool && qmake fret.pro
$(MAKE) -C .build/screenshot-tool all

oxide: tarnish erode fret
oxide: tarnish
mkdir -p .build/launcher
cp -r applications/launcher/* .build/launcher
cd .build/launcher && qmake oxide.pro
$(MAKE) -C .build/launcher all

decay: tarnish
mkdir -p .build/lockscreen
cp -r applications/lockscreen/* .build/lockscreen
cd .build/lockscreen && qmake decay.pro
$(MAKE) -C .build/lockscreen all
80 changes: 28 additions & 52 deletions applications/launcher/appitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,10 @@
#include "mxcfb.h"
#include "controller.h"

bool AppItem::ok(){
if(_name.isEmpty()){
qDebug() << "Missing name";
return false;
}
if(_call.isEmpty()){
qDebug() << "Missing executable";
return false;
}
if(_displayName.isEmpty()){
qDebug() << "Missing display name";
return false;
}
if(!QFile(_call).exists()){
qDebug() << "Executable doesn't exist";
return false;
}
if(app != nullptr){
return true;
}
auto bus = QDBusConnection::systemBus();
General api(OXIDE_SERVICE, OXIDE_SERVICE_PATH, bus);
QDBusObjectPath path = api.requestAPI("apps");
if(path.path() == "/"){
qDebug() << "Unable to acces Apps API";
return false;
}
Apps apps(OXIDE_SERVICE, path.path(), bus);
QDBusObjectPath appPath;
auto applications = apps.applications();
if(!applications.contains(_name)){
QVariantMap properties;
properties.insert("name", _name);
properties.insert("description", _desc);
properties.insert("call", _call);
properties.insert("icon", _imgFile);
appPath = (QDBusObjectPath)apps.registerApplication(properties);
}else{
appPath = applications[_name].value<QDBusObjectPath>();
}
app = new Application(OXIDE_SERVICE, appPath.path(), bus, this);
connect(app, &Application::exited, this, &AppItem::exited);
if(!app->isValid()){
delete app;
app = nullptr;
qDebug() << "Application API instance is invalid" << app->lastError();
return false;
}
return true;
}
bool AppItem::ok(){ return getApp() != nullptr; }

void AppItem::execute(){
if(app == nullptr || !app->isValid()){
if(!getApp() || !app->isValid()){
qWarning() << "Application instance is not valid";
return;
}
Expand All @@ -76,7 +27,7 @@ void AppItem::execute(){
qDebug() << "Waiting for application to exit...";
}
void AppItem::stop(){
if(app == nullptr || !app->isValid()){
if(!getApp() || !app->isValid()){
qWarning() << "Application instance is not valid";
return;
}
Expand All @@ -86,3 +37,28 @@ void AppItem::stop(){
void AppItem::exited(int exitCode){
qDebug() << "Application exited" << exitCode;
}

Application* AppItem::getApp(){
if(app != nullptr){
return app;
}
auto controller = reinterpret_cast<Controller*>(parent());
auto apps = controller->getAppsApi();
auto bus = QDBusConnection::systemBus();
QDBusObjectPath appPath;
auto applications = apps->applications();
if(!applications.contains(_name)){
qDebug() << "Couldn't find Application instance";
return nullptr;
}
appPath = applications[_name].value<QDBusObjectPath>();
auto instance = new Application(OXIDE_SERVICE, appPath.path(), bus, this);
if(!instance->isValid()){
delete instance;
qDebug() << "Application API instance is invalid" << app->lastError();
return nullptr;
}
connect(instance, &Application::exited, this, &AppItem::exited);
app = instance;
return app;
}
4 changes: 4 additions & 0 deletions applications/launcher/appitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class AppItem : public QObject {
}
}

Q_PROPERTY(QString path MEMBER _path)
Q_PROPERTY(QString name MEMBER _name NOTIFY nameChanged)
Q_PROPERTY(QString displayName MEMBER _displayName NOTIFY displayNameChanged)
Q_PROPERTY(QString desc MEMBER _desc NOTIFY descChanged)
Expand All @@ -49,6 +50,7 @@ private slots:

private:
Application* app = nullptr;
QString _path;
QString _name;
QString _displayName;
QString _desc;
Expand All @@ -57,5 +59,7 @@ private slots:
bool _running = false;
char* frameBuffer;
int frameBufferHandle;

Application* getApp();
};
#endif // APP_H
Loading

0 comments on commit 33ee9fa

Please sign in to comment.