-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/buffyboard: init #358941
base: master
Are you sure you want to change the base?
nixos/buffyboard: init #358941
Conversation
[buffybox](https://gitlab.postmarketos.org/postmarketOS/buffybox/) is a suite of graphical applications for the terminal. notably for nixpkgs, this includes `buffyboard`: an on-screen framebuffer keyboard especially useful for touch-only devices like mobile phones. `buffyboard` can be built and launched (as root) with no arguments: then tab to an unused TTY (e.g. Ctrl+Alt+F2) where an on-screen keyboard should now be visible (if not, try clicking in the bottom of the terminal to force a redraw). further configuration of buffyboard is possible by editing `/etc/buffyboard.conf` or passing CLI flags.
b88c168
to
3fb36ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for packaging this!
I left a couple small comments but the code looks very good and is pretty much ready to merge as far as I'm concerned.
postmarketOS has a cool feature on the PinePhone, where you can hold a volume button and press the power button three times to get to a shell if the GUI is not responding. This package and module are the first step towards bringing this feature to NixOS. What's your use-case or motivation for this package and module?
# Desktop users are recommended to either: | ||
# 1. Stop buffyboard once your DE is started. | ||
# e.g. `services.buffyboard.unitConfig.Conflicts = [ "my-de.service" ];` | ||
# 2. Configure your DE to ignore input events from buffyboard (product-id=25209; vendor-id=26214; name=rd) | ||
# e.g. `echo 'input "26214:25209:rd" events disabled' > ~/.config/sway/config` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be too much work to implement at least one of these options for every DE in Nixpkgs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's not much of a standard for DE's. In fact, pmOS does not use buffyboard outside of tty and since they're quite niche they have the freedom to fiddle with DE's a bit
meta = with lib; { | ||
description = "A suite of graphical applications for the terminal"; | ||
homepage = "https://gitlab.postmarketos.org/postmarketOS/buffybox"; | ||
license = licenses.gpl3Plus; | ||
maintainers = with lib.maintainers; [ colinsane ]; | ||
platforms = platforms.linux; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that in your opinion buffyboard
can not be considered the main program since one may also want to use unl0kr
. Is that correct? Just making sure that you deliberately did not specify meta.mainProgram
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. is there any relation between unl0kr
from this package and the unl0kr
package, which is already in Nixpkgs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, unl0kr has been part of this suite for quite a while already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fact, if this gets merged I'll gladly remove the unl0kr package and change the service so it looks for the unl0kr binary (since buffybox includes both)
959b7dc
to
e4b038b
Compare
@Luflosi i use it as a greeter. previously i piped the larger demand for this package seems to be as a debugging tool. @MatthewCroughan wanted to review my Bonsai PR, but without a working DE that's difficult to debug on the phone. a TTY keyboard lets you debug things when you're refactoring the DE itself, it's even more useful during device bringup, when porting new devices.
for anyone interested, that would be TTYescape. have not looked into that but would be a happy user/tester if anyone pursues that :) |
[buffyboard](https://gitlab.postmarketos.org/postmarketOS/buffybox/-/tree/master/buffyboard) is the on-screen framebuffer keyboard provided by postmarketOS's buffybox project. enable this with `services.buffybox.enable = true;`: any additional settings are strictly optional. once enabled, tab to an unused TTY (e.g. Ctrl+Alt+F2) and use the mouse/touchpad/touchscreen to use the virtual keyboard. may require a manual `systemctl start buffybox` if enabled on an already-booted device. Co-authored-by: Luflosi <[email protected]>
e4b038b
to
900bd0d
Compare
buffyboard is the On-Screen Keyboard (OSK) provided by postmarketOS's buffybox project. unlike X- or Wayland-based OSKs, buffyboard renders directly to the framebuffer and injects events via libinput: this allows it to run without any Desktop Environment. the primary use-case is to make the native TTY system accessible to keyboard-less devices such as Linux tablets and mobile phones.
nix-build -A buffybox && sudo ./result/bin/buffyboard
; then tab to an unused TTY (e.g. Ctrl+Alt+F2) and use the mouse/touchpad/touchscreen to use the virtual keyboard. if no on-screen keyboard is visible, click the bottom of the TTY to force a redraw.services.buffyboard.enable = true
. a reboot orsystemctl start buffyboard.service
may be required.pleases see the note in
nixos/modules/services/hardware/buffyboard.nix
for tips to make the experience more enjoyable if deploying to a device that also runs a desktop environment.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.