Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function kmscon()
- launch_terminal();
- end
- function launch_terminal()
- local term_arg = "palette=solarized"; -- run as root and append :login to act as prompt
- terminal = launch_avfeed(term_arg, "terminal",
- function(source, status)
- if (status.kind == "preroll") then
- target_displayhint(source, VRESW, VRESH, 0, {ppcm = VPPCM});
- target_fonthint(source, "myfont.ttf", 5, 3); -- will look in kmscon/fonts
- elseif (status.kind == "terminated") then
- delete_image(source);
- launch_terminal();
- elseif (status.kind == "resized") then
- show_image(source);
- resize_image(source, status.width, status.height);
- end
- end
- );
- end
- -- you need to do more magic for keylayout but...
- function kmscon_input(iotbl)
- if (valid_vid(terminal, TYPE_FRAMESERVER)) then
- target_input(terminal, iotbl);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement