Skip to content
Snippets Groups Projects
Commit f631b813 authored by Johannes Marbach's avatar Johannes Marbach
Browse files

Merge branch 'master' into johannes/nord-theme

parents 1630e32a 0aec2da8
No related branches found
No related tags found
No related merge requests found
Showing
with 116 additions and 61 deletions
build-buffyboard:
build-and-test-buffyboard:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- apk -q add git build-base meson linux-headers inih-dev libinput-dev eudev-dev
- apk -q add git bash build-base meson linux-headers inih-dev libinput-dev eudev-dev
- git submodule init
- git submodule update
- cd buffyboard
- meson _build
- meson compile -C _build
- ./test/test-all.sh
build-and-test-unl0kr-with-drm:
image: alpine:3.19
......@@ -31,3 +30,13 @@ build-and-test-unl0kr-without-drm:
- git submodule update
- cd unl0kr
- ./test/test-without-drm.sh
build-iskey:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- apk -q add git bash build-base meson linux-headers libevdev-dev
- cd iskey
- meson setup _build
- meson compile -C _build
......@@ -10,15 +10,21 @@ If a change only affects particular applications, they are listed in parentheses
## Unreleased
- feat: Add adwaita-dark theme (thanks @topjor)
- feat: Add Nord themes
## 3.1.0 (2024-04-10)
- feat(buffyboard): Handle input device connection/disconnection at runtime; adds new dependency libudev
- feat(buffyboard): Allow choosing theme via config and add all themes from unl0kr
- feat(buffyboard): Add fbdev force-refresh quirk via config
- feat(buffyboard): Allow disabling input devices via config
- feat(buffyboard): Add CLI flags for overriding geometry & DPI
- feat(buffyboard): Add CLI flag for verbose logging
- fix(unl0kr): Shutdown message box doesn't close on decline
- fix(unl0kr): Shutdown message box buttons and label are unstyled
- fix(unl0kr): Build fails when DRM is disabled
- misc: Update lvgl to git master (2023-03-30)
- misc: Update lvgl to git master (2023-04-10)
## 3.0.0 (2024-03-22)
......
......@@ -14,6 +14,8 @@ BuffyBox is a suite of graphical applications for the terminal.
**[squeek2lvgl]** – Converter for transforming [Squeekboard] layouts into [LVGL]-compatible C code
**[iskey]** - A utility for checking for key presses in bash scripts.
**[shared]** – Internal code that is shared by some or all applications in the suite but not meant to be used externally
## Contributing
......@@ -44,6 +46,7 @@ For the license of bundled images and fonts, see [shared/cursor] and [shared/fon
[LVGL]: https://github.com/lvgl/lvgl
[shared]: ./shared
[squeek2lvgl]: ./squeek2lvgl
[iskey]: ./iskey
[Squeekboard]: https://gitlab.gnome.org/World/Phosh/squeekboard
[shared/cursor]: ./shared/cursor
[shared/fonts]: ./shared/fonts
......
......@@ -59,6 +59,7 @@ Mandatory arguments to long options are mandatory for short options too.
* 2 - upside down orientation (180 degrees)
* 3 - counterclockwise orientation (270 degrees)
-h, --help Print this message and exit
-v, --verbose Enable more detailed logging output on STDERR
-V, --version Print the buffyboard version and exit
```
......@@ -108,7 +109,15 @@ Buffyboard uses [squeekboard layouts] converted to C via [squeek2lvgl]. To regen
$ ./regenerate-layouts.sh
```
from the root of the repository.
## Generating screenshots
To generate screenshots in a variety of common sizes, install [fbcat], build buffyboard and then run
```
$ sudo ./regenerate-screenshots _build/buffyboard
```
where `_build/buffyboard` is the location of the buffyboard binary.
# Acknowledgements
......@@ -126,6 +135,7 @@ Buffyboard was inspired by [fbkeyboard].
[LVGL]: https://lvgl.io
[arrow-alt-circle-up]: https://fontawesome.com/v5.15/icons/arrow-alt-circle-up?style=solid
[buffyboard.conf]: ./buffyboard.conf
[fbcat]: https://github.com/jwilk/fbcat
[fbkeyboard]: https://github.com/bakonyiferenc/fbkeyboard
[inih]: https://github.com/benhoyt/inih
[libinput]: https://gitlab.freedesktop.org/libinput/libinput
......
......@@ -45,6 +45,7 @@ static void init_opts(bb_cli_opts *opts) {
opts->y_offset = 0;
opts->dpi = 0;
opts->rotation = LV_DISPLAY_ROTATION_0;
opts->verbose = false;
}
static void print_usage() {
......@@ -71,6 +72,7 @@ static void print_usage() {
" * 2 - upside down orientation (180 degrees)\n"
" * 3 - counterclockwise orientation (270 degrees)\n"
" -h, --help Print this message and exit\n"
" -v, --verbose Enable more detailed logging output on STDERR\n"
" -V, --version Print the buffyboard version and exit\n");
/*-------------------------------- 78 CHARS --------------------------------*/
}
......@@ -89,13 +91,14 @@ void bb_cli_parse_opts(int argc, char *argv[], bb_cli_opts *opts) {
{ "dpi", required_argument, NULL, 'd' },
{ "rotate", required_argument, NULL, 'r' },
{ "help", no_argument, NULL, 'h' },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
};
int opt, index = 0;
while ((opt = getopt_long(argc, argv, "C:g:d:r:hV", long_opts, &index)) != -1) {
while ((opt = getopt_long(argc, argv, "C:g:d:r:hvV", long_opts, &index)) != -1) {
switch (opt) {
case 'C':
opts->config_files = realloc(opts->config_files, (opts->num_config_files + 1) * sizeof(char *));
......@@ -145,6 +148,9 @@ void bb_cli_parse_opts(int argc, char *argv[], bb_cli_opts *opts) {
case 'h':
print_usage();
exit(EXIT_SUCCESS);
case 'v':
opts->verbose = true;
break;
case 'V':
fprintf(stderr, "buffyboard %s\n", BB_VERSION);
exit(0);
......
......@@ -29,6 +29,8 @@ typedef struct {
int dpi;
/* Display rotation */
lv_display_rotation_t rotation;
/* Verbose mode. If true, provide more detailed logging output on STDERR. */
bool verbose;
} bb_cli_opts;
/**
......
......@@ -14,6 +14,7 @@
#include "lvgl/lvgl.h"
#include "../shared/indev.h"
#include "../shared/log.h"
#include "../shared/theme.h"
#include "../shared/themes.h"
#include "../squeek2lvgl/sq2lv.h"
......@@ -180,6 +181,11 @@ int main(int argc, char *argv[]) {
/* Parse command line options */
bb_cli_parse_opts(argc, argv, &cli_opts);
/* Set up log level */
if (cli_opts.verbose) {
bbx_log_set_level(BBX_LOG_LEVEL_VERBOSE);
}
/* Parse config files */
bb_config_init_opts(&conf_opts);
bb_config_parse_file("/etc/buffyboard.conf", &conf_opts);
......
......@@ -5,7 +5,7 @@
project(
'buffyboard',
'c',
version: '3.0.0',
version: '3.1.0',
default_options: 'warning_level=1',
meson_version: '>=0.53.0'
)
......
......@@ -7,14 +7,8 @@ executable=$1
outdir=screenshots
config=buffyboard-screenshots.conf
themes=(
breezy-light
breezy-dark
pmos-light
pmos-dark
nord-light
nord-dark
)
root=$(git rev-parse --show-toplevel)
themes_c=$root/shared/themes.c
resolutions=(
# Nokia N900
......@@ -34,6 +28,11 @@ resolutions=(
1920x1080
)
if ! which fbcat > /dev/null 2>&1; then
echo "Error: Could not find fbcat" 1>&2
exit 1
fi
if [[ ! -f $executable || ! -x $executable ]]; then
echo "Error: Could not find executable at $executable" 1>&2
exit 1
......@@ -63,7 +62,7 @@ readme="# Buffyboard themes"$'\n'
clear # Blank the screen
for theme in ${themes[@]}; do
while read -r theme; do
write_config $theme
readme="$readme"$'\n'"## $theme"$'\n\n'
......@@ -74,8 +73,11 @@ for theme in ${themes[@]}; do
sleep 3 # Wait for UI to render
../../fbcat/fbcat /dev/fb0 > "$outdir/$theme-$res.ppm"
convert -size $fb_res \
fbcat /dev/fb0 > "$outdir/$theme-$res.ppm"
kill -15 $pid
convert \
-size $fb_res \
$outdir/$theme-$res.ppm \
screenshot-background.png \
-crop $res+0+0 \
......@@ -84,12 +86,11 @@ for theme in ${themes[@]}; do
"$outdir/$theme-$res.png"
rm "$outdir/$theme-$res.ppm"
kill -15 $pid
readme="$readme<img src=\"$theme-$res.png\" alt=\"$res\" height=\"300\"/>"$'\n'
sleep 1 # Delay to prevent terminal mode set / reset interference
done
done
done < <(grep "name =" "$themes_c" | grep -o '".*"' | tr -d '"' | sort)
echo -n "$readme" > "$outdir/README.md"
# Buffyboard themes
## breezy-light
## adwaita-dark
<img src="breezy-light-480x800.png" alt="480x800" height="300"/>
<img src="breezy-light-800x480.png" alt="800x480" height="300"/>
<img src="breezy-light-540x960.png" alt="540x960" height="300"/>
<img src="breezy-light-960x540.png" alt="960x540" height="300"/>
<img src="breezy-light-768x1024.png" alt="768x1024" height="300"/>
<img src="breezy-light-1024x768.png" alt="1024x768" height="300"/>
<img src="breezy-light-1280x800.png" alt="1280x800" height="300"/>
<img src="breezy-light-1440x720.png" alt="1440x720" height="300"/>
<img src="breezy-light-1920x1080.png" alt="1920x1080" height="300"/>
<img src="adwaita-dark-480x800.png" alt="480x800" height="300"/>
<img src="adwaita-dark-800x480.png" alt="800x480" height="300"/>
<img src="adwaita-dark-540x960.png" alt="540x960" height="300"/>
<img src="adwaita-dark-960x540.png" alt="960x540" height="300"/>
<img src="adwaita-dark-768x1024.png" alt="768x1024" height="300"/>
<img src="adwaita-dark-1024x768.png" alt="1024x768" height="300"/>
<img src="adwaita-dark-1280x800.png" alt="1280x800" height="300"/>
<img src="adwaita-dark-1440x720.png" alt="1440x720" height="300"/>
<img src="adwaita-dark-1920x1080.png" alt="1920x1080" height="300"/>
## breezy-dark
......@@ -24,29 +24,29 @@
<img src="breezy-dark-1440x720.png" alt="1440x720" height="300"/>
<img src="breezy-dark-1920x1080.png" alt="1920x1080" height="300"/>
## pmos-light
## breezy-light
<img src="pmos-light-480x800.png" alt="480x800" height="300"/>
<img src="pmos-light-800x480.png" alt="800x480" height="300"/>
<img src="pmos-light-540x960.png" alt="540x960" height="300"/>
<img src="pmos-light-960x540.png" alt="960x540" height="300"/>
<img src="pmos-light-768x1024.png" alt="768x1024" height="300"/>
<img src="pmos-light-1024x768.png" alt="1024x768" height="300"/>
<img src="pmos-light-1280x800.png" alt="1280x800" height="300"/>
<img src="pmos-light-1440x720.png" alt="1440x720" height="300"/>
<img src="pmos-light-1920x1080.png" alt="1920x1080" height="300"/>
<img src="breezy-light-480x800.png" alt="480x800" height="300"/>
<img src="breezy-light-800x480.png" alt="800x480" height="300"/>
<img src="breezy-light-540x960.png" alt="540x960" height="300"/>
<img src="breezy-light-960x540.png" alt="960x540" height="300"/>
<img src="breezy-light-768x1024.png" alt="768x1024" height="300"/>
<img src="breezy-light-1024x768.png" alt="1024x768" height="300"/>
<img src="breezy-light-1280x800.png" alt="1280x800" height="300"/>
<img src="breezy-light-1440x720.png" alt="1440x720" height="300"/>
<img src="breezy-light-1920x1080.png" alt="1920x1080" height="300"/>
## pmos-dark
## nord-dark
<img src="pmos-dark-480x800.png" alt="480x800" height="300"/>
<img src="pmos-dark-800x480.png" alt="800x480" height="300"/>
<img src="pmos-dark-540x960.png" alt="540x960" height="300"/>
<img src="pmos-dark-960x540.png" alt="960x540" height="300"/>
<img src="pmos-dark-768x1024.png" alt="768x1024" height="300"/>
<img src="pmos-dark-1024x768.png" alt="1024x768" height="300"/>
<img src="pmos-dark-1280x800.png" alt="1280x800" height="300"/>
<img src="pmos-dark-1440x720.png" alt="1440x720" height="300"/>
<img src="pmos-dark-1920x1080.png" alt="1920x1080" height="300"/>
<img src="nord-dark-480x800.png" alt="480x800" height="300"/>
<img src="nord-dark-800x480.png" alt="800x480" height="300"/>
<img src="nord-dark-540x960.png" alt="540x960" height="300"/>
<img src="nord-dark-960x540.png" alt="960x540" height="300"/>
<img src="nord-dark-768x1024.png" alt="768x1024" height="300"/>
<img src="nord-dark-1024x768.png" alt="1024x768" height="300"/>
<img src="nord-dark-1280x800.png" alt="1280x800" height="300"/>
<img src="nord-dark-1440x720.png" alt="1440x720" height="300"/>
<img src="nord-dark-1920x1080.png" alt="1920x1080" height="300"/>
## nord-light
......@@ -60,14 +60,26 @@
<img src="nord-light-1440x720.png" alt="1440x720" height="300"/>
<img src="nord-light-1920x1080.png" alt="1920x1080" height="300"/>
## nord-dark
## pmos-dark
<img src="nord-dark-480x800.png" alt="480x800" height="300"/>
<img src="nord-dark-800x480.png" alt="800x480" height="300"/>
<img src="nord-dark-540x960.png" alt="540x960" height="300"/>
<img src="nord-dark-960x540.png" alt="960x540" height="300"/>
<img src="nord-dark-768x1024.png" alt="768x1024" height="300"/>
<img src="nord-dark-1024x768.png" alt="1024x768" height="300"/>
<img src="nord-dark-1280x800.png" alt="1280x800" height="300"/>
<img src="nord-dark-1440x720.png" alt="1440x720" height="300"/>
<img src="nord-dark-1920x1080.png" alt="1920x1080" height="300"/>
<img src="pmos-dark-480x800.png" alt="480x800" height="300"/>
<img src="pmos-dark-800x480.png" alt="800x480" height="300"/>
<img src="pmos-dark-540x960.png" alt="540x960" height="300"/>
<img src="pmos-dark-960x540.png" alt="960x540" height="300"/>
<img src="pmos-dark-768x1024.png" alt="768x1024" height="300"/>
<img src="pmos-dark-1024x768.png" alt="1024x768" height="300"/>
<img src="pmos-dark-1280x800.png" alt="1280x800" height="300"/>
<img src="pmos-dark-1440x720.png" alt="1440x720" height="300"/>
<img src="pmos-dark-1920x1080.png" alt="1920x1080" height="300"/>
## pmos-light
<img src="pmos-light-480x800.png" alt="480x800" height="300"/>
<img src="pmos-light-800x480.png" alt="800x480" height="300"/>
<img src="pmos-light-540x960.png" alt="540x960" height="300"/>
<img src="pmos-light-960x540.png" alt="960x540" height="300"/>
<img src="pmos-light-768x1024.png" alt="768x1024" height="300"/>
<img src="pmos-light-1024x768.png" alt="1024x768" height="300"/>
<img src="pmos-light-1280x800.png" alt="1280x800" height="300"/>
<img src="pmos-light-1440x720.png" alt="1440x720" height="300"/>
<img src="pmos-light-1920x1080.png" alt="1920x1080" height="300"/>
buffyboard/screenshots/adwaita-dark-1024x768.png

12.1 KiB

buffyboard/screenshots/adwaita-dark-1280x800.png

13.2 KiB

buffyboard/screenshots/adwaita-dark-1440x720.png

13.1 KiB

buffyboard/screenshots/adwaita-dark-1920x1080.png

17.5 KiB

buffyboard/screenshots/adwaita-dark-480x800.png

9.52 KiB

buffyboard/screenshots/adwaita-dark-540x960.png

10.4 KiB

buffyboard/screenshots/adwaita-dark-768x1024.png

11.8 KiB

buffyboard/screenshots/adwaita-dark-800x480.png

9.55 KiB

buffyboard/screenshots/adwaita-dark-960x540.png

10.5 KiB

buffyboard/screenshots/breezy-dark-1024x768.png

12.1 KiB | W: | H:

buffyboard/screenshots/breezy-dark-1024x768.png

12.1 KiB | W: | H:

buffyboard/screenshots/breezy-dark-1024x768.png
buffyboard/screenshots/breezy-dark-1024x768.png
buffyboard/screenshots/breezy-dark-1024x768.png
buffyboard/screenshots/breezy-dark-1024x768.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment