From 991054675e7a1b2f1525e606a489560b64bdbdc5 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Fri, 4 Jan 2019 02:35:22 +0100 Subject: Created the repo. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..b04c32c --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Taamas' Mainpage +A locally hosted webpage to use as a browser home page. + +## Description +This is a simple, minimalist mainpage. It consists of a title, a background and some buttons for search fields in selected webpages. When a button is clicked, the corresponding search box appears and the others are hidden. + +## Configuration +For the mainpage to work, the home page of the browser must be set to the path of `index.html`, for example `file:///home/username/.mainpage/index.html`. + +The background image to be loaded must be named `bg.jpg` and be located in a folder named `img` which has to be in the same folder as `index.html`. This can be customized editing the `background-image: url(../img/bg.jpg);` line in `css/style.css`. + +To change the title, edit the `

Taamas' mainpage

` line in `index.html`. + +The search fields loaded are determined by a file in the root of the page directory named `urls`. The syntax of given urls is as follows: +``` +'[mnemonic]': '[url]' #[name] +``` ++ `mnemonic` is the text on the button. ++ `url` is the search url and has to contain `{}`, which will be subtituted by search terms. ++ `name` can be used as a reminder of the target web name and will appear as the search box background. + +In my case, this file is generated by a command executed by vim when I save the configuration file of qutebrowser, where my preferred search engines are stored: +```bash +autocmd BufWritePost ~/.config/qutebrowser/config.py !cat .config/qutebrowser/config.py | grep -e \'.*\':\ \'.*{}.*\' | grep -v DEFAULT | sed 's/,//' | sed 's/^\ *//' > ~/.mainpage/urls +``` + +The repo includes a file named `urlsExample`. This file can be edited to configure the prefered search fields. Remember to rename it to `urls` afterwards or create a new `urls` file. The `urlsExample` serves just as a guide for syntax and is not used by the page in any way, so it can be removed safely. + -- cgit v1.2.1