Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Makefile*
*.prl
*.app
moc_*.cpp
moc_*.h
ui_*.h
qrc_*.cpp
Thumbs.db
Expand Down Expand Up @@ -70,4 +71,5 @@ Thumbs.db
# --------
*.dll
*.exe

bin/
obj/
161 changes: 161 additions & 0 deletions Main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
import QtQuick 2.11
import QtQuick.Controls 2.0
import QtQuick.Window 2.11
import QtQuick.Layouts 1.3

Window {
id: canvas
width: screenGeometry.width
height: screenGeometry.height
visible: true

Rectangle {
id:body
anchors.fill: parent
function redraw() {
canvas.visible = true
body.update()
}

Timer{
id: redraw_timer
interval: 300
repeat: false

onTriggered: redraw()
}
Item {
id:header
height: 80
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top

Text{
text: "draft launcher"
anchors.centerIn: parent

font.family:"Noto Serif"
font.pixelSize:30
font.bold: true
}
Rectangle{
anchors.left:parent.left
anchors.right:parent.right
anchors.bottom:parent.bottom
anchors.margins: 10
height: 5
color: "black"
}
}
Item {
id:footer
height:40

anchors{
bottom: parent.bottom
left:parent.left
right:parent.right
}

Rectangle{
anchors.left:parent.left
anchors.right:parent.right
anchors.top:parent.top
anchors.leftMargin: 10
anchors.rightMargin: 10
height: 5
color: "black"
}

Text{
text: controller.getVersion()
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins:10

font.family:"Noto Serif"
font.pixelSize:15
font.bold: true
}
}


Item {

anchors.top: header.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: 15

ListView {
id:optionsArea
spacing: 15
anchors.fill:parent
interactive: false
model: controller.getOptions();
delegate: Rectangle{
id:menu_item
height:150
border.color: "black"
border.width: 2

anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
states: [
State {
name:"normal"
PropertyChanges {
target: menu_item
color: "white"
}
},
State {
name:"clicked"
PropertyChanges {
target: menu_item
color: "gray"
}
}]

Text{
font.pixelSize: 70
anchors.left: parent.left
anchors.top: parent.top
anchors.margins: 10
text:model.modelData.name
}

Text {
id:tdesc
anchors.bottom:parent.bottom
anchors.left:parent.left
anchors.right:parent.right
anchors.leftMargin:20
anchors.bottomMargin:10
text:model.modelData.desc
font.family:"Noto Serif"
font.pixelSize:30
font.italic: true
}
MouseArea {
anchors.fill: parent
onPressed: menu_item.state = "clicked"
onReleased: menu_item.state = "normal"
onClicked: {
optionsArea.currentIndex = index
canvas.visible = false
//Qt.connect()
//blocking call
model.modelData.execute()
//redraw_timer.start()
Qt.callLater(body.redraw)
}
}
}
}
}
}
}
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# draft-reMarkable
# fork of draft-reMarkable
A launcher for the reMarkable tablet, which wraps around the standard interface.

[Draft v0.2 video](https://www.youtube.com/watch?v=VEngMK54SV4)
Expand All @@ -9,42 +9,41 @@ A launcher for the reMarkable tablet, which wraps around the standard interface.
(nb. You fiddle with the internal system of your reMarkable at your own risk! Here be dragons.)

### 1. Deploy draft
This should simply be a case of opening up qtcreator, loading up the project with the normal reMarkable target, and hitting "run".

As well as deploying the program, this will also populate `/etc/draft` with some sample commands and add a `/lib/systemd/system/draft.service` systemd file.


### 1.i (optional) Deploy button-capture

[This small program](https://github.com/dixonary/button-capture-reMarkable) allows you to close the current application and return to the draft launcher. There is no native way to close `xochitl` so this is a very useful thing to have if you want to switch between applications.


### 1.ii (optional) Deploy fingerterm

[This terminal](https://github.com/dixonary/fingerterm-reMarkable) runs on the reMarkable and lets you change some config things without needing to SSH in! It's one of the default config options but you can remove that if you are't wanting to use it.
```bash
source thetoolchain
qmake
make
scp bin/draft rm:
```
or
```
./dep.sh
```

### 2. Enable at startup
### 2.a Enable at startup
You need to replace the normal xochitl startup with draft. This is done with the following two lines via SSH:

```bash
systemctl disable xochitl
systemctl enable draft
```

### 3. Restart your reMarkable
### 2.b Use touchgestures
TODO


On restart you should find that `xochitl`, `fingerterm` and `shutdown` are your available choices and the draft launcher is running.

### 4. Configure draft

Draft is configured through the files in the `/etc/draft` directory. They consist of a few simple lines. All of them are needed otherwise the option will not show up in the launcher.
Draft is configured through the files in the `~/.config/draft` directory. They consist of a few simple lines. All of them are needed otherwise the option will not show up in the launcher.

`title`: Big word, left hand side of the screen.

`desc`: Smaller words, left hand side of the screen.

`call`: The shell command to run when the option is pressed.

not implemented yet:
`term`: The shell command to run while the option is running, to close it. (or it can do whatever you want really!) This won't do anything without `button-capture` installed.

`imgFile`: An icon to use. It will look for a PNG image with that name in the `/etc/draft/icons` directory.
Expand Down
5 changes: 5 additions & 0 deletions dep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
make clean && \
qmake && \
make -j12 && \
arm-oe-linux-gnueabi-strip bin/draft && \
scp bin/draft root@remarkable:
59 changes: 21 additions & 38 deletions draft.pro
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
system(./makeversion.sh) QMAKE_EXTRA_TARGETS += version.h
PRE_TARGETDEPS += version.h
QT += quick
QT -= GLES
CONFIG += c++11
LIBS += -lqsgepaper
CONFIG += optimize_full

TARGET = draft
linux-oe-g++ {
message("rm")
LIBS += -lqsgepaper
DEFINES += RM
}

TARGET = draft
DESTDIR = bin
OBJECTS_DIR = obj
DEPLOYMENT_PATH=/home/root
INSTALLS += target
target.path = /home/root
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
Expand All @@ -16,48 +29,18 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

HEADERS += \
mainview.h \
option_item.h \
options.h \
handler.h
version.h

SOURCES += main.cpp \
mainview.cpp \
options.cpp \
handler.cpp

DEPLOYMENT_PATH = /usr/share/$$TARGET
DEFINES += DEPLOYMENT_PATH=\\\"$$DEPLOYMENT_PATH\\\"
DEFINES += QML_FOLDER=\\\"qml\\\"

js.files = js/Main.js
js.path == $$DEPLOYMENT_PATH/js
INSTALLS += js

qml.files = qml/Main.qml
qml.files+= qml/MenuItem.qml
qml.path == $$DEPLOYMENT_PATH/qml
INSTALLS += qml


# Installs /etc/draft and /lib/systemd/system/draft.service.
configFiles.files = extra-files/draft
configFiles.path = /etc/
INSTALLS += configFiles

service.files = extra-files/draft.service
service.path=/lib/systemd/system/
INSTALLS += service
option_item.cpp \
options.cpp

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =




target.path = /usr/bin
INSTALLS += target

DISTFILES += \
js/Main.js \
qml/MenuItem.qml
RESOURCES += \
qml.qrc

69 changes: 0 additions & 69 deletions handler.cpp

This file was deleted.

Loading