From 27a4e377f3d5cd7cc531a4bd8a7753f7fd912eb3 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 9 Jul 2020 01:39:24 +0200 Subject: Fixed README.md spacing and .vimrc command example. --- README.md | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b04c32c..e2658dd 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,46 @@ # 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. + +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`. +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: +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: +* `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 +autocmd BufWritePost ~/.config/qutebrowser/config.py !grep -e \'.*\':\ \'.*{}.*\' "$HOME/.config/qutebrowser/config.py" | grep -v DEFAULT | sed 's/,//; 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. - +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