tweak: update config.def.h

This commit is contained in:
NunoSempere 2022-12-17 20:31:34 +01:00
parent c27525cc32
commit f8ed7f9ef7

View File

@ -10,46 +10,47 @@
*/ */
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
#include <stdbool.h>
/* See more: /* See more:
* https://webkitgtk.org/reference/webkit2gtk/stable/class.Settings.html */ * https://webkitgtk.org/reference/webkit2gtk/stable/class.Settings.html */
#define WEBKIT \ #define WEBKIT \
"enable-back-forward-navigation-gestures", true, "enable-developer-extras", true, \ "enable-back-forward-navigation-gestures", true, "enable-developer-extras", true, \
"enable-smooth-scrolling", false "enable-smooth-scrolling", false
#define GTK "gtk-application-prefer-dark-theme", true, "gtk-enable-animations", false #define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false
#define ROSE_HOMEPAGE true
#define HOME "https://lite.duckduckgo.com/html/" #define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rose-bud-personal/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://lite.duckduckgo.com/html"
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" #define SEARCH "https://lite.duckduckgo.com/html/?q=%s"
#define CACHE_DIR "/home/fenze/.cache/rose" #define CACHE_DIR "/home/your_username/.cache/rose"
#define WIDTH 1920
#define HEIGHT 1080
#define KEY(x) GDK_KEY_##x #define KEY(x) GDK_KEY_##x
#define ZOOM 1 /* Starting zoom level */ #define ZOOM 1.4 /* Starting zoom level.*/
#define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */ #define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */
#define BG_COLOR "#1E1E2E" /* or "#FEFEFE" if you are not using the dark theme. */ #define BG_COLOR "#FEFEFE" /* "#1E1E2E" */
#define WIDTH 500
#define HEIGHT 400
#define DEBUG false #define DEBUG false
typedef enum { typedef enum {
goback, goback,
goforward, goforward,
refresh, refresh,
refresh_force, refresh_force,
back_to_home, back_to_home,
toggle_fullscreen, toggle_fullscreen,
zoomin, zoomin,
zoomout, zoomout,
zoom_reset, zoom_reset,
next_tab, next_tab,
prev_tab, prev_tab,
close_tab, close_tab,
show_searchbar, show_searchbar,
hide_searchbar, hide_searchbar,
show_finder, show_finder,
finder_next, finder_next,
finder_prev finder_prev,
prettify prettify
} func; } func;
#define SFT 1 << 0 #define SFT 1 << 0
@ -57,32 +58,10 @@ typedef enum {
#define ALT 1 << 3 #define ALT 1 << 3
static struct { static struct {
unsigned mod; unsigned mod;
unsigned key; unsigned key;
func id; func id;
} keys[] = { } keys[] = {
{ CTRL, KEY(h), goback },
{ CTRL, KEY(l), goforward },
{ CTRL, KEY(r), refresh },
{ CTRL | SFT, KEY(R), refresh_force },
{ CTRL | SFT, KEY(H), back_to_home },
{ CTRL, KEY(equal), zoomin },
{ CTRL, KEY(minus), zoomout },
{ CTRL, KEY(0), zoom_reset },
{ ALT, KEY(h), prev_tab },
{ ALT, KEY(l), next_tab },
{ CTRL, KEY(w), close_tab },
{ 0x0, KEY(F11), toggle_fullscreen },
{ CTRL, KEY(e), show_searchbar },
{ CTRL, KEY(k), hide_searchbar },
{ CTRL, KEY(f), show_finder },
{ CTRL, KEY(n), finder_next },
{ CTRL | SFT, KEY(N), finder_prev },
{ CTRL, KEY(p), prettify }
};
/* For controls more akin to normal browsers, use:
{
{ CTRL, KEY(h), goback }, { CTRL, KEY(h), goback },
{ CTRL, KEY(j), goforward }, { CTRL, KEY(j), goforward },
{ CTRL, KEY(r), refresh }, { CTRL, KEY(r), refresh },
@ -93,14 +72,38 @@ static struct {
{ CTRL, KEY(0), zoom_reset }, { CTRL, KEY(0), zoom_reset },
{ CTRL, KEY(Page_Down), prev_tab }, { CTRL, KEY(Page_Down), prev_tab },
{ CTRL, KEY(Page_Up), next_tab }, { CTRL, KEY(Page_Up), next_tab },
{ CTRL, KEY(t), next_tab },
{ CTRL, KEY(w), close_tab }, { CTRL, KEY(w), close_tab },
{ 0x0, KEY(F11), toggle_fullscreen }, { 0x0, KEY(F11), toggle_fullscreen },
{ CTRL, KEY(l), show_searchbar }, { CTRL, KEY(l), show_searchbar },
{ CTRL, KEY(k), hide_searchbar },
{ CTRL, KEY(f), show_finder }, { CTRL, KEY(f), show_finder },
{ CTRL, KEY(n), finder_next }, { CTRL, KEY(n), finder_next },
{ CTRL | SFT, KEY(N), finder_prev }, { CTRL | SFT, KEY(N), finder_prev },
{ CTRL, KEY(p), prettify } { CTRL, KEY(p), prettify }
}; };
*/ /* ^ The controls above try to be similar to those in normal browsers */
/* Reference for the key shorthand: /* Reference for the key shorthand:
* <https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/gdkkeysyms.h> */ * <https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/gdkkeysyms.h> */
/* Alternative controls: {
{ CTRL, KEY(h), goback },
{ CTRL, KEY(l), goforward },
{ CTRL, KEY(r), refresh },
{ CTRL | SFT, KEY(R), refresh_force },
{ CTRL | SFT, KEY(H), back_to_home },
{ CTRL, KEY(equal), zoomin },
{ CTRL, KEY(minus), zoomout },
{ CTRL, KEY(0), zoom_reset },
{ ALT, KEY(h), prev_tab },
{ CTRL, KEY(k), hide_searchbar },
{ ALT, KEY(l), next_tab },
{ CTRL, KEY(w), close_tab },
{ 0x0, KEY(F11), toggle_fullscreen },
{ CTRL, KEY(e), show_searchbar },
{ CTRL, KEY(f), show_finder },
{ CTRL, KEY(n), finder_next },
{ CTRL | SFT, KEY(N), finder_prev },
{ CTRL, KEY(p), prettify }
};
*/