-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup/ add task switcher shell script
- Loading branch information
ddvk
committed
Sep 18, 2019
1 parent
55385c9
commit 27f6473
Showing
11 changed files
with
88 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ Makefile | |
.qmake.stash | ||
tags | ||
obj/ | ||
*.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
//todo: get from touch device | ||
#define SCREEN_WIDTH 1404 | ||
#define SCREEN_HEIGHT 1872 | ||
|
||
//todo: param or config | ||
#define TOUCHSCREEN "/dev/input/event1" | ||
#define TOUCH_WIDTH 767 | ||
#define TOUCH_HEIGHT 1023 | ||
|
||
#define BUTTONS "/dev/input/event2" | ||
#define WACOM "/dev/input/event0" | ||
|
||
#define MAX_SLOTS 7 //max touch points to track | ||
#define TWOTAP_DISTANCE 700 //distance between the fingers to enable disable | ||
#define JITTER 20 //finger displacement to be consideded a swipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
#pragma once | ||
#include "eventreader.h" | ||
#define TWOTAP_DISTANCE 700 | ||
|
||
|
||
void recognize_gestures(struct TouchEvent *f); | ||
struct Gesture; | ||
struct TouchEvent; | ||
void recognize_gestures(struct TouchEvent *f); | ||
void interpret_gesture(struct Gesture *g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
DRAFT_PID="/tmp/draft" | ||
DRAFT_KILL="/tmp/draft_kill" | ||
if [ -f $DRAFT_PID ]; then | ||
if [ -f $DRAFT_KILL ]; then | ||
sh $DRAFT_KILL | ||
rm $DRAFT_KILL | ||
fi | ||
pid=$(cat $DRAFT_PID) | ||
rm $DRAFT_PID | ||
kill $pid | ||
#todo find a better way | ||
killall chess | ||
killall fingerterm | ||
killall plato | ||
killall edit | ||
killall draft | ||
systemctl start xochitl | ||
else | ||
systemctl stop xochitl | ||
~/draft & | ||
echo $! > $DRAFT_PID | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,42 @@ | ||
#include <QGuiApplication> | ||
#include <QPainter> | ||
#include <QImage> | ||
#include <epframebuffer.h> | ||
#include "ui.h" | ||
|
||
#include "config.h" | ||
#ifdef REMARKABLE | ||
#include <epframebuffer.h> | ||
//segfault if it does not exist | ||
QGuiApplication *app; | ||
static QGuiApplication *app=nullptr; | ||
#endif | ||
|
||
extern "C" { | ||
void ui_init(){ | ||
#ifdef REMARKABLE | ||
qputenv("QMLSCENE_DEVICE", "epaper"); | ||
qputenv("QT_QPA_PLATFORM", "epaper:enable_fonts"); | ||
qputenv("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS", "rotate=180"); | ||
qputenv("QT_QPA_GENERIC_PLUGINS", "evdevtablet"); | ||
|
||
void ui_init(){ | ||
qputenv("QMLSCENE_DEVICE", "epaper"); | ||
qputenv("QT_QPA_PLATFORM", "epaper:enable_fonts"); | ||
qputenv("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS", "rotate=180"); | ||
qputenv("QT_QPA_GENERIC_PLUGINS", "evdevtablet"); | ||
char *argv [0]; | ||
int argc = 0; | ||
app = new QGuiApplication(argc,argv); | ||
#endif | ||
} | ||
|
||
char *argv [0]; | ||
int argc = 0; | ||
app = new QGuiApplication(argc,argv); | ||
} | ||
void show(const char *str){ | ||
|
||
void show(const char *str){ | ||
QPainter painter(EPFrameBuffer::framebuffer()); | ||
int x = SCREEN_WIDTH / 3; | ||
int y = SCREEN_HEIGHT - 20; | ||
QRect rect(x - 50,y - 50, 600, 100); | ||
painter.eraseRect(rect); | ||
painter.drawText(x,y, str); | ||
painter.end(); | ||
EPFrameBuffer::sendUpdate(rect, EPFrameBuffer::Grayscale, EPFrameBuffer::PartialUpdate); | ||
} | ||
#ifdef REMARKABLE | ||
QPainter painter(EPFrameBuffer::framebuffer()); | ||
int x = SCREEN_WIDTH / 3; | ||
int y = SCREEN_HEIGHT - 20; | ||
QRect rect(x - 50,y - 50, 600, 100); | ||
painter.eraseRect(rect); | ||
painter.drawText(x,y, str); | ||
painter.end(); | ||
EPFrameBuffer::sendUpdate(rect, EPFrameBuffer::Grayscale, EPFrameBuffer::PartialUpdate); | ||
#else | ||
printf("show: %s\n", str); | ||
|
||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define VERSION "0.0.2-18-g8f73256" | ||
#define VERSION "0.0.2-19-g55385c9" |