diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-01-27 16:27:22 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-01-27 16:27:22 +0100 |
| commit | 21dada59c2510cc7b040ff812108dff4fd04a06e (patch) | |
| tree | 0852413c239c030e1a19fd5761172887aee2fdac | |
| parent | 4cca3337d2f48ae69061e7ae3e9389e24dd9cd09 (diff) | |
move smooth scrolling to environment
| -rw-r--r-- | README.md | 22 | ||||
| -rw-r--r-- | config.hpp | 1 | ||||
| -rw-r--r-- | sb.cpp | 9 |
3 files changed, 17 insertions, 15 deletions
@@ -10,11 +10,21 @@ this browser is written in c++. ## Keybindings -- k : scroll up -- j : scroll down -- o : open url +- <Alt>k : scroll up +- <Alt>j : scroll down +- <Alt>o : open url -## TODO +## How to enable darkmode -- Execute Shell Commands -- add config-header-file +Put this line into your `profile`: +```sh +export QTWEBENGINE_CHROMIUM_FLAGS='--force-dark-mode' + +``` + +## How to enable smooth scrolling +Put this line into your `profile`: +```sh +export QTWEBENGINE_CHROMIUM_FLAGS='--enable-smooth-scrolling' + +``` @@ -1,5 +1,4 @@ -const bool enable_smooth_scrollig = true; const char search_engine[] = "https://searx.org/search?q="; const char dmenu_args[] = "-s 0 -b"; const unsigned scroll_speed = 100; @@ -118,14 +118,7 @@ void help(char *arg0) { int main(int argc, char **argv) { - std::vector<char*> arg(argv, argv + argc); - - if (enable_smooth_scrollig) - arg.emplace_back((char*)"--enable-smooth-scrolling"); - - int size = arg.size(); - - QApplication app(size, arg.data()); + QApplication app(argc, argv); QWebEngineProfile profile; WebEnginePage page(&profile); QProgressBar progressbar; |