Skip to content

Commit

Permalink
Merge branch 'webkit2'.
Browse files Browse the repository at this point in the history
  • Loading branch information
fanglingsu committed May 26, 2017
2 parents a88f4b9 + 6ce3e09 commit eb13ee5
Show file tree
Hide file tree
Showing 79 changed files with 5,869 additions and 8,546 deletions.
10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
*.[oad]
*.lo
*.so
*.tar.gz
src/hints.js.h
src/config.h
src/vimb
src/libvimb.so
tests/*
!tests/Makefile
!tests/*.c
!tests/manual/
sandbox
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changes in vimb

## [unreleased]

### Changed

* completely rebuild of vimb on webkit2 api.
* Syntax for the font related gui settings has be changed.
Fonts have to be given as `[ font-style | font-variant | font-weight | font-stretch ]? font-size font-family`
Example `set input-font-normal=bold 10pt "DejaVu Sans Mono"` instead of
previous `set input-fg-normal=DejaVu Sans Mono Bold 10`
* Renames some settings to consequently use dashed setting names. Following
settings where changed.
```
previous setting - new setting name
--------------------------------------
cursivfont - cursiv-font
defaultfont - default-font
fontsize - font-size
hintkeys - hint-keys
minimumfontsize - minimum-font-size
monofont - monospace-font
monofontsize - monospace-font-size
offlinecache - offline-cache
useragent - user-agent
sansfont - sans-serif-font
scrollstep - scroll-step
seriffont - serif-font
statusbar - status-bar
userscripts - user-scripts
xssauditor - xss-auditor
```

### Removed

* There where many features removed during the webkit2 migration.
TODO list removed features and if they will be added again

---

## [2.12] - 2017-04-11

### Added
Expand Down Expand Up @@ -61,5 +99,6 @@
cookie file
* Fixed none POSIX `echo -n` call

[unreleased]: https://github.com/fanglingsu/vimb/compare/2.12...webkit2
[2.12]: https://github.com/fanglingsu/vimb/compare/2.11...2.12
[2.11]: https://github.com/fanglingsu/vimb/compare/2.10...2.11
79 changes: 79 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Contribute

This document contains guidelines for contributing to vimb, as well as useful
hints when doing so.

## Communication

If you wan't to discuss some feature or provide some suggestion that can't be
done very well with the github issues. You should use the [mailing list][mail]
for this purpose. Else it's a good decision to use the features provided by
github for that.

## Patching and Coding style

### File Layout

- Comment with LICENSE and possibly short explanation of file/tool
- Headers
- Macros
- Types
- Function declarations
- Include variable names
- For short files these can be left out
- Group/order in logical manner
- Global variables
- Function definitions in same order as declarations
- main

### C Features

- Do not mix declarations and code
- Do not use for loop initial declarations
- Use `/* */` for comments, not `//`

### Headers

- Place system/libc headers first in alphabetical order
- If headers must be included in a specific order comment to explain
- Place local headers after an empty line

### Variables

- Global variables not used outside translation unit should be declared static
- In declaration of pointers the `*` is adjacent to variable name, not type

### Indentation

- the code is indented by 4 spaces - if you use vim to code you can set
`:set expandtab ts=4 sts=4 sw=4`
- it's a good advice to orientate on the already available code
- if you are using `indent`, following options describe best the code style
- `--k-and-r-style`
- `--case-indentation4`
- `--dont-break-function-decl-args`
- `--dont-break-procedure-type`
- `--dont-line-up-parentheses`
- `--no-tabs`

## directories

├── doc documentation like manual page
└── src all sources to build vimb
├── scripts JavaScripts that are compiled in for various purposes
└── webextension Source files for the webextension

## compile and run

To inform vimb during compile time where the webextension should be loaded
from, the `RUNPREFIX` option can be set to a full qualified path to the
directory where the extension should be stored in.

To run vimb without installation you could run as a sandbox like this

make runsandbox

This will compile and install vimb into the local _sandbox_ folder in the
project directory.

[mail]: https://lists.sourceforge.net/lists/listinfo/vimb-users "vimb - mailing list"
72 changes: 33 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
include config.mk

SRCDIR=src
DOCDIR=doc
all: $(SRCDIR).subdir-all

all: $(TARGET)
options:
@echo "$(PROJECT) build options:"
@echo "LIBS = $(LIBS)"
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"

test: $(LIBTARGET)
@$(MAKE) $(MFLAGS) -s -C tests

clean:
@$(MAKE) $(MFLAGS) -C src clean
@$(MAKE) $(MFLAGS) -C tests clean

install: $(TARGET) $(DOCDIR)/$(MAN1)
install -d $(DESTDIR)$(BINDIR)
install -m 755 $(SRCDIR)/$(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
install -d $(DESTDIR)$(DATADIR)/applications
cp $(PROJECT).desktop $(DESTDIR)$(DATADIR)/applications
install -d $(DESTDIR)$(EXAMPLEDIR)
cp -r examples/* $(DESTDIR)$(EXAMPLEDIR)
install -d $(DESTDIR)$(MANDIR)/man1
@echo "vimb build options:"
@echo "LIBS = $(LIBS)"
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "EXTCFLAGS = $(EXTCFLAGS)"
@echo "CC = $(CC)"

install: $(SRCDIR).subdir-all
@# binary
install -d $(BINPREFIX)
install -m 755 $(SRCDIR)/vimb $(BINPREFIX)/vimb
@# extension
install -d $(LIBDIR)
install -m 644 $(SRCDIR)/webextension/$(EXTTARGET) $(LIBDIR)/$(EXTTARGET)
@# man page
install -d $(MANPREFIX)/man1
@sed -e "s!VERSION!$(VERSION)!g" \
-e "s!PREFIX!$(PREFIX)!g" \
-e "s!DATE!`date +'%m %Y'`!g" $(DOCDIR)/$(MAN1) > $(DESTDIR)$(MANDIR)/man1/$(MAN1)
-e "s!DATE!`date +'%m %Y'`!g" $(DOCDIR)/vimb.1 > $(MANPREFIX)/man1/vimb.1
@# .desktop file
install -d $(DOTDESKTOPPREFIX)
install -m 644 vimb.desktop $(DOTDESKTOPPREFIX)/vimb.desktop

uninstall:
$(RM) $(DESTDIR)$(BINDIR)/$(TARGET)
$(RM) $(DESTDIR)$(DATADIR)/applications/$(PROJECT).desktop
$(RM) $(DESTDIR)$(MANDIR)/man1/$(MAN1)
$(RM) -r $(DESTDIR)$(EXAMPLEDIR)
$(RM) $(BINPREFIX)/vimb $(DESTDIR)$(MANDIR)/man1/vimb.1 $(LIBDIR)/$(EXTTARGET)

dist: dist-clean
@echo "Creating tarball."
@git archive --format tar -o $(DIST_FILE) HEAD
clean: $(SRCDIR).subdir-clean

dist-clean:
$(RM) $(DIST_FILE)
sandbox:
$(Q)$(MAKE) RUNPREFIX=$(CURDIR)/sandbox/usr PREFIX=/usr DESTDIR=./sandbox install

$(TARGET):
@$(MAKE) $(MFLAGS) -C src $(TARGET)
runsandbox: sandbox
sandbox/usr/bin/vimb

$(LIBTARGET):
@$(MAKE) $(MFLAGS) -C src $(LIBTARGET)
%.subdir-all:
$(Q)$(MAKE) -C $*

.PHONY: clean all install uninstall options dist dist-clean test
%.subdir-clean:
$(Q)$(MAKE) -C $* clean

.PHONY: all options install uninstall clean sandbox runsandbox
61 changes: 21 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,25 @@ the project page of [Vimb][].
## Features

- it's modal like Vim
- Vim like [keybindings][] - assignable for each browser mode
- nearly every configuration can be changed at runtime with Vim like [set syntax][set]
- Vim like keybindings - assignable for each browser mode
- nearly every configuration can be changed at runtime with Vim like set syntax
- history for `ex` commands, search queries, URLs
- completions for: commands, URLs, bookmarked URLs, variable names of settings, search-queries
- [hinting][hints] - marks links, form fields and other clickable elements to
- hinting - marks links, form fields and other clickable elements to
be clicked, opened or inspected
- SSL validation against ca-certificate file
- HTTP Strict Transport Security (HSTS)
- open input or textarea with configurable external editor
- user defined URL-shortcuts with placeholders
- custom [protocol handlers][handlers]
- read it later [queue][] to collect URIs for later use
- read it later queue to collect URIs for later use
- multiple yank/paste registers
- Vim like [autocmd][]

## Packages

- Arch Linux [vimb-git][arch-git], [vimb][arch]
- [OpenBSD][]
- [NetBSD][]
- [FreeBSD][]
- [Void Linux][]
- Arch Linux [arch-git][]
- Gentoo [gentoo-git][], [gentoo][]

## Dependencies
## dependencies

- libwebkit >=1.5.0
- libgtk+-2.0
- libsoup >=2.38

On Ubuntu these dependencies can be installed by
`sudo apt-get install libsoup2.4-dev libwebkit-dev libgtk-3-dev libwebkitgtk-3.0-dev`.
- webkit2gtk-4.0 >= 2.16.x

## Install

Expand All @@ -58,31 +46,24 @@ Therefore, you should always compare your customised `config.h` with
Run the following commands to compile and install Vimb (if necessary, the last one as
root).

make clean
make // or make GTK=3 to compile against gtk3
make
make install

To build Vimb against GTK3 you can use `make GTK=3`.

# License
To run vimb without installation for testing it out use the 'runsandbox' make
target.

Information about the license is found in the file: LICENSE.
make runsandbox

# Mailing list
## Mailing list

- feature requests, issues and patches can be discussed on the [mailing list][mail]

[vimb]: http://fanglingsu.github.io/vimb/ "Vimb - Vim like browser project page"
[keybindings]: https://fanglingsu.github.io/vimb/man.html#NORMAL_MODE "vimb keybindings"
[hints]: https://fanglingsu.github.io/vimb/man.html#Hinting "vimb hinting"
[queue]: http://fanglingsu.github.io/vimb/commands.html#queue "vimb read it later queue feature"
[handlers]: http://fanglingsu.github.io/vimb/commands.html#handlers "vimb custom protocol handlers"
## license

Information about the license are found in the file LICENSE.

[arch-git]: https://github.com/fanglingsu/dotfiles/tree/master/build/vimb-git
[gentoo-git]: https://github.com/tharvik/overlay/tree/master/www-client/vimb
[gentoo]: https://github.com/hsoft/portage-overlay/tree/master/www-client/vimb
[vimb]: https://fanglingsu.github.io/vimb/ "Vimb - Vim like browser project page"
[mail]: https://lists.sourceforge.net/lists/listinfo/vimb-users "vimb - mailing list"
[OpenBSD]: http://openports.se/www/vimb "vimb - OpenBSD port"
[NetBSD]: http://pkgsrc.se/www/vimb "vimb - NetBSD package"
[autocmd]: http://fanglingsu.github.io/vimb/commands.html#autocmd "Vim like autocmd and augroup feature"
[set]: http://fanglingsu.github.io/vimb/commands.html#settings "Vim like set syntax"
[Arch-git]: https://aur.archlinux.org/packages/vimb-git/ "vimb - archlinux package"
[Arch]: https://aur.archlinux.org/packages/vimb/ "vimb - archlinux package"
[FreeBSD]: http://www.freshports.org/www/vimb/ "vimb - FreeBSD port"
[Void Linux]: https://github.com/voidlinux/void-packages/blob/master/srcpkgs/vimb/template "vimb - Void Linux package"
Loading

0 comments on commit eb13ee5

Please sign in to comment.