commit cdb0a3ba1fee29f426f132f797058bd477ceb7f7 parent 0e8d0b187eaa881dce7b883332f27e5e32475b1d Author: EmDev21 <103883116+EmDev21@users.noreply.github.com> Date: Sun, 17 Apr 2022 23:06:33 +0200 Update README.md Diffstat:
M | README.md | | | 67 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- |
1 file changed, 65 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md @@ -1 +1,65 @@ -# Terminal-Startpage -\ No newline at end of file +# Terminal Startpage + +A Startpage that looks like a Terminal. + + + +# Premade commands + +reddit [subreddit] +google [search] +echo <what_you_want_to_echo> +clear + +# How to add commands ? + +To add commands, go to the commands.js file in the sources.\ +You will see some pre-made commands that you will be able to edit and you can create new ones, these commands are just functions. + +```js + +function google(cmd) { + if (!(cmd == undefined)) { + str = ""; + var parameters = cmd.split(" ").slice(1); + for (var i = 0; i < parameters.length; i++) { + str = str + "+" + parameters[i]; + } + window.open("https://www.google.com/search?q=" + str); + } else { + window.open("https://www.google.com"); + } +} + +function reddit(cmd) { + if (!(cmd == undefined)) { + window.open("https://www.reddit.com/r/" + cmd.split(" ").slice(1)[0]); + } else { + window.open("https://www.reddit.com/"); + } +} + +function clear(cmd) { + document.getElementById('wrapper').innerHTML = ""; +} + +function echo(cmd) { + block_log(cmd.split(" ").slice(1).join(" ")) +} + +``` + +# Theming + +Want to customize the look of your Startpage ?\ +We got you covered. You need to edit the terminal.css variables. + +```css + +:root { + --main-bg-color: #547c99; + --prompt-bg-color: #151515; + --text-color: #6c99bb; +} + +```