Skip to content
Snippets Groups Projects
Unverified Commit 55787164 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="
08734715bb62fccd821ed2749145b0ecbdaffbc3b94c439f8ef9c7a2e76acf38c9f6229a58e605f9978e7759c5b1ea877175f8d8a9124eada091711b13b04711 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" = "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