From 8e766d827ed81c4baa52858d6faaaa01798066e7 Mon Sep 17 00:00:00 2001 From: Ivan Mahonin Date: Mar 20 2024 09:15:36 +0000 Subject: scripts for maemo --- diff --git a/.gitignore b/.gitignore index d19feaf..38a100f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ !*.* *.kdev4 config.h - +!/maemo/ +/maemo/coolkbd.* +/maemo/nohup* diff --git a/maemo/build.sh b/maemo/build.sh new file mode 100755 index 0000000..9e9a0b2 --- /dev/null +++ b/maemo/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +echo "build executables for maemo" + +cd .. +BUILD_DIR="maemo" +MODE="-release" + + +function build() { + echo "copy config $BUILD_DIR/$1 -> config.h" + cp "$BUILD_DIR/$1" "config.h" + ./build.sh "$MODE" "$BUILD_DIR/$2" +} + + +if [ "$1" = "-debug" ]; then + MODE="-debug" +fi + + +build config.h.dock coolkbd.dock +build config.h.bottom coolkbd.bottom +build config.h.top coolkbd.top + diff --git a/maemo/config.h.bottom b/maemo/config.h.bottom new file mode 100644 index 0000000..3d62786 --- /dev/null +++ b/maemo/config.h.bottom @@ -0,0 +1,30 @@ +#ifndef CONFIG_H +#define CONFIG_H + + + +#define NOBORDER +#define NOTITLE +#define LOCK_SIZE +//#define DOCK +//#define TOP_RESIZE +//#define TOP + +#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) +#define HEIGHT_SCALE 1/3 + +#define TITLE "coolkbd" +#define MIN_WIDTH 200 +#define MIN_HEIGHT 100 +#define LONGPRESS_MS 1500 + +#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } +#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } +#define FONT_MAX_SIZES 16 + +#define LABEL_MAXLEN 32 + +#define KEY_BORDER 2 // see also S in layout.defs.h + + +#endif diff --git a/maemo/config.h.dock b/maemo/config.h.dock new file mode 100644 index 0000000..b4afdc8 --- /dev/null +++ b/maemo/config.h.dock @@ -0,0 +1,30 @@ +#ifndef CONFIG_H +#define CONFIG_H + + + +//#define NOBORDER +//#define NOTITLE +//#define LOCK_SIZE +#define DOCK +//#define TOP_RESIZE +//#define TOP + +#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) +#define HEIGHT_SCALE 1/3 + +#define TITLE "coolkbd" +#define MIN_WIDTH 200 +#define MIN_HEIGHT 100 +#define LONGPRESS_MS 1500 + +#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } +#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } +#define FONT_MAX_SIZES 16 + +#define LABEL_MAXLEN 32 + +#define KEY_BORDER 2 // see also S in layout.defs.h + + +#endif diff --git a/maemo/config.h.top b/maemo/config.h.top new file mode 100644 index 0000000..fe8bfc7 --- /dev/null +++ b/maemo/config.h.top @@ -0,0 +1,30 @@ +#ifndef CONFIG_H +#define CONFIG_H + + + +#define NOBORDER +#define NOTITLE +#define LOCK_SIZE +//#define DOCK +//#define TOP_RESIZE +#define TOP + +#define WIDTH_SCALE 1/1 // (nominator)/(denomitator) +#define HEIGHT_SCALE 1/3 + +#define TITLE "coolkbd" +#define MIN_WIDTH 200 +#define MIN_HEIGHT 100 +#define LONGPRESS_MS 1500 + +#define FONTS { "DejaVu Sans:bold", "DejaVu Sans", "DejaVu" } +#define FONT_SIZES { 2, 3, 4, 6, 8, 10, 12, 16, 18, 24, 32, 40, 48 } +#define FONT_MAX_SIZES 16 + +#define LABEL_MAXLEN 32 + +#define KEY_BORDER 2 // see also S in layout.defs.h + + +#endif diff --git a/maemo/switch.sh b/maemo/switch.sh new file mode 100755 index 0000000..f1e5639 --- /dev/null +++ b/maemo/switch.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +ROOT="$(cd `dirname "$0"`; pwd)" +cd "$ROOT" + +( killall coolkbd.dock && ( nohup ./coolkbd.bottom & ) ) || \ +( killall coolkbd.bottom && ( nohup ./coolkbd.top & ) ) || \ + killall coolkbd.top || ( nohup ./coolkbd.dock & ) +