mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
ags: no more pywal
This commit is contained in:
@@ -22,8 +22,8 @@ var lastCoverPath = '';
|
||||
function isRealPlayer(player) {
|
||||
return (
|
||||
// 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.chromium')) &&
|
||||
// !(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.firefox')) &&
|
||||
// !(hasPlasmaIntegration && player.busName.startsWith('org.mpris.MediaPlayer2.chromium')) &&
|
||||
// playerctld just copies other buses and we don't need duplicates
|
||||
!player.busName.startsWith('org.mpris.MediaPlayer2.playerctld') &&
|
||||
// Non-instance mpd bus
|
||||
@@ -209,8 +209,15 @@ const CoverArt = ({ player, ...rest }) => {
|
||||
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`])
|
||||
.then(() => {
|
||||
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`);
|
||||
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"`)}`
|
||||
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}"`);
|
||||
Utils.timeout(200, () => {
|
||||
// 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%);
|
||||
@if $darkmode == False {
|
||||
$onSecondaryContainer: mix($onSecondaryContainer, black, 50%);
|
||||
} @else {
|
||||
$onSecondaryContainer: mix($onSecondaryContainer, white, 50%);
|
||||
}
|
||||
|
||||
|
||||
.osd-music {
|
||||
@include menu_decel;
|
||||
@include elevation2;
|
||||
|
||||
Reference in New Issue
Block a user