diff --git a/config.h b/config.h index 0934854..5df0e03 100644 --- a/config.h +++ b/config.h @@ -29,5 +29,7 @@ KEYBINDS { { MODKEY, GDK_KEY_r, reload }, { MODSFT, GDK_KEY_R, reloadforce }, { NOMODK, GDK_KEY_F11, fullscreen }, - { MODSFT, GDK_KEY_H, history } + { MODSFT, GDK_KEY_H, history }, + { MODKEY, GDK_KEY_g, gotop }, + { MODSFT, GDK_KEY_G, gobottom } }; diff --git a/keyconf.h b/keyconf.h index 36adfba..c1e1880 100644 --- a/keyconf.h +++ b/keyconf.h @@ -46,5 +46,7 @@ enum { up, reload, reloadforce, - history + history, + gotop, + gobottom }; diff --git a/scripts/dmenu_rose.sh b/scripts/dmenu_rose.sh index 8cd60e0..224c91f 100755 --- a/scripts/dmenu_rose.sh +++ b/scripts/dmenu_rose.sh @@ -1,5 +1,7 @@ #!/bin/sh +# FIXME: Sometimes when new bookmark added cant open it + BOOKMARKS_PATH=~/.cache/rose/bookmarks search() diff --git a/window.c b/window.c index 184a688..fe920b4 100644 --- a/window.c +++ b/window.c @@ -181,6 +181,16 @@ static gboolean key_press_callback(RoseWindow *window, } } break; + case gotop: { + webkit_web_view_run_javascript(window->webview, "window.scrollTo(0,0);", NULL, NULL, NULL); + } break; + + case gobottom: { + webkit_web_view_run_javascript( + window->webview, + "window.scrollTo(0, document.body.scrollHeight);", + NULL, NULL, NULL); + } break; } } }