mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
Fix colorgeneration for musiccontrols
This commit is contained in:
parent
fcd3a3413c
commit
a72e335fc7
1 changed files with 5 additions and 2 deletions
|
|
@ -12,7 +12,8 @@ import { showMusicControls } from '../../variables.js';
|
|||
|
||||
const COMPILED_STYLE_DIR = `${GLib.get_user_cache_dir()}/ags/user/generated`
|
||||
const LIGHTDARK_FILE_LOCATION = `${GLib.get_user_cache_dir()}/ags/user/colormode.txt`;
|
||||
const lightDark = Utils.readFile(LIGHTDARK_FILE_LOCATION).trim();
|
||||
const colorMode = Utils.exec('bash -c "sed -n \'1p\' $HOME/.cache/ags/user/colormode.txt"');
|
||||
const lightDark = (colorMode == "light") ? '-l' : '';
|
||||
const COVER_COLORSCHEME_SUFFIX = '_colorscheme.css';
|
||||
var lastCoverPath = '';
|
||||
|
||||
|
|
@ -198,9 +199,11 @@ const CoverArt = ({ player, ...rest }) => {
|
|||
return;
|
||||
}
|
||||
|
||||
console.log(`${lightDark}`);
|
||||
console.log(`${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}`);
|
||||
// Generate colors
|
||||
execAsync(['bash', '-c',
|
||||
`${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' > ${App.configDir}/scss/_musicmaterial.scss ${lightDark}`])
|
||||
`source /home/avi/virtualenvs/my_project_venv/bin/activate; ${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' --mode '${colorMode}' > ${App.configDir}/scss/_musicmaterial.scss`])
|
||||
.then(() => {
|
||||
exec(`wal -i "${player.coverPath}" -n -t -s -e -q ${lightDark}`)
|
||||
exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${App.configDir}/scss/_musicwal.scss`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue