forked from Shinonome/dots-hyprland
ags: no more pywal
This commit is contained in:
@@ -22,8 +22,8 @@ var lastCoverPath = '';
|
|||||||
function isRealPlayer(player) {
|
function isRealPlayer(player) {
|
||||||
return (
|
return (
|
||||||
// Remove unecessary native buses from browsers if there's plasma integration
|
// Remove unecessary native buses from browsers if there's plasma integration
|
||||||
!(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.firefox')) &&
|
// !(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.firefox')) &&
|
||||||
!(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.chromium')) &&
|
// !(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.chromium')) &&
|
||||||
// playerctld just copies other buses and we don't need duplicates
|
// playerctld just copies other buses and we don't need duplicates
|
||||||
!player.busName.startsWith('org.mpris.MediaPlayer2.playerctld') &&
|
!player.busName.startsWith('org.mpris.MediaPlayer2.playerctld') &&
|
||||||
// Non-instance mpd bus
|
// Non-instance mpd bus
|
||||||
@@ -209,8 +209,15 @@ const CoverArt = ({ player, ...rest }) => {
|
|||||||
execAsync(['bash', '-c',
|
execAsync(['bash', '-c',
|
||||||
`${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' --mode ${darkMode.value ? 'dark' : 'light'} > ${GLib.get_user_state_dir()}/ags/scss/_musicmaterial.scss`])
|
`${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' --mode ${darkMode.value ? 'dark' : 'light'} > ${GLib.get_user_state_dir()}/ags/scss/_musicmaterial.scss`])
|
||||||
.then(() => {
|
.then(() => {
|
||||||
exec(`${App.configDir}/scripts/color_generation/pywal.sh -i "${player.coverPath}" -n -t -s -e -q ${darkMode.value ? '' : '-l'}`)
|
const dominantColor = `#${Utils.exec(`sh -c "magick '${coverPath}' -scale 1x1\\! -format '%[fx:int(255*r+.5)],%[fx:int(255*g+.5)],%[fx:int(255*b+.5)]' info: | sed 's/,/\\n/g' | xargs -L 1 printf '%02x' ; echo"`)}`
|
||||||
exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss`);
|
console.log(dominantColor);
|
||||||
|
// exec(`${App.configDir}/scripts/color_generation/pywal.sh -i "${player.coverPath}" -n -t -s -e -q ${darkMode.value ? '' : '-l'}`)
|
||||||
|
// exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss`);
|
||||||
|
exec(`cp '${App.configDir}/scripts/templates/wal/_musicwal.scss' '${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss'`);
|
||||||
|
exec(`sed -i 's/{{dominantColor}}/${dominantColor}/g' '${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss'`)
|
||||||
|
exec(`sed -i 's/{{backgroundColor}}/${darkMode.value ? "#0E1415" : "#EEF4F4"}/g' '${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss'`)
|
||||||
|
exec(`sed -i 's/{{foregroundColor}}/${darkMode.value ? "#EEF4F4" : "#0E1415"}/g' '${GLib.get_user_state_dir()}/ags/scss/_musicwal.scss'`)
|
||||||
|
|
||||||
exec(`sass -I "${GLib.get_user_state_dir()}/ags/scss" -I "${App.configDir}/scss/fallback" "${App.configDir}/scss/_music.scss" "${stylePath}"`);
|
exec(`sass -I "${GLib.get_user_state_dir()}/ags/scss" -I "${App.configDir}/scss/fallback" "${App.configDir}/scss/_music.scss" "${stylePath}"`);
|
||||||
Utils.timeout(200, () => {
|
Utils.timeout(200, () => {
|
||||||
// self.attribute.showImage(self, coverPath)
|
// self.attribute.showImage(self, coverPath)
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Special
|
||||||
|
$background: {{backgroundColor}};
|
||||||
|
$foreground: {{foregroundColor}};
|
||||||
|
$cursor: {{foregroundColor}};
|
||||||
|
|
||||||
|
// Colors
|
||||||
|
$color0: {{dominantColor}};
|
||||||
|
$color1: {{dominantColor}};
|
||||||
|
$color2: {{dominantColor}};
|
||||||
|
$color3: {{dominantColor}};
|
||||||
|
$color4: {{dominantColor}};
|
||||||
|
$color5: {{dominantColor}};
|
||||||
|
$color6: {{dominantColor}};
|
||||||
|
$color7: {{dominantColor}};
|
||||||
|
$color8: {{dominantColor}};
|
||||||
|
$color9: {{dominantColor}};
|
||||||
|
$color10: {{dominantColor}};
|
||||||
|
$color11: {{dominantColor}};
|
||||||
|
$color12: {{dominantColor}};
|
||||||
|
$color13: {{dominantColor}};
|
||||||
|
$color14: {{dominantColor}};
|
||||||
|
$color15: {{dominantColor}};
|
||||||
@@ -20,8 +20,11 @@ $secondaryContainer: transparentize(mix(mix($background, $color2, 50%), $color6,
|
|||||||
$onSecondaryContainer: mix($color7, $color2, 90%);
|
$onSecondaryContainer: mix($color7, $color2, 90%);
|
||||||
@if $darkmode == False {
|
@if $darkmode == False {
|
||||||
$onSecondaryContainer: mix($onSecondaryContainer, black, 50%);
|
$onSecondaryContainer: mix($onSecondaryContainer, black, 50%);
|
||||||
|
} @else {
|
||||||
|
$onSecondaryContainer: mix($onSecondaryContainer, white, 50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.osd-music {
|
.osd-music {
|
||||||
@include menu_decel;
|
@include menu_decel;
|
||||||
@include elevation2;
|
@include elevation2;
|
||||||
|
|||||||
Reference in New Issue
Block a user