summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/draw.c b/draw.c
index daba27e..34ac2ce 100644
--- a/draw.c
+++ b/draw.c
@@ -1,6 +1,7 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
//Windows/Unix Compatability
@@ -55,6 +56,8 @@ int main(int argc, char **argv){
int prev_height; //used to check if the window was resized
int i;
+ srand(time(NULL));
+
flags_set = handle_args(argc, argv, &cfg_path);
if(flags_set[1]) return(0); //exit if help flag was passed
if(flags_set[2]) freopen("/dev/null", "w", stdout); //turn off output if quiet flag was passed
@@ -144,6 +147,11 @@ int main(int argc, char **argv){
trav_col((true_hover ? e_count : g_count)-1);
break;
+ case KEY_F(3):
+ //jump to random group/entry
+ trav_col(rand() % (true_hover ? e_count : g_count));
+ break;
+
case KEY_F(5):
//manual refresh (for debug purposes)
update_display(true);