diff --git a/.gitignore b/.gitignore index 3d736e0..73cdee1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -startpage/errorlog.txt -*.swp +startpage/errorlog.txt +*.swp diff --git a/LICENSE b/LICENSE index ef6aaaf..2877e3a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2016 Markus Dieckmann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2016 Markus Dieckmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index b4d3fe8..86784c4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# dotfiles -Linux config and Startpage +# dotfiles +Linux config and Startpage diff --git a/startpage/README.md b/startpage/README.md index 31ccaec..fd0c935 100644 --- a/startpage/README.md +++ b/startpage/README.md @@ -1,4 +1,4 @@ -# [Homepage](https://danggoodcode.com/startpage) -Homepage avaliable for use now at danggoodcode.com/startpage - -![homepage](https://i.redd.it/cbnzq36zj3601.gif) +# [Homepage](https://danggoodcode.com/startpage) +Homepage avaliable for use now at danggoodcode.com/startpage + +![homepage](https://i.redd.it/cbnzq36zj3601.gif) diff --git a/startpage/cockpit.svg b/startpage/cockpit.svg deleted file mode 100644 index 1bc2858..0000000 --- a/startpage/cockpit.svg +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/startpage/deluge.svg b/startpage/deluge.svg deleted file mode 100644 index 69e5977..0000000 --- a/startpage/deluge.svg +++ /dev/null @@ -1,402 +0,0 @@ - - - diff --git a/startpage/dome.js b/startpage/dome.js new file mode 100644 index 0000000..5b42ab7 --- /dev/null +++ b/startpage/dome.js @@ -0,0 +1,187 @@ +/* + * + * @licstart The following is the entire license notice for the + * JavaScript code in this page. + * + * Copyright (C) 2018 Jaume Fuster i Claris + * + * + * The JavaScript code in this page is free software: you can + * redistribute it and/or modify it under the terms of the GNU + * General Public License (GNU GPL) as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) + * any later version. The code is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. + * + * As additional permission under GNU GPL version 3 section 7, you + * may distribute non-source (e.g., minimized or compacted) forms of + * that code without the copy of the GNU GPL normally required by + * section 4, provided you include this license notice and a URL + * through which recipients can access the Corresponding Source. + * + * @licend The above is the entire license notice + * for the JavaScript code in this page. + * + */ + +// "Thus, programs must be written for people to read, and only incidentally for machines to execute." +// TODO: Commenting. + + +// ---------- CONFIGURATION ---------- + +// div.innerHTML : {a.innerHTML : a.href} +var sites = { + "E-Mail": { + "GMail" : "https://mail.google.com/mail/u/0/", + "Posteo" : "https://www.posteo.de", + "edata" : "https://mail.edatasystems.de" + }, + "Work": { + "TFS" : "http://192.168.30.70:8080/tfs", + "wiki" : "http://192.168.0.10:83", + "ds.de/admin" : "http://192.168.100.55/administrator", + "mari" : "https://mari.edatasystems.de" + }, + "Social": { + "WhatsApp" : "https://web.whatsapp.com", + "Telegram" : "https://web.telegram.com", + "discord" : "https://discordapp.com/channels/@me", + "YouTube" : "https://www.youtube.com/", + }, + "Games": { // To find the game ID check the url in the store page or the community page + "CS:GO" : "steam://run/730", + "Besiege" : "steam://run/346010", + "Rust" : "steam://run/252490", + "Insurgency" : "steam://run/222880", + "West of Loathing" : "steam://run/597220", + "POSTAL 2" : "steam://run/223470" + }, + "News": { + "worldnews" : "https://reddit.com/r/worldnews", + "golem" : "https://www.golem.de/", + "heise" : "https://www.heise.de/", + "WAZ" : "http://www.waz.de", + "FAZ" : "http://www.faz.net", + "HackerNews" : "https://news.ycombinator.com/" + }, + "Programming": { + "/r/programming" : "https://reddit.com/r/programming", + "Github" : "https://github.com/", + "gisthub" : "https://gist.github.com/", + "regex101" : "https://regex101.com/", + "extensions" : "http://extensionmethod.net/csharp" + }, + "reddit": { + "linux" : "https://reddit.com/r/linux", + "thinkpad" : "https://reddit.com/r/thinkpad", + "unixporn" : "https://reddit.com/r/unixporn", + "games" : "https://reddit.com/r/games", + "switchhaxing" : "https://reddit.com/r/switchhaxing", + "switchhacks" : "https://reddit.com/r/switchhacks", + } + }; + +var search = { + "default": "https://google.com/search", + "d": "https://duckduckgo.com/", + "s": "https://startpage.com/do/search" + }; + +var pivotmatch = 0; +var totallinks = 0; +var prevregexp = ""; + +// ---------- BUILD PAGE ---------- +function matchLinks(regex = prevregexp) { + totallinks = 0; + pivotmatch = regex == prevregexp ? pivotmatch : 0; + prevregexp = regex; + pivotbuffer = pivotmatch; + p = document.getElementById("links"); + while (p.firstChild) { + p.removeChild(p.firstChild); + } + if (regex.charAt(1) == ' ' && search.hasOwnProperty(regex.charAt(0))) { + document.getElementById("action").action = search[regex.charAt(0)]; + document.getElementById("action").children[0].name = "q"; + } else { + match = new RegExp(regex ? regex : ".", "i"); + gmatches = false; // kinda ugly, rethink + for (i = 0; i < Object.keys(sites).length; i++) { + matches = false; + sn = Object.keys(sites)[i]; + section = document.createElement("div"); + section.id = sn; + section.innerHTML = sn; + section.className = "section"; + inner = document.createElement("div"); + for (l = 0; l < Object.keys(sites[sn]).length; l++) { + ln = Object.keys(sites[sn])[l]; + if (match.test(ln)) { + link = document.createElement("a"); + link.href = sites[sn][ln]; + link.innerHTML = ln; + if (!pivotbuffer++ && regex != "") { + link.className = "selected"; + document.getElementById("action").action = sites[sn][ln]; + document.getElementById("action").children[0].removeAttribute("name"); + } + inner.appendChild(link); + matches = true; + gmatches = true; + totallinks++; + } + } + section.appendChild(inner); + matches ? p.appendChild(section) : false; + } + if (!gmatches || regex == "") { + document.getElementById("action").action = search["default"]; + document.getElementById("action").children[0].name = "q"; + } + } + document.getElementById("main").style.height = document.getElementById("main").children[0].offsetHeight+"px"; +} + +document.onkeydown = function(e) { + switch (e.keyCode) { + case 38: + pivotmatch = pivotmatch >= 0 ? 0 : pivotmatch + 1; + matchLinks(); + break; + case 40: + pivotmatch = pivotmatch <= -totallinks + 1 ? -totallinks + 1 : pivotmatch - 1; + matchLinks(); + break; + default: + break; + } + document.getElementById("action").children[0].focus(); +} + +document.getElementById("action").children[0].onkeypress = function(e) { + if (e.key == "ArrowDown" || e.key == "ArrowUp") { + return false; + } +} + +function displayClock() { + now = new Date(); + clock = (now.getHours() < 10 ? "0"+now.getHours() : now.getHours())+":" + +(now.getMinutes() < 10 ? "0"+now.getMinutes() : now.getMinutes())+":" + +(now.getSeconds() < 10 ? "0"+now.getSeconds() : now.getSeconds()); + document.getElementById("clock").innerHTML = clock; +} + +window.onload = matchLinks(); +document.getElementById("action").onsubmit = function() { + svalue = this.children[0].value; + if (svalue.charAt(1) == ' ' && search.hasOwnProperty(svalue.charAt(0))) { + this.children[0].value = svalue.substring(2); + } + return true; +} +displayClock(); +setInterval(displayClock, 1000); diff --git a/startpage/emby.png b/startpage/emby.png deleted file mode 100644 index 39da53d..0000000 Binary files a/startpage/emby.png and /dev/null differ diff --git a/startpage/font/Montserrat-Regular.otf b/startpage/font/Montserrat-Regular.otf new file mode 100644 index 0000000..c1d1ee3 Binary files /dev/null and b/startpage/font/Montserrat-Regular.otf differ diff --git a/startpage/font/SIL Open Font License.txt b/startpage/font/SIL Open Font License.txt new file mode 100644 index 0000000..5687c00 --- /dev/null +++ b/startpage/font/SIL Open Font License.txt @@ -0,0 +1,43 @@ +Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/startpage/glances.png b/startpage/glances.png deleted file mode 100644 index 6bb7623..0000000 Binary files a/startpage/glances.png and /dev/null differ diff --git a/startpage/index.html b/startpage/index.html index 63b8fd9..198c9b4 100644 --- a/startpage/index.html +++ b/startpage/index.html @@ -1,264 +1,71 @@ - - - -
- - - - -