-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc6362e
commit 810bdc7
Showing
12 changed files
with
508 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,284 @@ | ||
<html> | ||
|
||
<head> | ||
<script src="fontawesome.js"></script> | ||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="../scroll.css" id="style"> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
font-family: Inter; | ||
user-select: none; | ||
} | ||
|
||
input[type='file'] { | ||
font-size: 0; | ||
padding: 0px; | ||
} | ||
|
||
.div { | ||
text-align: left; | ||
background: none; | ||
padding: 0; | ||
height: 23px; | ||
} | ||
|
||
#applist { | ||
width: 87.5%; | ||
padding: 15px; | ||
} | ||
|
||
::file-selector-button { | ||
color: white; | ||
font-size: initial; | ||
font-family: Inter; | ||
background: none; | ||
border: none; | ||
float: left; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.content { | ||
width: 80vw; | ||
height: 100vh; | ||
float: right; | ||
background: lightgray; | ||
padding: 15px; | ||
box-sizing: border-box; | ||
overflow: auto; | ||
} | ||
|
||
.applistsidebar { | ||
width: 20vw; | ||
height: 100vh; | ||
position: fixed !important; | ||
z-index: 2; | ||
float: left; | ||
overflow: auto; | ||
background-color: #1d1d1ddd; | ||
backdrop-filter: blur(10px); | ||
color: white; | ||
overflow-x: hidden; | ||
padding: 10px; | ||
box-sizing: border-box; | ||
} | ||
|
||
input { | ||
background: none; | ||
border: none; | ||
border-radius: 2.5px; | ||
padding: 2px; | ||
transition: all 0.1s ease; | ||
color: white; | ||
} | ||
|
||
summary { | ||
font-weight: bold; | ||
} | ||
|
||
button, | ||
input { | ||
background: lightgray; | ||
border: #767676 solid 1px; | ||
border-radius: 2.5px; | ||
padding: 5px; | ||
transition: all 0.1s ease; | ||
} | ||
|
||
.content button:hover, | ||
input:hover { | ||
background: rgb(192, 192, 192); | ||
border: #767676 solid 1px; | ||
border-radius: 2.5px; | ||
transition: all 0.1s ease; | ||
} | ||
|
||
.content button:active, | ||
input:active { | ||
background: gray; | ||
border: #1d1d1d solid 1px; | ||
border-radius: 2.5px; | ||
transition: all 0.1s ease; | ||
} | ||
|
||
.card img { | ||
width: 10vw; | ||
margin-bottom: 10px; | ||
aspect-ratio: 1/1; | ||
} | ||
|
||
.card { | ||
margin-right: 10px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
fieldset { | ||
padding: 10px; | ||
border-radius: 5px; | ||
} | ||
|
||
input { | ||
color: black; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body id="body"> | ||
<section> | ||
<div class="div"> | ||
<div class="content"> | ||
<fieldset> | ||
<legend>Background</legend> | ||
<button onclick="bg('bg.jpg')">Normal</button><br><br> | ||
<button onclick="bg('background/citywater.png')">City With Water</button><br><br> | ||
<button onclick="bg('background/Flowers.png')">Flowers</button><br><br> | ||
<button onclick="bg('background/Boardwalk.png')">Boardwalk</button><br><br> | ||
<button onclick="bg('https://source.unsplash.com/1600x900/?landscape')">Random</button><br><br> | ||
<button onclick="document.getElementById('file-input').click()">Custom</button> | ||
<input type="file" accept="image/*" id="file-input" onchange="custom_bg(event)" hidden> | ||
</fieldset> | ||
|
||
<fieldset> | ||
<legend>Display</legend> | ||
<button onclick="zoom(-0.25)">-</button> | ||
<button id="zoomMeter">1</button> | ||
<button onclick="zoom(0.25)">+</button> | ||
</fieldset> | ||
|
||
<fieldset> | ||
<legend>Themes</legend> | ||
<button onclick="theme1()">Default</button><br><br> | ||
<input id="cssimport" placeholder="Import Theme"></input> <button | ||
onclick="cssimport()">Import</button> | ||
</fieldset> | ||
|
||
<fieldset> | ||
<legend>Footer</legend> | ||
<input id="changelogo" placeholder="Customize menu launch icon"></input> <button | ||
onclick="changelogo()">Change</button><br><br> | ||
<button onclick="iconstyle('left')">Left align icons</button> | ||
<button onclick="iconstyle('center')">Center icons</button> | ||
</fieldset> | ||
|
||
<fieldset> | ||
<legend>Experimental</legend> | ||
<input id="notifybeta" placeholder="Write a notification"></input> <button | ||
onclick="notifybeta()">Notify</button> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="applistsidebar"> | ||
<H4 style="padding:5px; margin-bottom: 5px;"><i class="fa-solid fa-paint-roller"></i> Background</H4> | ||
<H4 style="padding:5px; margin-bottom: 5px;"><i class="fa-solid fa-display"></i> Display</H4> | ||
<H4 style="padding:5px; margin-bottom: 5px;"><i class="fa-solid fa-palette"></i> Themes</H4> | ||
<H4 style="padding:5px; margin-bottom: 5px;"><i class="fa-solid fa-rectangle-list"></i> Footer</H4> | ||
<h4 style="padding:5px; margin-bottom: 5px;"><i class="fa-solid fa-flask"></i> Experimental</h4> | ||
</div> | ||
</div> | ||
</section> | ||
</body> | ||
|
||
<script> | ||
const remote = require('@electron/remote'); | ||
const app = remote.app; | ||
const configDir = app.getPath('userData'); | ||
const desktopConfig = require(configDir + '/desktopconfig.json'); | ||
const fs = require("fs") | ||
|
||
document.getElementById("zoomMeter").innerText = desktopConfig.zoomVal + 1 | ||
|
||
function isEmptyOrSpaces(str) { | ||
return str === null || str.match(/^ *$/) !== null; | ||
} | ||
|
||
function notifybeta() { | ||
notificationvar = document.getElementById('notifybeta').value; | ||
kasiusAPI.notify(notificationvar, "", false) | ||
} | ||
|
||
function zoom(val) { | ||
document.getElementById("zoomMeter").innerText = desktopConfig.zoomVal + val + 1 | ||
|
||
var obj = (desktopConfig); | ||
obj.zoomVal += val; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
console.log(jsonStr) | ||
|
||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
|
||
//background | ||
function bg(background) { | ||
var obj = (desktopConfig); | ||
obj.backgroundImage = background; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
console.log(jsonStr) | ||
|
||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
|
||
//custom bg | ||
function custom_bg(event) { | ||
var reader = new FileReader(); | ||
reader.onload = function () { | ||
var obj = (desktopConfig); | ||
obj.backgroundImage = reader.result; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
console.log(jsonStr) | ||
|
||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
reader.readAsDataURL(event.target.files[0]); | ||
} | ||
|
||
//Color scheme | ||
async function cssimport() { | ||
b = document.getElementById("cssimport").value; | ||
if (isEmptyOrSpaces(b)) { | ||
document.getElementById("cssimport").value = '' | ||
return | ||
}; | ||
|
||
let fetching = await fetch(b) | ||
|
||
var obj = (desktopConfig); | ||
obj.theme = b; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
|
||
//themes | ||
function theme1() { | ||
var obj = (desktopConfig); | ||
obj.theme = "style.css"; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
|
||
//footer | ||
async function changelogo() { | ||
c = document.getElementById("changelogo").value; | ||
if (isEmptyOrSpaces(b)) { | ||
document.getElementById("cssimport").value = '' | ||
return | ||
}; | ||
|
||
let fetching = await fetch(c) | ||
|
||
var obj = (desktopConfig); | ||
obj.footerIcon = c; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
|
||
function iconstyle(style) { | ||
var obj = (desktopConfig); | ||
obj.iconStyle = style; | ||
jsonStr = JSON.stringify(obj, null, "\t"); | ||
fs.writeFileSync(configDir + '/desktopconfig.json', jsonStr); | ||
} | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.