-lariza
+chorizo
*.so
darkreader.js
*.1
.PHONY: man clean uninstall install
-all: man lariza extensions darkreader
+all: man chorizo extensions darkreader
man:
for i in man/*.scd; do \
scdoc < $$i > $$(echo "$$i" | rev | cut -f 2- -d '.' | rev); \
done
-lariza:
+chorizo:
$(CC) $(CFLAGS) $(LDFLAGS) \
- -D__NAME__=\"lariza\" \
- -D__NAME_UPPERCASE__=\"LARIZA\" \
- -o lariza src/*.c \
+ -D__NAME__=\"chorizo\" \
+ -D__NAME_UPPERCASE__=\"CHORIZO\" \
+ -DVERSION=\"v21.01\" \
+ -o chorizo src/*.c \
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0`
extensions:
for i in extensions/*.c; do \
outp=$$(echo "$$i" | sed 's/\$\.c/.so/g'); \
$(CC) $(CFLAGS) $(LDFLAGS) \
- -D__NAME__=\"lariza\" \
- -D__NAME_UPPERCASE__=\"LARIZA\" \
+ -D__NAME__=\"chorizo\" \
+ -D__NAME_UPPERCASE__=\"CHORIZO\" \
-shared -o $$outp -fPIC $$i \
`pkg-config --cflags --libs glib-2.0 webkit2gtk-4.0`; \
done
install: all
mkdir -p $(DESTDIR)$(bindir) \
$(DESTDIR)$(mandir) \
- $(DESTDIR)$(libdir)/lariza/web_extensions \
- $(DESTDIR)$(datadir)/lariza/user-scripts
+ $(DESTDIR)$(libdir)/chorizo/web_extensions \
+ $(DESTDIR)$(datadir)/chorizo/user-scripts
- cp lariza $(DESTDIR)$(bindir)/lariza
+ cp chorizo $(DESTDIR)$(bindir)/chorizo
cp man/*.1 $(DESTDIR)$(mandir)/man1/
cp man/*.5 $(DESTDIR)$(mandir)/man5/
- cp lariza.ini $(DESTDIR)/etc/lariza.ini
- cp -r extensions/*.so $(DESTDIR)$(libdir)/lariza/web_extensions/
- cp -r user-scripts/* $(DESTDIR)$(datadir)/lariza/user-scripts/
+ cp chorizo.ini $(DESTDIR)/etc/chorizo.ini
+ cp -r extensions/*.so $(DESTDIR)$(libdir)/chorizo/web_extensions/
+ cp -r user-scripts/* $(DESTDIR)$(datadir)/chorizo/user-scripts/
uninstall:
- rm -rf $(DESTDIR)$(bindir)/lariza \
- $(DESTDIR)$(libdir)/lariza \
- $(DESTDIR)$(mandir)/man1/lariza* \
- $(DESTDIR)$(mandir)/man5/lariza* \
- $(DESTDIR)$(datadir)/lariza \
- $(DESTDIR)/lariza.ini
+ rm -rf $(DESTDIR)$(bindir)/chorizo \
+ $(DESTDIR)$(libdir)/chorizo \
+ $(DESTDIR)$(mandir)/man1/chorizo* \
+ $(DESTDIR)$(mandir)/man5/chorizo* \
+ $(DESTDIR)$(datadir)/chorizo \
+ $(DESTDIR)/chorizo.ini
reinstall: uninstall install
>> user-scripts/darkreader.js
clean:
- rm -f lariza we_adblock.so
+ rm -f chorizo we_adblock.so
- _ _
- | | __ _ _ __(_)______ _
- | |/ _` | '__| |_ / _` |
- | | (_| | | | |/ / (_| |
- |_|\__,_|_| |_/___\__,_|
- https://sr.ht/~armaan/lariza
+ _ _
+ ___| |__ ___ _ __(_)_______
+ / __| '_ \ / _ \| '__| |_ / _ \
+ | (__| | | | (_) | | | |/ / (_) |
+ \___|_| |_|\___/|_| |_/___\___/
+ https://sr.ht/~armaan/chorizo
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Features:
- A WebKit2 viewport
- - An input box to change the URI or to search the current page
- - Built-in download manager
- - Indicator for web feeds
+ - An input box to change the URI, search the current page, or
+ search the web
+ - Tab management
- Full keyboard control
+ - An ini configuration file
+ - Built-in download manager
+ - Web feeds indicator
- Global content zoom
- Cooperative instances using FIFOs
- Certificate trust store
- User script support
- - Extension support
+ - Extensions
+
+Refer to the manpages chorizo(1), chorizo-usage(1), and
+chorizo-config(5), for more information.
Installation
------------
- GTK+ 3
- WebKit2 API for GTK+ 3
-lariza expects to be run on a POSIX-ish operating system.
+To generate the manpages, scdoc is required. This isn't necesary on
+release tarballs.
+
+chorizo expects to be run on a POSIX-ish operating system.
-To build the program and install it to /usr/local:
+To build and install the program:
$ make
# make install
-To use bundled web extensions, they must be copied or symlinked to the
-appropriate path. Please refer to the manpage.
-
-
-Running
--------
-
-You simply invoke the main program:
-
- $ lariza
-
-Refer to the manpage for all options.
-
Background information
----------------------
- What lariza is and what it's not
+What chorizo is and what it's not
- lariza does what I need. It won't do other things. I'm open for
+ chorizo does what I need. It won't do other things. I'm open for
contributions but please don't be upset if I turn them down -- which
might happen if it's a feature that I simply don't need.
- lariza does not compete with powerful browsers like dwb or luakit, nor
- with monstrous applications like Firefox or Chromium.
+ chorizo does not compete with powerful browsers like dwb or luakit, nor
+ with monstrous applications like Firefox or Chromium. Because under
+ the hood chorizo is powered by WebKit, however, it is on par with
+ browsers like Safari for page rendering features.
- About the name
+How is chorizo related to lariza?
- "lariza" stems from a german sentence:
+ chorizo is a fork of the lariza browser by Peter Hofmann. I wanted
+ to take it in a slightly different direction (mostly just adding
+ features not considered to be in the spirit of lariza), so I forked
+ it. The name was changed in order to reduce confusion between the
+ two browsers as they grew apart. The versioning scheme was also
+ changed from being calendar-based to following the semantic
+ versioning scheme.
- Alle anderen waren mir zu anstrengend.
- l a r i z a
-
- That phrase basically means: "It was too tiresome to deal with any
- other browser." I couldn't find a simple browser that does just what I
- need. Most of them are utterly bloated, others lack essential
- functions. Thus, I was forced to write scripts and tools and stuff to
- deal with these issues. That is what was tiresome. I don't want to
- work around bugs or nonsensical behavior anymore.
-
- So, I wrote my own browser^W WebKit GUI. WebKit does all the dirty
- work.
Copyright
---------
-MIT License, see the LICENSE file for more information.
-
-This codebase is a fork of the original lariza browser by Peter Hofmann.
\ No newline at end of file
+MIT License, see the LICENSE file for more information.
\ No newline at end of file
--- /dev/null
+# chorizo browser example configuration file. A full list of options
+# can be found in chorizo-config(5).
+
+# [browser]
+# homepage=https://duckduckgo.com
+# console_to_stdout=true
+
+# [ui]
+# tab_width=25
+# zoom_level=1.25
+
+# [keybindings]
+# download_manager=m
\ No newline at end of file
+++ /dev/null
-# lariza browser example configuration file. A full list of options
-# can be found in lariza-config(5).
-
-# [browser]
-# homepage=https://duckduckgo.com
-# console_to_stdout=true
-
-# [ui]
-# tab_width=25
-# zoom_level=1.25
-
-# [keybindings]
-# download_manager=m
\ No newline at end of file
--- /dev/null
+chorizo-config(5)
+
+# NAME
+_chorizo.ini_ - configuration file for *chorizo*(1)
+
+# DESCRIPTION
+_chorizo.ini_ is the system configuration file for the chorizo browser. The syntax
+is the standard GTK ini format. An example is provided at _/etc/chorizo.ini_, and
+user configuration should go in _~/.config/chorizo/chorizo.ini_, or your
+equivalent as set by $XDG_CONFIG_DIR. Settings must go under the relevant
+subsection.
+
+# OPTIONS
+## BROWSER
+*accepted_language*++
+ Type: string++
+ Default: NULL++
+ Set the accepted language header.
+
+*console_to_stdout*++
+ Type: boolean++
+ Default: false++
+ Print the contents of the browser console to stdout.
+
+*cookie_policy*++
+ Type: string++
+ Default: "no_third_party"++
+ Options: "all", "none", "no_third_party"++
+ Determines what cookies are accepted.
+
+*history_file*++
+ Type: string++
+ Default: none++
+ File that chorizo should save history to.
+
+*homepage*++
+ Type: string++
+ Default: "about:blank"++
+ Set the default URI for new tabs.
+
+*javascript_disabled*++
+ Type: boolean++
+ Default: false++
+ Determines whether or not JavaScript is enabled by default.
+
+*search_engine*++
+ Type: string++
+ Default: "https://duckduckgo.com?q="++
+ What search engine to use when searching with "w/".
+
+*spellcheck_disabled*++
+ Type: boolean++
+ Default: false++
+ Disable spell checking.
+
+*spellcheck_language*++
+ Type: string++
+ Default: "en_US;"++
+ Language to use for spell checking.
+
+*user_agent*++
+ Type: string++
+ Default: the WebKit default++
+ Choose a custom user agent.
+
+## UI
+*tab_width*++
+ Type: integer++
+ Default: 20++
+ Width of each tab in characters.
+
+*zoom_level*++
+ Type: double++
+ Default: 1.0++
+ Default zoom level of each page.
+
+## KEYBINDINGS
+All of these keybindings are bound to Control + key.
+
+*download_manager*++
+ Type: string++
+ Default: y++
+ Toggle the download manager.
+
+*history_back*++
+ Type: string++
+ Default: h++
+ Go back in history.
+
+*history_forwards*++
+ Type: string++
+ Default: h++
+ Go forwards in history.
+
+*location*++
+ Type: string++
+ Default: t++
+ Select the URL.
+
+*print*++
+ Type: string++
+ Default: Print++
+ Print the current page
+
+*quit*++
+ Type: string++
+ Default: g++
+ Deselect everything and focus on the webpage.
+
+*reload*++
+ Type: string++
+ Default: e++
+ Reload the current tab.
+
+*scroll_line_down*++
+ Type: string++
+ Default: j++
+ Scroll down one line.
+
+*scroll_line_up*++
+ Type: string++
+ Default: k++
+ Scroll up one line.
+
+*scroll_page_down*++
+ Type: string++
+ Default: f++
+ Scroll down one page.
+
+*scroll_page_up*++
+ Type: string++
+ Default: b++
+ Scroll up one page.
+
+*search_backwards*++
+ Type: string++
+ Default: r++
+ Search in-page backwareds.
+
+*search_forwards*++
+ Type: string++
+ Default: s++
+ Search in-page forwards.
+
+*tab_close*++
+ Type: string++
+ Default: q++
+ Close the current tab.
+
+*tab_switch_[1-9]*++
+ Type: string++
+ Default: [1-9]++
+ Group of options to jump to a particular tab, numbered from the left. Set
+ these separately from each other.
+
+*tab_previous*++
+ Type: string++
+ Default: u++
+ Focus the previous tab.
+
+*tab_mute*++
+ Type: string++
+ Default: AudioMute++
+ Mute the current tab.
+
+*tab_new*++
+ Type: string++
+ Default: w++
+ Open a new tab.
+
+*tab_next*++
+ Type: string++
+ Default: i++
+ Focus the next tab.
+
+*toggle_js*++
+ Type: string++
+ Default: o++
+ Toggle JavaScript.
+
+*web_search*++
+ Type: string++
+ Default: d++
+ Start a web search.
+
+*zoom_in*++
+ Type: string++
+ Default: =++
+ Zoom in 10%.
+
+*zoom_out*++
+ Type: string++
+ Default: -++
+ Zoom out 10%.
+
+*zoom_reset*++
+ Type: string++
+ Default: -++
+ Reset zoom to default.
--- /dev/null
+chorizo-usage(1)
+
+# NAME
+chorizo-usage - extended usage hints
+
+# DESCRIPTION
+*chorizo* is a simple web browser using GTK+ 3, GLib and WebKit2GTK+. This
+manpage contains additional hints and pointers regarding its usage.
+
+# KEYBINDINGS AND CONFIGURATION
+For this information, please refer to *chorizo-configuration*(1).
+
+# DOWNLOAD MANAGER
+Open the download manager using the appropriate hotkey. A new window listing
+your downloads will appear. Clicking on an item will remove it from the list and
+**if needed** cancel the download.
+
+There's no file manager integration, nor does *chorizo* delete, overwrite or
+resume downloads. If a file already exists, it won't be touched. Instead, the
+new file name will have a suffix such as *.1*, *.2*, *.3*, and so on.
+
+# USER-SUPPLIED JAVASCRIPT FILES
+After a page has been successfully loaded, the directory
+_~/.local/share/chorizo/user-scripts_ will be scanned and each file in it ending
+with *.js* will be run as a JavaScript file in the context of said page.
+
+*chorizo* comes with the following scripts:
+
+*hints.js*
+ Press *f* (open link in current window) or *F* (open in new window) to
+ activate link hints. After typing the characters for one of them, press
+ *Enter* to confirm. Press *Escape* to abort.
+
+*privacy-redirect.js*
+ Redirects YouTube, Reddit, etc to privacy respecting alternatives.
+
+*darkreader.js*
+ See https://darkreader.org.
+
+Those bundled scripts are automatically installed on *make install*. To use
+them, though, make sure to link them to the directory mentioned above.
+
+# WEB EXTENSIONS
+On startup, WebKit checks _~/.local/share/chorizo/web_extensions_ for any *.so*
+files. See
+<http://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/>
+this blog post for further information on these extensions.
+
+*chorizo* comes with the following extensions:
+
+*we_adblock.so*
+ Generic adblock. Reads patterns from the file _~/.config/chorizo/adblock_. Each
+ line can contain a regular expression. These expressions match
+ case-insensitive and partially, i.e.*\*foo.\** is the same as *.\*FOO.\** and
+ you can use anchors like *^https?://...*. Please refer to
+ https://developer.gnome.org/glib/stable/glib-regex-syntax.html the GLib
+ reference for more details. Lines starting with "#" are ignored.
+
+ Those bundled web extensions are automatically compiled when you run *make*
+ and installed on *make install*. To use them, though, make sure to link them
+ to the directory mentioned above.
+
+# TRUSTED CERTIFICATES
+By default, *chorizo* trusts whatever CAs are trusted by WebKit. If you wish to
+trust additional certificates, such as self-signed certificates, the first thing
+you should do is try to add the appropriate CAs to your system-wide store.
+
+If you wish to add simple exceptions, you can grab the certificate and store it
+in the directory _~/.local/share/chorizo/certs_. The filename must be equal to
+the hostname:
+
+ $ echo | openssl s_client -connect foo.de:443 | openssl x509 >foo.de
+
+This tells *chorizo* to trust the given certificate when connecting to host
+*foo.de*.
+
+Note: This is NOT equal to certificate pinning. WebKit ignores user-specified
+certificates if the server's certificate can be validated by any system-wide CA.
+
+# SEE ALSO
+*chorizo*(1), *chorizo-config*(1)
--- /dev/null
+chorizo(1)
+
+# NAME
+chorizo - simple web browser
+
+# SYNOPSIS
+*chorizo* - [-C] [_URI ..._]
+
+# DESCRIPTION
+*chorizo* is a simple web browser using GTK+ 3, GLib and WebKit2GTK+.
+
+# OPTIONS
+In addition to the standard arguments of GTK+ 3, *chorizo* knows about the
+following options:
+
+*-C*
+ Disables cooperative instances.
+
+*-v*
+ Print version and exit.
+
+After these options there can be any number of URIs specified to open.
+
+# ENVIRONMENT
+In addition to the standard variables of GTK+ 3, *chorizo* knows about the
+following environment variable:
+
+*CHORIZO_FIFO_SUFFIX*
+ Cooperative instances are implemented using a named pipe in the file
+ system. The name of this pipe usually is (at least on modern systems following
+ XDG standards: /var/run/user/$UID/chorizo.fifo-$CHORIZO_FIFO_SUFFIX
+
+ *$UID* is the id of your user. *$CHORIZO_FIFO_SUFFIX* defaults to *main*. If you
+ change this variable, you can launch several independent cooperative instances
+ of *chorizo*.
+
+# FILES
+XDG variables will be used to construct these paths.
+*~/.config/chorizo/chorizo.ini*
+ Configuration file. See *chorizo-config*(5).
+
+*~/.config/chorizo/adblock*
+ Adblock patterns. See *chorizo-usage*(1).
+
+*~/.local/share/chorizo/certs*
+ Directory where trusted certificates are stored. See *chorizo-usage*(1).
+
+~/.local/share/chorizo/user-scripts
+ Directory to store user-supplied JavaScript snippets. See *chorizo-usage*(1).
+
+~/.local/share/chorizo/web_extensions
+ Sets the directory where WebKit will look for web extensions. See
+ *chorizo-usage*(1).
+
+~/.cache/chorizo
+
+~/.cache/webkitgtk
+
+~/.local/share/webkitgtk
+ WebKitGTK will dump its caches and local storage here. It is probably wise to
+ clean those directories regularly or to mount them as *tmpfs*(5).
+
+# LICENSE
+*chorizo* is released under the MIT license. See the accompanying LICENSE file.
+
+# HISTORY
+chorizo is a fork of the lariza browser by Peter Hofmann. The project was
+started in June 2014. This fork is maintained by Armaan Bhojwani.
+
+# SEE ALSO
+*chorizo-usage*(1), *chorizo-config*(5)
+++ /dev/null
-lariza-config(5)
-
-# NAME
-_lariza.ini_ - configuration file for *lariza*(1)
-
-# DESCRIPTION
-_lariza.ini_ is the system configuration file for the lariza browser. The syntax
-is the standard GTK ini format. An example is provided at _/etc/lariza.ini_, and
-user configuration should go in _~/.config/lariza/lariza.ini_, or your
-equivalent as set by $XDG_CONFIG_DIR. Settings must go under the relevant
-subsection.
-
-# OPTIONS
-## BROWSER
-*accepted_language*++
- Type: string++
- Default: NULL++
- Set the accepted language header.
-
-*console_to_stdout*++
- Type: boolean++
- Default: false++
- Print the contents of the browser console to stdout.
-
-*cookie_policy*++
- Type: string++
- Default: "no_third_party"++
- Options: "all", "none", "no_third_party"++
- Determines what cookies are accepted.
-
-*history_file*++
- Type: string++
- Default: none++
- File that lariza should save history to.
-
-*homepage*++
- Type: string++
- Default: "about:blank"++
- Set the default URI for new tabs.
-
-*javascript_disabled*++
- Type: boolean++
- Default: false++
- Determines whether or not JavaScript is enabled by default.
-
-*search_engine*++
- Type: string++
- Default: "https://duckduckgo.com?q="++
- What search engine to use when searching with "w/".
-
-*spellcheck_disabled*++
- Type: boolean++
- Default: false++
- Disable spell checking.
-
-*spellcheck_language*++
- Type: string++
- Default: "en_US;"++
- Language to use for spell checking.
-
-*user_agent*++
- Type: string++
- Default: the WebKit default++
- Choose a custom user agent.
-
-## UI
-*tab_width*++
- Type: integer++
- Default: 20++
- Width of each tab in characters.
-
-*zoom_level*++
- Type: double++
- Default: 1.0++
- Default zoom level of each page.
-
-## KEYBINDINGS
-All of these keybindings are bound to Control + key.
-
-*download_manager*++
- Type: string++
- Default: y++
- Toggle the download manager.
-
-*history_back*++
- Type: string++
- Default: h++
- Go back in history.
-
-*history_forwards*++
- Type: string++
- Default: h++
- Go forwards in history.
-
-*location*++
- Type: string++
- Default: t++
- Select the URL.
-
-*print*++
- Type: string++
- Default: Print++
- Print the current page
-
-*quit*++
- Type: string++
- Default: g++
- Deselect everything and focus on the webpage.
-
-*reload*++
- Type: string++
- Default: e++
- Reload the current tab.
-
-*scroll_line_down*++
- Type: string++
- Default: j++
- Scroll down one line.
-
-*scroll_line_up*++
- Type: string++
- Default: k++
- Scroll up one line.
-
-*scroll_page_down*++
- Type: string++
- Default: f++
- Scroll down one page.
-
-*scroll_page_up*++
- Type: string++
- Default: b++
- Scroll up one page.
-
-*search_backwards*++
- Type: string++
- Default: r++
- Search in-page backwareds.
-
-*search_forwards*++
- Type: string++
- Default: s++
- Search in-page forwards.
-
-*tab_close*++
- Type: string++
- Default: q++
- Close the current tab.
-
-*tab_switch_[1-9]*++
- Type: string++
- Default: [1-9]++
- Group of options to jump to a particular tab, numbered from the left. Set
- these separately from each other.
-
-*tab_previous*++
- Type: string++
- Default: u++
- Focus the previous tab.
-
-*tab_mute*++
- Type: string++
- Default: AudioMute++
- Mute the current tab.
-
-*tab_new*++
- Type: string++
- Default: w++
- Open a new tab.
-
-*tab_next*++
- Type: string++
- Default: i++
- Focus the next tab.
-
-*toggle_js*++
- Type: string++
- Default: o++
- Toggle JavaScript.
-
-*web_search*++
- Type: string++
- Default: d++
- Start a web search.
-
-*zoom_in*++
- Type: string++
- Default: =++
- Zoom in 10%.
-
-*zoom_out*++
- Type: string++
- Default: -++
- Zoom out 10%.
-
-*zoom_reset*++
- Type: string++
- Default: -++
- Reset zoom to default.
+++ /dev/null
-lariza-usage(1)
-
-# NAME
-lariza-usage - extended usage hints
-
-# DESCRIPTION
-*lariza* is a simple web browser using GTK+ 3, GLib and WebKit2GTK+. This
-manpage contains additional hints and pointers regarding its usage.
-
-# KEYBINDINGS AND CONFIGURATION
-For this information, please refer to *lariza-configuration*(1).
-
-# DOWNLOAD MANAGER
-Open the download manager using the appropriate hotkey. A new window listing
-your downloads will appear. Clicking on an item will remove it from the list and
-**if needed** cancel the download.
-
-There's no file manager integration, nor does *lariza* delete, overwrite or
-resume downloads. If a file already exists, it won't be touched. Instead, the
-new file name will have a suffix such as *.1*, *.2*, *.3*, and so on.
-
-# USER-SUPPLIED JAVASCRIPT FILES
-After a page has been successfully loaded, the directory
-_~/.local/share/lariza/user-scripts_ will be scanned and each file in it ending
-with *.js* will be run as a JavaScript file in the context of said page.
-
-*lariza* comes with the following scripts:
-
-*hints.js*
- Press *f* (open link in current window) or *F* (open in new window) to
- activate link hints. After typing the characters for one of them, press
- *Enter* to confirm. Press *Escape* to abort.
-
-*privacy-redirect.js*
- Redirects YouTube, Reddit, etc to privacy respecting alternatives.
-
-*darkreader.js*
- See https://darkreader.org.
-
-Those bundled scripts are automatically installed on *make install*. To use
-them, though, make sure to link them to the directory mentioned above.
-
-# WEB EXTENSIONS
-On startup, WebKit checks _~/.local/share/lariza/web_extensions_ for any *.so*
-files. See
-<http://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/>
-this blog post for further information on these extensions.
-
-*lariza* comes with the following extensions:
-
-*we_adblock.so*
- Generic adblock. Reads patterns from the file _~/.config/lariza/adblock_. Each
- line can contain a regular expression. These expressions match
- case-insensitive and partially, i.e.*\*foo.\** is the same as *.\*FOO.\** and
- you can use anchors like *^https?://...*. Please refer to
- https://developer.gnome.org/glib/stable/glib-regex-syntax.html the GLib
- reference for more details. Lines starting with "#" are ignored.
-
- Those bundled web extensions are automatically compiled when you run *make*
- and installed on *make install*. To use them, though, make sure to link them
- to the directory mentioned above.
-
-# TRUSTED CERTIFICATES
-By default, *lariza* trusts whatever CAs are trusted by WebKit. If you wish to
-trust additional certificates, such as self-signed certificates, the first thing
-you should do is try to add the appropriate CAs to your system-wide store.
-
-If you wish to add simple exceptions, you can grab the certificate and store it
-in the directory _~/.local/share/lariza/certs_. The filename must be equal to
-the hostname:
-
- $ echo | openssl s_client -connect foo.de:443 | openssl x509 >foo.de
-
-This tells *lariza* to trust the given certificate when connecting to host
-*foo.de*.
-
-Note: This is NOT equal to certificate pinning. WebKit ignores user-specified
-certificates if the server's certificate can be validated by any system-wide CA.
-
-# SEE ALSO
-*lariza*(1), *lariza-config*(1)
+++ /dev/null
-lariza(1)
-
-# NAME
-lariza - simple web browser
-
-# SYNOPSIS
-*lariza* - [-C] [_URI ..._]
-
-# DESCRIPTION
-*lariza* is a simple web browser using GTK+ 3, GLib and WebKit2GTK+.
-
-# OPTIONS
-In addition to the standard arguments of GTK+ 3, *lariza* knows about the
-following options:
-
-*-C*
- Disables cooperative instances.
-
-After these options there can be any number of URIs specified to open.
-
-# ENVIRONMENT
-In addition to the standard variables of GTK+ 3, *lariza* knows about the
-following environment variable:
-
-*LARIZA_FIFO_SUFFIX*
- Cooperative instances are implemented using a named pipe in the file
- system. The name of this pipe usually is (at least on modern systems following
- XDG standards: /var/run/user/$UID/lariza.fifo-$LARIZA_FIFO_SUFFIX
-
- *$UID* is the id of your user. *$LARIZA_FIFO_SUFFIX* defaults to *main*. If you
- change this variable, you can launch several independent cooperative instances
- of *lariza*.
-
-# FILES
-XDG variables will be used to construct these paths.
-*~/.config/lariza/lariza.ini*
- Configuration file. See *lariza-config*(5).
-
-*~/.config/lariza/adblock*
- Adblock patterns. See *lariza-usage*(1).
-
-*~/.local/share/lariza/certs*
- Directory where trusted certificates are stored. See *lariza-usage*(1).
-
-~/.local/share/lariza/user-scripts
- Directory to store user-supplied JavaScript snippets. See *lariza-usage*(1).
-
-~/.local/share/lariza/web_extensions
- Sets the directory where WebKit will look for web extensions. See
- *lariza-usage*(1).
-
-~/.cache/lariza
-
-~/.cache/webkitgtk
-
-~/.local/share/webkitgtk
- WebKitGTK will dump its caches and local storage here. It is probably wise to
- clean those directories regularly or to mount them as *tmpfs*(5).
-
-# LICENSE
-*lariza* is released under the MIT license. See the accompanying LICENSE file.
-
-# HISTORY
-lariza was originally written by Peter Hofmann. The project was started in June
-2014. This fork is maintained by Armaan Bhojwani.
-
-# SEE ALSO
-*lariza-usage*(1), *lariza-config*(5)
G_CALLBACK(key_tablabel), c);
/* For easy access, store a reference to our label. */
- g_object_set_data(G_OBJECT(evbox), "lariza-tab-label", c->tablabel);
+ g_object_set_data(G_OBJECT(evbox), "chorizo-tab-label", c->tablabel);
/* This only shows the event box and the label inside, nothing else.
* Needed because the evbox/label is "internal" to the notebook and
return;
widg = gtk_notebook_get_tab_label(GTK_NOTEBOOK(mw.notebook), child);
- tablabel = (GtkWidget *)g_object_get_data(G_OBJECT(widg), "lariza-tab-label");
+ tablabel = (GtkWidget *)g_object_get_data(G_OBJECT(widg), "chorizo-tab-label");
text = gtk_label_get_text(GTK_LABEL(tablabel));
gtk_window_set_title(GTK_WINDOW(mw.win), text);
}
get_ini(void)
{
GKeyFileFlags flags = G_KEY_FILE_NONE;
- g_autoptr(GError) error = NULL;
config = g_key_file_new();
// Load user config
if (!g_key_file_load_from_file(config,
g_build_filename(g_get_user_config_dir(),
- __NAME__, "lariza.ini",
- NULL), flags, &error)) {
+ __NAME__, "chorizo.ini",
+ NULL), flags, NULL)) {
// Load global config
- if (!g_key_file_load_from_file(config, "/etc/lariza.ini", flags,
- &error)) {
- fprintf(stderr, "Could not load lariza.ini: %s", error->message);
+ if (!g_key_file_load_from_file(config, "/etc/chorizo.ini", flags,
+ NULL)) {
+ fprintf(stderr, "Could not load chorizo.ini");
}
}
return config;
{
int opt, i;
- gtk_init(&argc, &argv);
- get_config();
-
- while ((opt = getopt(argc, argv, "C")) != -1) {
+ while ((opt = getopt(argc, argv, "Cv")) != -1) {
switch (opt) {
case 'C':
cfg.cooperative_instances = FALSE;
break;
+ case 'v':
+ printf("%s %s\n", __NAME__, VERSION);
+ exit(0);
default:
fprintf(stderr, "Usage: "__NAME__" [OPTION]... [URI]...\n");
exit(EXIT_FAILURE);
}
}
+ gtk_init(&argc, &argv);
+ get_config();
+
if (cfg.cooperative_instances)
cooperation_setup();
-// This is NOT a core component of lariza, but an optional user script.
-// Please refer to lariza.usage(1) for more information on user scripts.
+// This is NOT a core component of chorizo, but an optional user script.
+// Please refer to chorizo.usage(1) for more information on user scripts.
// Press "f" (open link in current window) or "F" (open in new window)
// to activate link hints. After typing the characters for one of them,
// flaws. For more background on this topic, see this blog post:
// https://www.uninformativ.de/blog/postings/2020-02-24/0/POSTING-en.html
-// Based on the following, but modified for lariza and personal taste:
+// Based on the following, but modified for chorizo and personal taste:
//
// easy links for surf
// christian hahn <ch radamanthys de>, sep 2010
var col_sel, col_unsel;
var longest_id = 0;
- if (document.lariza_hints.state === "follow_new")
+ if (document.chorizo_hints.state === "follow_new")
{
col_unsel = "#DAFFAD";
col_sel = "#FF5D00";
col_sel = "#33FF00";
}
- for (var id in document.lariza_hints.labels)
+ for (var id in document.chorizo_hints.labels)
{
- var label = document.lariza_hints.labels[id];
+ var label = document.chorizo_hints.labels[id];
var bgcol = col_unsel;
longest_id = Math.max(longest_id, id.length);
- if (document.lariza_hints.box.value !== "")
+ if (document.chorizo_hints.box.value !== "")
{
- submatch = id.match("^" + document.lariza_hints.box.value);
+ submatch = id.match("^" + document.chorizo_hints.box.value);
if (submatch !== null)
{
var href_suffix = "";
var box_shadow_inner = "#B00000";
- if (id === document.lariza_hints.box.value)
+ if (id === document.chorizo_hints.box.value)
{
bgcol = col_sel;
box_shadow_inner = "red";
label.span.style.backgroundColor = bgcol;
}
- if (document.lariza_hints.box.value.length > longest_id)
+ if (document.chorizo_hints.box.value.length > longest_id)
set_state("inactive");
}
function open_match()
{
- var choice = document.lariza_hints.box.value;
- var was_state = document.lariza_hints.state;
+ var choice = document.chorizo_hints.box.value;
+ var was_state = document.chorizo_hints.state;
- var elem = document.lariza_hints.labels[choice].elem;
+ var elem = document.chorizo_hints.labels[choice].elem;
set_state("inactive"); /* Nukes labels. */
if (elem)
{
console.log("[hints] New state: " + new_state);
- document.lariza_hints.state = new_state;
+ document.chorizo_hints.state = new_state;
- if (document.lariza_hints.state === "inactive")
+ if (document.chorizo_hints.state === "inactive")
{
nuke_labels();
// Removing our box causes unwanted scrolling. Just hide it.
- document.lariza_hints.box.blur();
- document.lariza_hints.box.value = "";
- document.lariza_hints.box.style.visibility = "hidden";
+ document.chorizo_hints.box.blur();
+ document.chorizo_hints.box.value = "";
+ document.chorizo_hints.box.style.visibility = "hidden";
}
else
{
- if (document.lariza_hints.labels === null)
+ if (document.chorizo_hints.labels === null)
create_labels();
// What a terrible hack.
// input element is currently focused. So ... yup, we install an
// invisible text box (opacity 0) and focus it while follow mode
// is active.
- var box = document.lariza_hints.box;
+ var box = document.chorizo_hints.box;
if (box === null)
{
- document.lariza_hints.box = document.createElement("input");
- box = document.lariza_hints.box;
+ document.chorizo_hints.box = document.createElement("input");
+ box = document.chorizo_hints.box;
box.addEventListener("keydown", on_box_key);
box.addEventListener("input", on_box_input);
box.style.top = "0px";
box.type = "text";
- box.setAttribute("lariza_input_box", "yes");
+ box.setAttribute("chorizo_input_box", "yes");
document.body.appendChild(box);
}
function create_labels()
{
- document.lariza_hints.labels = new Object();
+ document.chorizo_hints.labels = new Object();
var selector = "a[href]:not([href=''])";
- if (document.lariza_hints.state !== "follow_new")
+ if (document.chorizo_hints.state !== "follow_new")
{
- selector += ", input:not([type=hidden]):not([lariza_input_box=yes])";
+ selector += ", input:not([type=hidden]):not([chorizo_input_box=yes])";
selector += ", textarea, select, button";
}
span.style.visibility = "hidden";
span.style.zIndex = "2147483647"; // Max for WebKit according to luakit
- document.lariza_hints.labels[label_id] = {
+ document.chorizo_hints.labels[label_id] = {
"elem": elem,
"span": span,
"parent_style": null,
function nuke_labels()
{
- for (var id in document.lariza_hints.labels)
+ for (var id in document.chorizo_hints.labels)
{
- var label = document.lariza_hints.labels[id];
+ var label = document.chorizo_hints.labels[id];
reset_parent_style(label);
label.elem.parentNode.removeChild(label.span);
}
- document.lariza_hints.labels = null;
+ document.chorizo_hints.labels = null;
}
function on_box_input(e)
return;
}
- if (document.lariza_hints.state === "inactive")
+ if (document.chorizo_hints.state === "inactive")
{
if (e.key === key_follow)
set_state("follow");
}
}
-if (document.lariza_hints === undefined)
+if (document.chorizo_hints === undefined)
{
- document.lariza_hints = new Object();
- document.lariza_hints.box = null;
- document.lariza_hints.labels = null;
- document.lariza_hints.state = "inactive";
+ document.chorizo_hints = new Object();
+ document.chorizo_hints.box = null;
+ document.chorizo_hints.labels = null;
+ document.chorizo_hints.state = "inactive";
document.addEventListener("keyup", on_window_key);