forked from Shinonome/dots-hyprland
ags: clean up and export handleStyles to command line
This commit is contained in:
@@ -8,26 +8,12 @@
|
||||
// bind = Super, Tab, exec, ags -t overview
|
||||
|
||||
// Import
|
||||
import GLib from 'gi://GLib';
|
||||
import App from 'resource:///com/github/Aylur/ags/app.js'
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'
|
||||
// Stuff
|
||||
import userOptions from './modules/.configuration/user_options.js';
|
||||
// Widgets
|
||||
import Overview from './modules/overview/main.js';
|
||||
import { COMPILED_STYLE_DIR } from './init.js';
|
||||
|
||||
const COMPILED_STYLE_DIR = `${GLib.get_user_cache_dir()}/ags/user/generated`
|
||||
Utils.exec(`mkdir -p "${GLib.get_user_state_dir()}/ags/scss"`);
|
||||
Utils.exec(`bash -c 'echo "" > ${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss'`); // reset music styles
|
||||
Utils.exec(`bash -c 'echo "" > ${GLib.get_user_state_dir()}/ags/scss/_musicmaterial.scss'`); // reset music styles
|
||||
async function applyStyle() {
|
||||
Utils.exec(`mkdir -p ${COMPILED_STYLE_DIR}`);
|
||||
Utils.exec(`sass -I "${GLib.get_user_state_dir()}/ags/scss" -I "${App.configDir}/scss/fallback" "${App.configDir}/scss/main.scss" "${COMPILED_STYLE_DIR}/style.css"`);
|
||||
App.resetCss();
|
||||
App.applyCss(`${COMPILED_STYLE_DIR}/style.css`);
|
||||
console.log('[LOG] Styles loaded')
|
||||
}
|
||||
applyStyle().catch(print);
|
||||
handleStyles(true);
|
||||
|
||||
App.config({
|
||||
css: `${COMPILED_STYLE_DIR}/style.css`,
|
||||
@@ -36,4 +22,3 @@ App.config({
|
||||
Overview(),
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user