Skip to content
Snippets Groups Projects
Unverified Commit 3bf85bb9 authored by Caleb Connolly's avatar Caleb Connolly :recycle:
Browse files

main/ttyescape: new aports

Add ttyescape, a script and triggerhappy configuration to allow mobile
device users to access and use a shell without having to plug in to a
computer.
parent 3dd89c9a
No related branches found
No related tags found
No related merge requests found
# Maintainer: Caleb Connolly <caleb@connolly.tech>
pkgname=ttyescape
pkgver=0.1
pkgrel=0
pkgdesc="Daemon to allow users to escape to a tty"
url="https://postmarketos.org"
arch="all"
license="GPL-3.0-or-later"
depends="triggerhappy fbkeyboard terminus-font kbd"
makedepends=""
checkdepends=""
install="$pkgname.post-install"
source="
togglevt.sh
ttyescape-thd.conf
"
options="!check"
package() {
install -Dm755 "$srcdir"/togglevt.sh \
"$pkgdir"/usr/bin/togglevt.sh
install -Dm755 "$srcdir"/ttyescape-thd.conf \
"$pkgdir"/etc/triggerhappy/triggers.d/ttyescape.conf
}
sha512sums="
8edd0eedddbe14925a659022af3257b93301a03d112438c9fbe80cee88436777b35a2881ff3f05afb4850b4c25e1f58800b819a76bd5d47cc2dd28304060c3bd togglevt.sh
3570ce89d3cc493da3aac9f81e2d9072d783d96e43d2194a244096ea1ca3bd76c0ecdb5436531d4ad87c81fa47e95665dfa1a0f7fbded81297c1c950b3184965 ttyescape-thd.conf
"
#!/bin/sh
# Toggle between tty1 and tty2, launching fbkeyboard when on tty2
if [ ! -e /dev/uinput ]; then
if ! modprobe -q uinput; then
echo "uinput module not available, please enable it in your kernel"
fi
fi
currentvt=$(cat /sys/devices/virtual/tty/tty0/active)
if [ "$currentvt" -eq "tty2" ]; then
chvt 1
killall fbkeyboard
else
setfont /usr/share/consolefonts/ter-128n.psf.gz -C /dev/tty2
chvt 2
nohup fbkeyboard -r $(cat /sys/class/graphics/fbcon/rotate) &
fi
KEY_VOLUMEDOWN+KEY_POWER 1 /usr/bin/togglevt.sh
\ No newline at end of file
#!/bin/sh
rc-update -q add triggerhappy default
\ No newline at end of file
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