diff options
| -rwxr-xr-x | build.sh | 1 | ||||
| -rw-r--r-- | config.def.h | 8 | ||||
| -rwxr-xr-x | rose-mklink | 2 | ||||
| -rw-r--r-- | rose.c | 7 | 
4 files changed, 13 insertions, 5 deletions
@@ -8,4 +8,5 @@ LIBS=`pkg-config --libs ${DEPS[@]}`  # Optional adblocking depends on https://github.com/jun7/wyebadblock  WYEBAB='-L/usr/lib/wyebrowser/adblock.so' +cp -f config.def.h config.h  $CC $INCS $LIBS $SRC $WYEBAB -o rose diff --git a/config.def.h b/config.def.h index fc5f0e4..8a10f74 100644 --- a/config.def.h +++ b/config.def.h @@ -27,7 +27,7 @@  #define KEY(x) GDK_KEY_##x  #define ZOOM 1	    /* Starting zoom level */  #define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */ -#define BG_COLOR "#1E1E2E" /* or e.g., "#FEFEFE" if not using dark theme */  +#define BG_COLOR "#1E1E2E" /* or e.g., "#FEFEFE" if not using dark theme */  #define WIDTH 500  #define HEIGHT 400 @@ -47,7 +47,8 @@ typedef enum {  	show_searchbar,  	show_finder,  	finder_next, -	finder_prev +	finder_prev, +	newtab  } func;  #define SFT  1 << 0 @@ -74,7 +75,8 @@ static struct {      { CTRL,	   KEY(e),     show_searchbar	 },      { CTRL,	   KEY(f),     show_finder       },      { CTRL,	   KEY(n),     finder_next       }, -    { CTRL | SFT,  KEY(N),     finder_prev	 } +    { CTRL | SFT,  KEY(N),     finder_prev	 }, +    { CTRL,        KEY(t),     newtab            }  };  /* For controls more akin to normal browsers, use:  { diff --git a/rose-mklink b/rose-mklink index a658930..2aaba72 100755 --- a/rose-mklink +++ b/rose-mklink @@ -7,7 +7,7 @@ test "$1" = "--help" || test -z "$1" && {  }  test -z "$2" || { -	[ -f "/usr/bin/$1" ] && { +	test -f "/usr/bin/$1" && {  		echo "/usr/bin/$1 already exists, remove it first"  		exit 1  	} @@ -7,7 +7,7 @@   * sublicense copies of this sotware for their own use.   * This code does not come with any warranty.   * - * Author: fenze <contact@fenze.dev> + * @author: fenze <contact@fenze.dev>   */  #include "config.h" @@ -233,8 +233,13 @@ int handle_key(func id, GtkNotebook *notebook)  		webkit_find_controller_search_previous(  		    webkit_web_view_get_find_controller(notebook_get_webview(notebook)));  		break; + +	case newtab: +		notebook_append(notebook, NULL); +		gtk_notebook_set_show_tabs(notebook, true);  	} +  	return 1;  }  | 
