aboutsummaryrefslogtreecommitdiff
path: root/config.hpp
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-01-25 01:09:36 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2023-01-25 01:09:36 +0100
commit0321da112a7ea32f89849a0abc532fecafa3ee14 (patch)
tree9b83ef292f953a5f52a4cf3e2139efd0f4810aca /config.hpp
parentbbd6d152e7f22013d10572985784ea4f5fb7d013 (diff)
open link even if it is tagged as open in new window
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(); });
+}