air
所属分类:编程语言基础
开发工具:Lua
文件大小:504KB
下载次数:0
上传日期:2023-05-06 13:02:42
上 传 者:
sh-1993
说明: 出色的电子阅读器界面
(Awesome Interface for e-Readers)
文件列表:
.Xresources (30, 2023-05-06)
keyboard.svg (44894, 2023-05-06)
kobo (0, 2023-05-06)
kobo\background.png (222973, 2023-05-06)
kobo\background_white.png (267935, 2023-05-06)
kobo\layouts (0, 2023-05-06)
kobo\layouts\cornerne.png (272, 2023-05-06)
kobo\layouts\cornernew.png (272, 2023-05-06)
kobo\layouts\cornernw.png (263, 2023-05-06)
kobo\layouts\cornernww.png (264, 2023-05-06)
kobo\layouts\cornerse.png (264, 2023-05-06)
kobo\layouts\cornersew.png (264, 2023-05-06)
kobo\layouts\cornersw.png (263, 2023-05-06)
kobo\layouts\cornersww.png (264, 2023-05-06)
kobo\layouts\dwindle.png (320, 2023-05-06)
kobo\layouts\dwindlew.png (320, 2023-05-06)
kobo\layouts\fairh.png (245, 2023-05-06)
kobo\layouts\fairhw.png (245, 2023-05-06)
kobo\layouts\fairv.png (246, 2023-05-06)
kobo\layouts\fairvw.png (246, 2023-05-06)
kobo\layouts\floating.png (282, 2023-05-06)
kobo\layouts\floatingw.png (282, 2023-05-06)
kobo\layouts\fullscreen.png (866, 2023-05-06)
kobo\layouts\fullscreenw.png (865, 2023-05-06)
kobo\layouts\magnifier.png (345, 2023-05-06)
kobo\layouts\magnifierw.png (345, 2023-05-06)
kobo\layouts\max.png (574, 2023-05-06)
kobo\layouts\maxw.png (581, 2023-05-06)
kobo\layouts\spiral.png (328, 2023-05-06)
kobo\layouts\spiralw.png (328, 2023-05-06)
kobo\layouts\tile.png (265, 2023-05-06)
kobo\layouts\tilebottom.png (264, 2023-05-06)
kobo\layouts\tilebottomw.png (264, 2023-05-06)
kobo\layouts\tileleft.png (266, 2023-05-06)
kobo\layouts\tileleftw.png (266, 2023-05-06)
kobo\layouts\tiletop.png (260, 2023-05-06)
kobo\layouts\tiletopw.png (265, 2023-05-06)
... ...
# Awesome Interface for e-Readers
![AIR screenshot](https://user-images.githubusercontent.com/55081/172224765-9f0efab0-f555-45b5-a053-186d2300373a.png)
AIR is a graphical interface for e-readers that heavily relies on AwesomeWM. It's tested on the Kobo Clara HD using PostmarketOS, but perhaps it can be used elsewhere. It is a work in progress.
AIR was created because most Linux graphical interfaces don't work very well with e-ink tablet out of the box. They often require keyboard or mouse to configure things. Sometimes, unique features such as cold & warm brightness cannot be easily controls. Lastly, things like proper suspend and resume can require some [hacks](suspend.sh). AIR aims to make these things Just Work TM.
## Features
- Tilling interface
- Brightness control
- WiFi toggling
- Suspend / Resume
- Touch gestures
- On screen keyboard
You can use any Linux application with it, for example:
- KOReader or Foliate for ebooks
- Firefox for (slow) web
- Castor for Gopher and Gemini
- St for terminal
## Setup
AIR isn't nicely packed as it's actually just a collection of different tools, together with an AwesomeWM configuration. Setting up takes a couple of steps:
0. `cd ~/.config && git clone https://github.com/bjesus/air.git awesome`
1. Install all needed packages: `sudo apk add awesome util-linux-misc svkbd lisgd network-manager-applet pm-utils brightnessctl upower adwaita-icon-theme font-inter xrandr`
2. If you want, install the additional optional software: `sudo apk add foliate castor mobile-config-firefox sxmo-st`
3. Place your background image at `~/.config/awesome/bg.jpg`
4. Set your default desktop environment: `sudo tinydm-set-session -f -s /usr/share/xsessions/awesome.desktop`
5. Allow password-less rfkill, suspend and poweroff by adding this to `/etc/sudoers`:
```
YOUR_USERNAME ALL=NOPASSWD: /usr/sbin/rfkill
YOUR_USERNAME ALL=NOPASSWD: /usr/sbin/pm-suspend
YOUR_USERNAME ALL=NOPASSWD: /sbin/poweroff
YOUR_USERNAME ALL=NOPASSWD: /usr/sbin/chroot
YOUR_USERNAME ALL=NOPASSWD: /bin/mount
YOUR_USERNAME ALL=NOPASSWD: /usr/bin/tee
```
6. Set some font-size optimizations by copying `~/.config/awesome/.Xresources` to `~/.Xresources` and `~/.config/awesome/settings.ini` to `~/.config/gtk-3.0/settings.ini`
7. `chmod +x ~/.config/awesome/suspend.sh`
8. Rotate the touchscreen by create /etc/X11/xorg.conf.d/rotate.conf with this:
```
Section "InputClass"
Identifier "Coordinate Transformation Matrix"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
MatchDriver "libinput"
Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
EndSection
```
### KOReader
The only way I managed to run KOReader is using a Debian chroot. Get the Debian package from [KOReader releases page](https://github.com/koreader/koreader/releases). Creating the chroot is pretty simple:
```
$ sudo apk add debootstrap xhost
$ sudo debootstrap testing ~/debian http://http.debian.net/debian/
$ cp koreader-2023.04-armhf.deb ~/chroot/root
$ mkdir -p ~/chroot/tmp/.X11-unix
$ sudo chroot ~/chroot /bin/bash
# inside the chroot:
$ apt update && apt install libsdl2-2.0-0 fonts-noto-hinted fonts-droid-fallback
$ sudo dpkg -i /root/koreader-2023.04-armhf.deb
```
You should now be able to use the koreader.sh script to launch KOReader.
## Usage
The menu on the bottom left is where you can launch your applications. By default it uses Foliate, Firefox, Castor and St. The bottom right has a gears icon that opens the Settings modal. You can set brightness using it, toggle the WIFI and restart. The keyboard icon toggles the keyboard.
### Gestures
AIR uses lisgd for gestures. By default the following gestures are set:
- Sliding up from the bottom edge toggles the keyboard
- Sliding down from the top left opens the settings modal
- Sliding down from the top right shows window controls for the currently focused window (useful for killing an app)
## Known issues
- Battery status reporting could be off
- GTK header buttons are tiny. Can be fixed by setting `GDK_SCALE` but for me it crashes Foliate.
近期下载者:
相关文件:
收藏者: