aboutsummaryrefslogtreecommitdiff
path: root/snotifc.c
diff options
context:
space:
mode:
Diffstat (limited to 'snotifc.c')
-rw-r--r--snotifc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/snotifc.c b/snotifc.c
index 2261755..ac1ba84 100644
--- a/snotifc.c
+++ b/snotifc.c
@@ -508,6 +508,18 @@ void curses_handle_input(DBusConnection* conn, int ch, int* start, int* selected
(*start) = 0;
clear();
break;
+ case CTRL('d'):
+ (*selected) += ((LINES - 1) / 2);
+ (*start) += ((LINES - 1) / 2);
+ if ((*selected) >= notifs->element_count)
+ (*selected) = notifs->element_count - 1;
+ if ((*start) >= notifs->element_count - LINES + 1) {
+ (*start) = notifs->element_count - LINES + 1;
+ }
+ if ((*start) < 0)
+ (*start) = 0;
+ clear();
+ break;
case KEY_PPAGE:
(*selected) -= (LINES - 1);
(*start) -= (LINES - 1);
@@ -517,6 +529,15 @@ void curses_handle_input(DBusConnection* conn, int ch, int* start, int* selected
(*start) = 0;
clear();
break;
+ case CTRL('u'):
+ (*selected) -= ((LINES - 1) / 2);
+ (*start) -= ((LINES - 1) / 2);
+ if ((*selected) < 0)
+ (*selected) = 0;
+ if ((*start) < 0)
+ (*start) = 0;
+ clear();
+ break;
case 'G':
(*selected) = notifs->element_count - 1;
(*start) = notifs->element_count - LINES + 1;