mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Add new configuration option "ui.showcursor" to enable or disable blinking cursor by name
When ui.fps is not zero, the default UI adds a blinking cursor next to the pwnagotchi name, as a verification that the display is updating. This proposed change adds a configuration option "ui.showcursor" to allow users to disable the cursor. If ui.showcursor is set to "true" in config.toml, the cursor will show, if set "false" in config, the cursor will not be shown. Default behavior if ui.showcursor is not set is maintained (cursor will show). If ui.fps is set to 0, the cursor will not be shown regardless of the ui.showcursor setting. (tested on a single pwny with showcursor unset, false, and true, multiple times) Signed-off-by: Sniffleupagus <129890632+Sniffleupagus@users.noreply.github.com>
This commit is contained in:
@ -136,6 +136,7 @@ class View(object):
|
||||
delay = 1.0 / self._config['ui']['fps']
|
||||
while True:
|
||||
try:
|
||||
if 'showcursor' not in self._config['ui'] or self._config['ui']['showcursor'] == True:
|
||||
name = self._state.get('name')
|
||||
self.set('name', name.rstrip('█').strip() if '█' in name else (name + ' █'))
|
||||
self.update()
|
||||
|
Reference in New Issue
Block a user