new: new ui.display.video.on_frame configuration to use fbi on framebuffer based screens
This commit is contained in:
parent
e943cfad70
commit
41ea0e0747
@ -204,6 +204,10 @@ ui:
|
||||
address: '0.0.0.0'
|
||||
origin: '*'
|
||||
port: 8080
|
||||
# command to be executed when a new png frame is available
|
||||
# for instance, to use with framebuffer based displays:
|
||||
# on_frame: 'fbi -a -d /dev/fb1 -T 1 /root/pwnagotchi.png'
|
||||
on_frame: ''
|
||||
|
||||
|
||||
# bettercap rest api configuration
|
||||
|
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import logging
|
||||
import pwnagotchi.plugins as plugins
|
||||
|
||||
@ -60,6 +61,12 @@ class Display(View):
|
||||
|
||||
def _on_view_rendered(self, img):
|
||||
web.update_frame(img)
|
||||
try:
|
||||
if self._config['ui']['display']['video']['on_frame'] != '':
|
||||
os.system(self._config['ui']['display']['video']['on_frame'])
|
||||
except Exception as e:
|
||||
logging.error("%s" % e)
|
||||
|
||||
if self._enabled:
|
||||
self._canvas = (img if self._rotation == 0 else img.rotate(self._rotation))
|
||||
if self._implementation is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user