Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmaports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmaports
Commits
39b6a7e1
Unverified
Commit
39b6a7e1
authored
4 years ago
by
Ferenc Bakonyi
Committed by
Alexey Minnekhanov
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
main/postmarketos-ui-fbkeyboard: support rotated fbcon, remove unneeded console resize (MR 1410)
parent
2f1fb6c3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#198120
passed
4 years ago
Stage: first
Stage: second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/postmarketos-ui-fbkeyboard/APKBUILD
+3
-3
3 additions, 3 deletions
main/postmarketos-ui-fbkeyboard/APKBUILD
main/postmarketos-ui-fbkeyboard/fbkeyboard.init
+1
-55
1 addition, 55 deletions
main/postmarketos-ui-fbkeyboard/fbkeyboard.init
with
4 additions
and
58 deletions
main/postmarketos-ui-fbkeyboard/APKBUILD
+
3
−
3
View file @
39b6a7e1
# Maintainer: Ferenc Bakonyi <bakonyi.ferenc@gmail.com>
pkgname
=
postmarketos-ui-fbkeyboard
pkgver
=
1
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"Plain framebuffer console with touchscreen keyboard support"
url
=
"https://github.com/bakonyiferenc/fbkeyboard"
arch
=
"all"
license
=
"GPL-3.0-or-later"
depends
=
"fbkeyboard
coreutils
"
depends
=
"fbkeyboard"
install
=
"
$pkgname
.post-install
$pkgname
.pre-deinstall
$pkgname
.post-upgrade"
source
=
"fbkeyboard.init"
options
=
"!check"
# No tests
...
...
@@ -15,4 +15,4 @@ package() {
install
-Dm755
"
$srcdir
"
/fbkeyboard.init
"
$pkgdir
"
/etc/init.d/fbkeyboard
}
sha512sums
=
"
386ce9bb48a75a0cbe2dd3617eaa700368d8b3a55d502a15d16415fdebbb3234893a8e0247ff63b6222017c57c1103a0922581311b9d6bbe63b2f7699ea6f15c
fbkeyboard.init"
sha512sums
=
"
1341e2a4ba9187f2538f210c3c4bcd8e2e79341552391b3ce57fb2f0d9a8c99a4d7c182d82d2d8f73caea22ace25530fe42e6b16040e8aa7dc62b4e96a5db81d
fbkeyboard.init"
This diff is collapsed.
Click to expand it.
main/postmarketos-ui-fbkeyboard/fbkeyboard.init
+
1
−
55
View file @
39b6a7e1
...
...
@@ -2,6 +2,7 @@
name="fbkeyboard"
command="/usr/bin/fbkeyboard"
command_args="-r $(cat /sys/class/graphics/fbcon/rotate)"
pidfile="/var/run/fbkeyboard.pid"
command_background=true
...
...
@@ -20,59 +21,4 @@ start_pre()
"the fbkeyboard service or built in."
fi
fi
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
if [ "$ttyn" = 0 ]; then
ebegin "Skipping console setup (rc_tty_number == 0)"
eend 0
return 0
fi
local x= rows= retval=0 ttydev=/dev/tty
# Set the console size to 2/3, fbkeyboard uses 1/3
ebegin "Setting console size"
[ -d /dev/vc ] && ttydev=/dev/vc/
x=1
while [ $x -le $ttyn ]; do
rows=$(stty -F $ttydev$x size | awk '{print $1}')
rows=$(($rows * 2 / 3))
if ! stty -F $ttydev$x rows $rows >/dev/null; then
retval=1
break
fi
: $(( x += 1 ))
done
eend $retval
return $retval
}
stop_post()
{
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
if [ "$ttyn" = 0 ]; then
ebegin "Skipping console setup (rc_tty_number == 0)"
eend 0
return 0
fi
local x= rows= ttydev=/dev/tty
# Reset the console size by recalculating the maximum supported rows value
ebegin "Resetting console size"
[ -d /dev/vc ] && ttydev=/dev/vc/
x=1
while [ $x -le $ttyn ]; do
rows=$(($(stty -F $ttydev$x size | awk '{print $1}') * 2))
while stty -F $ttydev$x rows $rows >/dev/null 2>/dev/null ; do
rows=$(($rows * 2))
done
until stty -F $ttydev$x rows $rows >/dev/null 2>/dev/null ; do
: $((rows--))
done
: $(( x += 1 ))
done
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment