aboutsummaryrefslogtreecommitdiff
path: root/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'config.hpp')
-rw-r--r--config.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/config.hpp b/config.hpp
index e9c9fa1..f3337a1 100644
--- a/config.hpp
+++ b/config.hpp
@@ -1,4 +1,18 @@
+
const bool enable_smooth_scrollig = true;
-const char search_engine[] = "https://searx.org/?q=";
+const char search_engine[] = "https://duckduckgo.com/?q=";
const char dmenu_args[] = "-s 0";
const unsigned scroll_speed = 100;
+
+#define MODIFIER Qt::ALT
+
+void register_shortcuts(QWidget *view) {
+ new QShortcut(QKeySequence(MODIFIER + Qt::Key_O), view, [=]() { search(); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::Key_J), view, [=]() { page_scroll(scroll_speed); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::Key_K), view, [=]() { page_scroll(-scroll_speed); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::Key_G), view, [=]() { goto_end(false); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::SHIFT + Qt::Key_G), view, [=]() { goto_end(true); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::SHIFT + Qt::Key_H), view, [=]() { history_move(true); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::SHIFT + Qt::Key_L), view, [=]() { history_move(false); });
+ new QShortcut(QKeySequence(MODIFIER + Qt::Key_R), view, [=]() { reload(); });
+}