]> Sergey Matveev's repositories - nnn.git/commitdiff
Revert "Run screensaver after a period of idleness"
authorsin <sin@2f30.org>
Sat, 14 Nov 2015 14:51:29 +0000 (14:51 +0000)
committersin <sin@2f30.org>
Sat, 14 Nov 2015 14:52:22 +0000 (14:52 +0000)
This reverts commit 1e18b85e56d98ca2daeb7adc587c28f5d653a01f.

Revert until remaining issues are fixed.  The filter search expires
after 1 second of inactivity without the revert.

config.def.h
noice.c

index 80cb48c37abb5b69819967a027ae8605250f74ef..a355333108195390263411fc771aec6287560516 100644 (file)
@@ -3,8 +3,6 @@
 #define EMPTY "   "
 
 int mtimeorder = 0; /* Set to 1 to sort by time in the default case */
-int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */
-char *idlecmd = "rain"; /* The screensaver program */
 
 struct assoc assocs[] = {
        { "\\.(avi|mp4|mkv|mp3|ogg|flac|mov)$", "mplayer" },
diff --git a/noice.c b/noice.c
index ef866d04649c43a96568f99965e392c8f90286f5..7192f48e79745041db65b20f5fd74f879ef37a37 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -82,7 +82,6 @@ struct entry *dents;
 int n, cur;
 char *path, *oldpath;
 char *fltr;
-int idle;
 
 /*
  * Layout:
@@ -260,7 +259,6 @@ initcurses(void)
        intrflush(stdscr, FALSE);
        keypad(stdscr, TRUE);
        curs_set(FALSE); /* Hide cursor */
-       timeout(1000); /* One second */
 }
 
 void
@@ -316,10 +314,6 @@ nextsel(char **run)
        int c, i;
 
        c = getch();
-       if (c == -1)
-               idle++;
-       else
-               idle = 0;
 
        for (i = 0; i < LEN(bindings); i++)
                if (c == bindings[i].sym) {
@@ -885,13 +879,6 @@ moretyping:
                        initcurses();
                        break;
                }
-               /* Screensaver */
-               if (idletimeout != 0 && idle == idletimeout) {
-                       idle = 0;
-                       exitcurses();
-                       spawn(idlecmd, NULL, NULL);
-                       initcurses();
-               }
        }
 }