From c024addd9382ac42c594723b5b0ff58d2bcb8731 Mon Sep 17 00:00:00 2001 From: PartialVolume <22084881+PartialVolume@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:15:40 +0100 Subject: [PATCH] If nwipe used within ShredOS, the d key will toggle the font size, has no action for other distributions --- src/gui.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui.c b/src/gui.c index 03776b66..b8fa735b 100644 --- a/src/gui.c +++ b/src/gui.c @@ -63,6 +63,7 @@ #include "hpa_dco.h" #include "customers.h" #include "conf.h" +#include "unistd.h" #define NWIPE_GUI_PANE 8 @@ -1349,6 +1350,19 @@ void nwipe_gui_select( int count, nwipe_context_t** c ) break; + case 'd': + + /* The d key is only meaningful for ShredOS, it toggles the fontsize */ + if( access( "/usr/bin/shredos_toggle_font_size.sh", F_OK ) == 0 ) + { + if( system( "/usr/bin/shredos_toggle_font_size.sh > /dev/null 2>&1" ) == 0 ) + { + nwipe_log( NWIPE_LOG_INFO, "Toggle font size" ); + } + } + + break; + } /* keystroke switch */ /* Check the terminal size, if the user has changed it the while loop checks for