Merge branch 'master' of github.com:mightypanders/dotfiles
This commit is contained in:
commit
8e3ef68a8c
82
startpage-minimal/index.html
Normal file
82
startpage-minimal/index.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Startpage</title>
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
align-items: center;
|
||||||
|
color: #313131;
|
||||||
|
display: flex;
|
||||||
|
font: 22px "Courier New", Courier, monospace;
|
||||||
|
height: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
margin: 1em;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus,
|
||||||
|
a:hover {
|
||||||
|
color: #1d81b2
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
display: grid;
|
||||||
|
grid-row-gap: 1em;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
margin: 0 1em;
|
||||||
|
min-width: 24em;
|
||||||
|
padding: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
li:first-child {
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 2px solid #313131;
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<nav>
|
||||||
|
<h1>Geht so</h1>
|
||||||
|
<ul>
|
||||||
|
<li>General</li>
|
||||||
|
<li><a href="https://reddit.com/r/startpages">/r/startpages</a></li>
|
||||||
|
<li><a href="https://reddit.com/r/unixporn">/r/unixporn</a></li>
|
||||||
|
<li><a href="https://reddit.com/r/sffpc">/r/sffpc</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<img src="https://i.ibb.co/3TP4CJt/cosy.png">
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* @licstart The following is the entire license notice for the
|
* @licstart The following is the entire license notice for the
|
||||||
* JavaScript code in this page.
|
* JavaScript code in this page.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Jaume Fuster i Claris
|
* Copyright (C) 2018 Jaume Fuster i Claris
|
||||||
@ -28,36 +28,38 @@
|
|||||||
// "Thus, programs must be written for people to read, and only incidentally for machines to execute."
|
// "Thus, programs must be written for people to read, and only incidentally for machines to execute."
|
||||||
// TODO: Commenting.
|
// TODO: Commenting.
|
||||||
|
|
||||||
|
|
||||||
// ---------- CONFIGURATION ----------
|
// ---------- CONFIGURATION ----------
|
||||||
|
|
||||||
// div.innerHTML : {a.innerHTML : a.href}
|
// div.innerHTML : {a.innerHTML : a.href}
|
||||||
var sites = {
|
var sites = {
|
||||||
"E-Mail": {
|
"E-Mail": {
|
||||||
"GMail" : "https://mail.google.com/mail/u/0/",
|
GMail: "https://mail.google.com/mail/u/0/",
|
||||||
"Posteo" : "https://www.posteo.de",
|
Posteo: "https://www.posteo.de",
|
||||||
"realcore" : "https://outlook.office365.com/mail/inbox",
|
realcore: "https://outlook.office365.com/mail/inbox",
|
||||||
"gCal" : "https://calendar.google.com/calendar/r",
|
gCal: "https://calendar.google.com/calendar/r",
|
||||||
"Keep" : "https://keep.google.com/u/0/"
|
Keep: "https://keep.google.com/u/0/",
|
||||||
},
|
},
|
||||||
"Work": {
|
Work: {
|
||||||
"gitlab" : "https://gitlab.com/nutmountain/landgard?sort=updated_desc",
|
gitlab: "https://gitlab.com/nutmountain/landgard?sort=updated_desc",
|
||||||
"enfore api docs" : "https://docs.apis.enfore.com/",
|
"enfore api docs": "https://docs.apis.enfore.com/",
|
||||||
"n4 daily" : "https://zoom.us/j/274186354?pwd=Z29yamZaZ3dHV2ZOM1o2UkVHVUdpQT09",
|
"n4 daily":
|
||||||
"apex" : "https://18.185.159.119:8443/ords/f?p=123:LOGIN_DESKTOP:15410784571178:::::",
|
"https://zoom.us/j/274186354?pwd=Z29yamZaZ3dHV2ZOM1o2UkVHVUdpQT09",
|
||||||
"aws" : "https://us-east-1.signin.aws.amazon.com/oauth?SignatureVersion=4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJMOATPLHVSJ563XQ&X-Amz-Date=2019-10-15T15%3A01%3A16.654Z&X-Amz-Signature=5cd9c455e673d043421f5bc47b87c61a438cd5b85d808f85e6b3304f0ef6c2de&X-Amz-SignedHeaders=host&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fconsole%2Fhome%3Fstate%3DhashArgs%2523%26isauthcode%3Dtrue&response_type=code&state=hashArgs%23",
|
apex:
|
||||||
"rc-intranet" : "https://realcorevv.sharepoint.com/sites/RC-Intranet/",
|
"https://18.185.159.119:8443/ords/f?p=123:LOGIN_DESKTOP:15410784571178:::::",
|
||||||
"food" : "https://www.rge-essen.de/dienstleistungen/gastronomie/speiseplaene.html"
|
aws:
|
||||||
},
|
"https://us-east-1.signin.aws.amazon.com/oauth?SignatureVersion=4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJMOATPLHVSJ563XQ&X-Amz-Date=2019-10-15T15%3A01%3A16.654Z&X-Amz-Signature=5cd9c455e673d043421f5bc47b87c61a438cd5b85d808f85e6b3304f0ef6c2de&X-Amz-SignedHeaders=host&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fconsole%2Fhome%3Fstate%3DhashArgs%2523%26isauthcode%3Dtrue&response_type=code&state=hashArgs%23",
|
||||||
"Social": {
|
"rc-intranet": "https://realcorevv.sharepoint.com/sites/RC-Intranet/",
|
||||||
"WhatsApp" : "https://web.whatsapp.com",
|
food:
|
||||||
"Telegram" : "https://web.telegram.org",
|
"https://www.rge-essen.de/dienstleistungen/gastronomie/speiseplaene.html",
|
||||||
"discord" : "https://discordapp.com/channels/@me",
|
},
|
||||||
"YouTube" : "https://www.youtube.com/",
|
Social: {
|
||||||
"tinder" : "https://tinder.com",
|
WhatsApp: "https://web.whatsapp.com",
|
||||||
"threema" : "https://web.threema.ch"
|
Telegram: "https://web.telegram.org",
|
||||||
},
|
discord: "https://discordapp.com/channels/@me",
|
||||||
/* "Games": { // To find the game ID check the url in the store page or the community page
|
YouTube: "https://www.youtube.com/",
|
||||||
|
threema: "https://web.threema.ch",
|
||||||
|
},
|
||||||
|
/* "Games": { // To find the game ID check the url in the store page or the community page
|
||||||
"CS:GO" : "steam://run/730",
|
"CS:GO" : "steam://run/730",
|
||||||
"Besiege" : "steam://run/346010",
|
"Besiege" : "steam://run/346010",
|
||||||
"Rust" : "steam://run/252490",
|
"Rust" : "steam://run/252490",
|
||||||
@ -65,44 +67,44 @@ var sites = {
|
|||||||
"West of Loathing" : "steam://run/597220",
|
"West of Loathing" : "steam://run/597220",
|
||||||
"POSTAL 2" : "steam://run/223470"
|
"POSTAL 2" : "steam://run/223470"
|
||||||
},*/
|
},*/
|
||||||
"News": {
|
News: {
|
||||||
"worldnews" : "https://reddit.com/r/worldnews",
|
worldnews: "https://reddit.com/r/worldnews",
|
||||||
"golem" : "https://www.golem.de/",
|
golem: "https://www.golem.de/",
|
||||||
"heise" : "https://www.heise.de/",
|
heise: "https://www.heise.de/",
|
||||||
"WAZ" : "http://www.waz.de",
|
WAZ: "http://www.waz.de",
|
||||||
"FAZ" : "http://www.faz.net",
|
FAZ: "http://www.faz.net",
|
||||||
"HackerNews" : "https://news.ycombinator.com/"
|
HackerNews: "https://news.ycombinator.com/",
|
||||||
},
|
},
|
||||||
"Programming": {
|
Programming: {
|
||||||
"/r/programming" : "https://reddit.com/r/programming",
|
"/r/programming": "https://reddit.com/r/programming",
|
||||||
"Github" : "https://github.com/",
|
Github: "https://github.com/",
|
||||||
"gisthub" : "https://gist.github.com/",
|
gisthub: "https://gist.github.com/",
|
||||||
"regex101" : "https://regex101.com/",
|
regex101: "https://regex101.com/",
|
||||||
"extensions" : "http://extensionmethod.net/csharp"
|
extensions: "http://extensionmethod.net/csharp",
|
||||||
},
|
},
|
||||||
"reddit": {
|
reddit: {
|
||||||
"linux" : "https://reddit.com/r/linux",
|
linux: "https://reddit.com/r/linux",
|
||||||
"thinkpad" : "https://reddit.com/r/thinkpad",
|
sffpc: "https://reddit.com/r/sffpc",
|
||||||
"unixporn" : "https://reddit.com/r/unixporn",
|
unixporn: "https://reddit.com/r/unixporn",
|
||||||
"games" : "https://reddit.com/r/games",
|
games: "https://reddit.com/r/games",
|
||||||
"switchhaxing" : "https://reddit.com/r/switchhaxing",
|
switchhaxing: "https://reddit.com/r/switchhaxing",
|
||||||
"switchhacks" : "https://reddit.com/r/switchhacks",
|
switchhacks: "https://reddit.com/r/switchhacks",
|
||||||
},
|
},
|
||||||
"brudi": {
|
brudi: {
|
||||||
"heimdall" : "http://brudi.xyz",
|
heimdall: "http://brudi.xyz",
|
||||||
"gitea" : "http://gitea.brudi.xyz",
|
gitea: "http://gitea.brudi.xyz",
|
||||||
"etherpad" : "http://pad.brudi.xyz",
|
etherpad: "http://pad.brudi.xyz",
|
||||||
"send" : "http://send.brudi.xyz",
|
send: "http://send.brudi.xyz",
|
||||||
"kanban" : "http://kanboard.brudi.xyz",
|
kanban: "http://kanboard.brudi.xyz",
|
||||||
"pics" : "http://pics.brudi.xyz"
|
pics: "http://pics.brudi.xyz",
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var search = {
|
var search = {
|
||||||
"default": "https://google.com/search",
|
default: "https://google.com/search",
|
||||||
"d": "https://duckduckgo.com/",
|
d: "https://duckduckgo.com/",
|
||||||
"s": "https://startpage.com/do/search"
|
s: "https://startpage.com/do/search",
|
||||||
};
|
};
|
||||||
|
|
||||||
var pivotmatch = 0;
|
var pivotmatch = 0;
|
||||||
var totallinks = 0;
|
var totallinks = 0;
|
||||||
@ -110,93 +112,100 @@ var prevregexp = "";
|
|||||||
|
|
||||||
// ---------- BUILD PAGE ----------
|
// ---------- BUILD PAGE ----------
|
||||||
function matchLinks(regex = prevregexp) {
|
function matchLinks(regex = prevregexp) {
|
||||||
totallinks = 0;
|
totallinks = 0;
|
||||||
pivotmatch = regex == prevregexp ? pivotmatch : 0;
|
pivotmatch = regex == prevregexp ? pivotmatch : 0;
|
||||||
prevregexp = regex;
|
prevregexp = regex;
|
||||||
pivotbuffer = pivotmatch;
|
pivotbuffer = pivotmatch;
|
||||||
p = document.getElementById("links");
|
p = document.getElementById("links");
|
||||||
while (p.firstChild) {
|
while (p.firstChild) {
|
||||||
p.removeChild(p.firstChild);
|
p.removeChild(p.firstChild);
|
||||||
}
|
}
|
||||||
if (regex.charAt(1) == ' ' && search.hasOwnProperty(regex.charAt(0))) {
|
if (regex.charAt(1) == " " && search.hasOwnProperty(regex.charAt(0))) {
|
||||||
document.getElementById("action").action = search[regex.charAt(0)];
|
document.getElementById("action").action = search[regex.charAt(0)];
|
||||||
document.getElementById("action").children[0].name = "q";
|
document.getElementById("action").children[0].name = "q";
|
||||||
} else {
|
} else {
|
||||||
match = new RegExp(regex ? regex : ".", "i");
|
match = new RegExp(regex ? regex : ".", "i");
|
||||||
gmatches = false; // kinda ugly, rethink
|
gmatches = false; // kinda ugly, rethink
|
||||||
for (i = 0; i < Object.keys(sites).length; i++) {
|
for (i = 0; i < Object.keys(sites).length; i++) {
|
||||||
matches = false;
|
matches = false;
|
||||||
sn = Object.keys(sites)[i];
|
sn = Object.keys(sites)[i];
|
||||||
section = document.createElement("div");
|
section = document.createElement("div");
|
||||||
section.id = sn;
|
section.id = sn;
|
||||||
section.innerHTML = sn;
|
section.innerHTML = sn;
|
||||||
section.className = "section";
|
section.className = "section";
|
||||||
inner = document.createElement("div");
|
inner = document.createElement("div");
|
||||||
for (l = 0; l < Object.keys(sites[sn]).length; l++) {
|
for (l = 0; l < Object.keys(sites[sn]).length; l++) {
|
||||||
ln = Object.keys(sites[sn])[l];
|
ln = Object.keys(sites[sn])[l];
|
||||||
if (match.test(ln)) {
|
if (match.test(ln)) {
|
||||||
link = document.createElement("a");
|
link = document.createElement("a");
|
||||||
link.href = sites[sn][ln];
|
link.href = sites[sn][ln];
|
||||||
link.innerHTML = ln;
|
link.innerHTML = ln;
|
||||||
if (!pivotbuffer++ && regex != "") {
|
if (!pivotbuffer++ && regex != "") {
|
||||||
link.className = "selected";
|
link.className = "selected";
|
||||||
document.getElementById("action").action = sites[sn][ln];
|
document.getElementById("action").action = sites[sn][ln];
|
||||||
document.getElementById("action").children[0].removeAttribute("name");
|
document
|
||||||
}
|
.getElementById("action")
|
||||||
inner.appendChild(link);
|
.children[0].removeAttribute("name");
|
||||||
matches = true;
|
}
|
||||||
gmatches = true;
|
inner.appendChild(link);
|
||||||
totallinks++;
|
matches = true;
|
||||||
}
|
gmatches = true;
|
||||||
}
|
totallinks++;
|
||||||
section.appendChild(inner);
|
}
|
||||||
matches ? p.appendChild(section) : false;
|
}
|
||||||
}
|
section.appendChild(inner);
|
||||||
if (!gmatches || regex == "") {
|
matches ? p.appendChild(section) : false;
|
||||||
document.getElementById("action").action = search["default"];
|
}
|
||||||
document.getElementById("action").children[0].name = "q";
|
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.getElementById("main").style.height =
|
||||||
|
document.getElementById("main").children[0].offsetHeight + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
document.onkeydown = function(e) {
|
document.onkeydown = function (e) {
|
||||||
switch (e.keyCode) {
|
switch (e.keyCode) {
|
||||||
case 38:
|
case 38:
|
||||||
pivotmatch = pivotmatch >= 0 ? 0 : pivotmatch + 1;
|
pivotmatch = pivotmatch >= 0 ? 0 : pivotmatch + 1;
|
||||||
matchLinks();
|
matchLinks();
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
pivotmatch = pivotmatch <= -totallinks + 1 ? -totallinks + 1 : pivotmatch - 1;
|
pivotmatch =
|
||||||
matchLinks();
|
pivotmatch <= -totallinks + 1 ? -totallinks + 1 : pivotmatch - 1;
|
||||||
break;
|
matchLinks();
|
||||||
default:
|
break;
|
||||||
break;
|
default:
|
||||||
}
|
break;
|
||||||
document.getElementById("action").children[0].focus();
|
}
|
||||||
}
|
document.getElementById("action").children[0].focus();
|
||||||
|
};
|
||||||
|
|
||||||
document.getElementById("action").children[0].onkeypress = function(e) {
|
document.getElementById("action").children[0].onkeypress = function (e) {
|
||||||
if (e.key == "ArrowDown" || e.key == "ArrowUp") {
|
if (e.key == "ArrowDown" || e.key == "ArrowUp") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
function displayClock() {
|
function displayClock() {
|
||||||
now = new Date();
|
now = new Date();
|
||||||
clock = (now.getHours() < 10 ? "0"+now.getHours() : now.getHours())+":"
|
clock =
|
||||||
+(now.getMinutes() < 10 ? "0"+now.getMinutes() : now.getMinutes())+":"
|
(now.getHours() < 10 ? "0" + now.getHours() : now.getHours()) +
|
||||||
+(now.getSeconds() < 10 ? "0"+now.getSeconds() : now.getSeconds());
|
":" +
|
||||||
document.getElementById("clock").innerHTML = clock;
|
(now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes()) +
|
||||||
|
":" +
|
||||||
|
(now.getSeconds() < 10 ? "0" + now.getSeconds() : now.getSeconds());
|
||||||
|
document.getElementById("clock").innerHTML = clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = matchLinks();
|
window.onload = matchLinks();
|
||||||
document.getElementById("action").onsubmit = function() {
|
document.getElementById("action").onsubmit = function () {
|
||||||
svalue = this.children[0].value;
|
svalue = this.children[0].value;
|
||||||
if (svalue.charAt(1) == ' ' && search.hasOwnProperty(svalue.charAt(0))) {
|
if (svalue.charAt(1) == " " && search.hasOwnProperty(svalue.charAt(0))) {
|
||||||
this.children[0].value = svalue.substring(2);
|
this.children[0].value = svalue.substring(2);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
};
|
||||||
displayClock();
|
displayClock();
|
||||||
setInterval(displayClock, 1000);
|
setInterval(displayClock, 1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user