Configuration files for my GNU/Linux installation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
dotfiles/discocss/.config/discocss/preload.js

32 lines
783 B

module.exports = () => {
const fs = require("fs");
const confDir = "/home/elal/.config/discocss";
const cssFile = "/home/elal/.config/discocss/custom.css";
function reload(style) {
style.innerHTML = fs.readFileSync(cssFile);
}
function inject({ document, window }) {
window.addEventListener("load", () => {
const style = document.createElement("style");
reload(style);
document.head.appendChild(style);
fs.watch(confDir, {}, () => reload(style));
});
}
inject(require("electron").webFrame.context);
};
module.exports.mw = (mainWindow) => {
mainWindow.setBackgroundColor("#00000000");
};
module.exports.mo = (options) => {
options.transparent = true;
if (process.platform === "linux") {
options.frame = true;
}
};