feat(ags): modify player config to my liking

This commit is contained in:
matt1432 2023-09-17 17:27:23 -04:00
parent 81c36b5dec
commit 348f95484e
5 changed files with 444 additions and 573 deletions

View file

@ -1,237 +1,261 @@
const { CACHE_DIR, execAsync, ensureDirectory, lookUpIcon } = ags.Utils; const { CACHE_DIR, execAsync, ensureDirectory, lookUpIcon } = ags.Utils;
const { Button, Icon, Label, Box, Stack, Slider } = ags.Widget; const { Button, Icon, Label, Box, Stack, Slider, CenterBox } = ags.Widget;
const { GLib } = imports.gi; const { GLib } = imports.gi;
const icons = { const icons = {
mpris: { mpris: {
fallback: 'audio-x-generic-symbolic', fallback: 'audio-x-generic-symbolic',
shuffle: { shuffle: {
enabled: '󰒟', enabled: '󰒝',
disabled: '󰒟', disabled: '󰒞',
}, },
loop: { loop: {
none: '󰓦', none: '󰑗',
track: '󰓦', track: '󰑘',
playlist: '󰑐', playlist: '󰑖',
}, },
playing: '󰏦', playing: '',
paused: '󰐍', paused: '',
stopped: '󰐍', stopped: '',
prev: '󰒮', prev: '󰒮',
next: '󰒭', next: '󰒭',
}, },
} }
let coloryou = path => ['bash', '-c', `[[ -f "${path}" ]] && coloryou "${path}"`];
const MEDIA_CACHE_PATH = CACHE_DIR + '/media'; const MEDIA_CACHE_PATH = CACHE_DIR + '/media';
export const CoverArt = (player, props) => Box({ export const CoverArt = (player, params) => CenterBox({
...props, ...params,
className: 'cover', className: 'player',
connections: [[player, box => { vertical: true,
box.setStyle(`background-image: url("${player.coverPath}")`); connections: [
}]], [player, box => {
execAsync(coloryou(player.coverPath))
.then(out => {
let colors = JSON.parse(out);
box.setStyle(`background: radial-gradient(circle,
rgba(0, 0, 0, 0.4) 30%,
${colors.imageAccent}),
url("${player.coverPath}");
background-size: cover;
background-position: center;`);
}).catch(err => { if (err !== "") print(err) });
}],
],
}); });
export const BlurredCoverArt = (player, props) => Box({ export const TitleLabel = (player, params) => Label({
...props, ...params,
className: 'blurred-cover', xalign: 0,
connections: [[player, box => { maxWidthChars: 40,
const url = player.coverPath; truncate: 'end',
if (!url) justification: 'left',
return; className: 'title',
binds: [['label', player, 'trackTitle']],
const blurredPath = MEDIA_CACHE_PATH + '/blurred';
const blurred = blurredPath +
url.substring(MEDIA_CACHE_PATH.length);
if (GLib.file_test(blurred, GLib.FileTest.EXISTS)) {
box.setStyle(`background-image: url("${blurred}")`);
return;
}
ensureDirectory(blurredPath);
execAsync(['convert', url, '-blur', '0x22', blurred])
.then(() => box.setStyle(`background-image: url("${blurred}")`))
.catch(() => { });
}]],
}); });
export const TitleLabel = (player, props) => Label({ export const ArtistLabel = (player, params) => Label({
...props, ...params,
className: 'title', xalign: 0,
binds: [['label', player, 'trackTitle']], maxWidthChars: 40,
truncate: 'end',
justification: 'left',
className: 'artist',
connections: [[player, label => {
label.label = player.trackArtists.join(', ') || '';
}]],
}); });
export const ArtistLabel = (player, props) => Label({ export const PlayerIcon = (player, { symbolic = true, ...params } = {}) => Icon({
...props, ...params,
className: 'artist', className: 'player-icon',
connections: [[player, label => { tooltipText: player.indentity || '',
label.label = player.trackArtists.join(', ') || ''; connections: [[player, icon => {
}]], const name = `${player.entry}${symbolic ? '-symbolic' : ''}`;
lookUpIcon(name) ? icon.icon = name
: icon.icon = icons.mpris.fallback;
}]],
}); });
export const PlayerIcon = (player, { symbolic = true, ...props } = {}) => Icon({ export const PositionSlider = (player, params) => Slider({
...props, ...params,
className: 'player-icon', className: 'position-slider',
tooltipText: player.indentity || '', hexpand: true,
connections: [[player, icon => { drawValue: false,
const name = `${player.entry}${symbolic ? '-symbolic' : ''}`; onChange: ({ value }) => {
lookUpIcon(name) player.position = player.length * value;
? icon.icon = name },
: icon.icon = icons.mpris.fallback; properties: [
}]], ['update', slider => {
}); execAsync(coloryou(player.coverPath))
.then(out => {
let colors = JSON.parse(out);
export const PositionSlider = (player, props) => Slider({ slider.setCss(`highlight { background-color: ${colors.buttonAccent}; }
...props, slider { background-color: ${colors.buttonAccent}; }
className: 'position-slider', slider:hover { background-color: #303240; }
drawValue: false, trough { background-color: ${colors.buttonAccent}; }`);
onChange: ({ value }) => { }).catch(err => { if (err !== "") print(err) });
player.position = player.length * value;
},
properties: [['update', slider => {
if (slider.dragging)
return;
slider.visible = player.length > 0; if (slider.dragging)
if (player.length > 0) return;
slider.value = player.position / player.length;
}]], slider.sensitive = player.length > 0;
connections: [ if (player.length > 0)
[player, s => s._update(s), 'position'], slider.value = player.position / player.length;
[1000, s => s._update(s)], }],
], ],
connections: [
[player, s => s._update(s), 'position'],
[1000, s => s._update(s)],
],
}); });
function lengthStr(length) { function lengthStr(length) {
const min = Math.floor(length / 60); const min = Math.floor(length / 60);
const sec0 = Math.floor(length % 60) < 10 ? '0' : ''; const sec0 = Math.floor(length % 60) < 10 ? '0' : '';
const sec = Math.floor(length % 60); const sec = Math.floor(length % 60);
return `${min}:${sec0}${sec}`; return `${min}:${sec0}${sec}`;
} }
export const PositionLabel = player => Label({ export const PositionLabel = player => Label({
properties: [['update', label => { properties: [['update', label => {
player.length > 0 player.length > 0 ? label.label = lengthStr(player.position)
? label.label = lengthStr(player.position) : label.visible = !!player;
: label.visible = !!player; }]],
}]], connections: [
connections: [ [player, l => l._update(l), 'position'],
[player, l => l._update(l), 'position'], [1000, l => l._update(l)],
[1000, l => l._update(l)], ],
],
}); });
export const LengthLabel = player => Label({ export const LengthLabel = player => Label({
connections: [[player, label => { connections: [[player, label => {
player.length > 0 player.length > 0 ? label.label = lengthStr(player.length)
? label.label = lengthStr(player.length) : label.visible = !!player;
: label.visible = !!player; }]],
}]],
}); });
export const Slash = player => Label({ export const Slash = player => Label({
label: '/', label: '/',
connections: [[player, label => { connections: [[player, label => {
label.visible = player.length > 0; label.visible = player.length > 0;
}]], }]],
}); });
const PlayerButton = ({ player, items, onClick, prop, canProp, cantValue }) => Button({ const PlayerButton = ({ player, items, onClick, prop }) => Button({
child: Stack({ items }), child: Stack({ items }),
onClicked: () => player[onClick](), onPrimaryClickRelease: () => player[onClick](),
connections: [[player, button => { connections: [
button.visible = player[canProp] !== cantValue; [player, button => {
button.child.shown = `${player[prop]}`; button.child.shown = `${player[prop]}`;
}]],
execAsync(coloryou(player.coverPath))
.then(out => {
let colors = JSON.parse(out);
if (prop == 'playBackStatus') {
items.forEach(item => {
item[1].setStyle(`background-color: ${colors.buttonAccent};
color: ${colors.buttonText};`);
})
}
else {
button.setStyle(`color: ${colors.buttonAccent};`);
}
}).catch(err => { if (err !== "") print(err) });
}],
],
}); });
export const ShuffleButton = player => PlayerButton({ export const ShuffleButton = player => PlayerButton({
player, player,
items: [ items: [
['true', Label({ ['true', Label({
className: 'shuffle enabled', className: 'shuffle enabled',
label: icons.mpris.shuffle.enabled, label: icons.mpris.shuffle.enabled,
})], })],
['false', Label({ ['false', Label({
className: 'shuffle disabled', className: 'shuffle disabled',
label: icons.mpris.shuffle.disabled, label: icons.mpris.shuffle.disabled,
})], })],
], ],
onClick: 'shuffle', onClick: 'shuffle',
prop: 'shuffleStatus', prop: 'shuffleStatus',
canProp: 'shuffleStatus',
cantValue: null,
}); });
export const LoopButton = player => PlayerButton({ export const LoopButton = player => PlayerButton({
player, player,
items: [ items: [
['None', Label({ ['None', Label({
className: 'loop none', className: 'loop none',
label: icons.mpris.loop.none, label: icons.mpris.loop.none,
})], })],
['Track', Label({ ['Track', Label({
className: 'loop track', className: 'loop track',
label: icons.mpris.loop.track, label: icons.mpris.loop.track,
})], })],
['Playlist', Label({ ['Playlist', Label({
className: 'loop playlist', className: 'loop playlist',
label: icons.mpris.loop.playlist, label: icons.mpris.loop.playlist,
})], })],
], ],
onClick: 'loop', onClick: 'loop',
prop: 'loopStatus', prop: 'loopStatus',
canProp: 'loopStatus',
cantValue: null,
}); });
export const PlayPauseButton = player => PlayerButton({ export const PlayPauseButton = player => PlayerButton({
player, player,
items: [ items: [
['Playing', Label({ ['Playing', Label({
className: 'playing', className: 'pausebutton playing',
label: icons.mpris.playing, label: icons.mpris.playing,
})], })],
['Paused', Label({ ['Paused', Label({
className: 'paused', className: 'pausebutton paused',
label: icons.mpris.paused, label: icons.mpris.paused,
})], })],
['Stopped', Label({ ['Stopped', Label({
className: 'stopped', className: 'pausebutton stopped paused',
label: icons.mpris.stopped, label: icons.mpris.stopped,
})], })],
], ],
onClick: 'playPause', onClick: 'playPause',
prop: 'playBackStatus', prop: 'playBackStatus',
canProp: 'canPlay',
cantValue: false,
}); });
export const PreviousButton = player => PlayerButton({ export const PreviousButton = player => PlayerButton({
player, player,
items: [ items: [
['true', Label({ ['true', Label({
className: 'previous', className: 'previous',
label: icons.mpris.prev, label: icons.mpris.prev,
})], })],
], ['false', Label({
onClick: 'previous', className: 'previous',
prop: 'canGoPrev', label: icons.mpris.prev,
canProp: 'canGoPrev', })],
cantValue: false, ],
onClick: 'previous',
prop: 'canGoPrev',
}); });
export const NextButton = player => PlayerButton({ export const NextButton = player => PlayerButton({
player, player,
items: [ items: [
['true', Label({ ['true', Label({
className: 'next', className: 'next',
label: icons.mpris.next, label: icons.mpris.next,
})], })],
], ['false', Label({
onClick: 'next', className: 'next',
prop: 'canGoNext', label: icons.mpris.next,
canProp: 'canGoNext', })],
cantValue: false, ],
onClick: 'next',
prop: 'canGoNext',
}); });

View file

@ -1,84 +1,85 @@
import * as mpris from './mpris.js';
const { Mpris } = ags.Service; const { Mpris } = ags.Service;
const { Box, CenterBox } = ags.Widget; const { Box, CenterBox, Label } = ags.Widget;
const Footer = player => CenterBox({ import * as mpris from './mpris.js';
className: 'footer-box', import { Separator } from '../misc/separator.js';
children: [
Box({ const Top = player => Box({
className: 'position', className: 'top',
children: [ halign: 'start',
mpris.PositionLabel(player), valign: 'start',
mpris.Slash(player), children: [
mpris.LengthLabel(player), mpris.PlayerIcon(player, {
], symbolic: false,
}), }),
Box({ ],
className: 'controls',
children: [
mpris.ShuffleButton(player),
mpris.PreviousButton(player),
mpris.PlayPauseButton(player),
mpris.NextButton(player),
mpris.LoopButton(player),
],
}),
mpris.PlayerIcon(player, {
symbolic: false,
hexpand: true,
halign: 'end',
}),
],
}); });
const TextBox = player => Box({ const Center = player => Box({
children: [ className: 'center',
mpris.CoverArt(player, { children: [
halign: 'end',
hexpand: false, CenterBox({
child: Box({ vertical: true,
className: 'shader', children: [
hexpand: true,
}),
}),
Box({ Box({
hexpand: true, className: 'metadata',
vertical: true, vertical: true,
className: 'labels', halign: 'start',
children: [ valign: 'center',
mpris.TitleLabel(player, { hexpand: true,
xalign: 0, children: [
justification: 'left', mpris.TitleLabel(player),
wrap: true, mpris.ArtistLabel(player),
}), ],
mpris.ArtistLabel(player, {
xalign: 0,
justification: 'left',
wrap: true,
}),
],
}), }),
],
Label(),
Label(),
],
}),
CenterBox({
vertical: true,
children: [
Label(),
mpris.PlayPauseButton(player),
Label(),
],
}),
],
}); });
const PlayerBox = player => Box({ const Bottom = player => Box({
className: `player ${player.name}`, className: 'bottom',
children: [ children: [
mpris.BlurredCoverArt(player, {
className: 'cover-art-bg', mpris.PreviousButton(player, {
hexpand: true, valign: 'end',
children: [Box({ halign: 'start',
className: 'shader', }),
hexpand: true, Separator(8),
vertical: true, mpris.PositionSlider(player),
children: [ Separator(8),
TextBox(player), mpris.NextButton(player),
mpris.PositionSlider(player), Separator(8),
Footer(player), mpris.ShuffleButton(player),
], Separator(8),
})], mpris.LoopButton(player),
}),
], ],
});
const PlayerBox = player => mpris.CoverArt(player, {
className: `player ${player.name}`,
hexpand: true,
children: [
Top(player),
Center(player),
Bottom(player),
],
}); });
export default () => Box({ export default () => Box({

View file

@ -1,189 +1,101 @@
.arrow { .arrow {
transition: -gtk-icon-transform 0.3s ease-in-out; transition: -gtk-icon-transform 0.3s ease-in-out;
margin-bottom: 5px; margin-bottom: 12px;
} }
.media .player { .media {
all: unset; margin-top: 9px;
border-radius: 9px; }
color: #eee;
background-color: rgba(238, 238, 238, 0.06); .player {
border: 1px solid rgba(238, 238, 238, 0.03); all: unset;
margin-top: 9px; padding: 10px;
* { min-width: 400px;
font-size: 16px; min-height: 200px;
font-family: "Ubuntu Nerd Font", sans-serif; border-radius: 30px;
} border-top: 2px solid $contrastbg;
label { border-bottom: 2px solid $contrastbg;
color: white; transition: background 250ms;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); .top {
} font-size: 23px;
.shader { }
all: unset; .metadata {
box-shadow: inset 0 0 3em 1em rgba(23, 23, 23, 0.7); .title{
* { font-weight: 500;
font-size: 16px; transition: text 250ms;
font-family: "Ubuntu Nerd Font", sans-serif; }
} .artist{
label { font-weight: 400;
color: white; font-size: 15px;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); transition: text 250ms;
} }
} }
.cover { .bottom {
border-radius: 7.2px; font-size: 30px;
min-height: 100px; }
min-width: 100px;
box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.6); .pausebutton {
margin: 9px; transition: background 250ms;
margin-bottom: 0; font-size: 15px;
.shader { min-height: 14px;
background-color: transparent; min-width: 14px;
border-radius: 6.2px; padding: 14px 14px 14px 17px;
box-shadow: inset 0 0 0 999px rgba(23, 23, 23, 0.2); }
}
} .playing {
.blurred-cover, .cover { transition: all ease .2s;
background-size: cover; border-radius: 15px;
background-position: center; }
border-radius: 8px;
} .stopped,
.labels { .paused {
margin-top: 9px; border-radius: 26px;
label { transition: all ease .2s;
font-size: 1.1em; padding: 14px 14px 14px 20px;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); }
&.title { button label {
font-weight: bold; min-width: 35px;
} }
} }
}
.position-slider { .previous,
all: unset; .next,
margin: 9px 0; .shuffle,
* { .loop {
font-size: 16px; border-radius: 100%;
font-family: "Ubuntu Nerd Font", sans-serif; transition: background-color 200ms;
} &:hover {
* { border-radius: 100%;
all: unset; background-color: rgba(127, 132, 156, 0.4);
} transition: background-color 200ms;
trough { }
transition: 200ms; }
border-radius: 0;
border: 1px solid rgba(238, 238, 238, 0.03); .loop {
background-color: rgba(238, 238, 238, 0.06); label {
min-height: 0.4em; padding-right: 8px;
min-width: 0.4em; }
highlight, progress { }
border-radius: 0;
background-image: linear-gradient(white, white); .position-slider {
min-height: 0.4em; highlight {
min-width: 0.4em; margin: 0px;
} border-radius: 2em;
&:focus { }
background-color: rgba(238, 238, 238, 0.154);
box-shadow: inset 0 0 0 1px #51a4e7; trough {
} border-radius: 2em;
} }
slider {
box-shadow: none; slider {
background-color: transparent; margin: -8px;
border: 1px solid transparent; min-height: 20px;
transition: 200ms; border-radius: 10px;
border-radius: 0; box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
min-height: 0.4em; transition: background-color 0.5s ease-in-out;
min-width: 0.4em; }
margin: -0.5em; slider:hover {
} transition: background-color 0.5s ease-in-out;
&:hover trough { }
background-color: rgba(238, 238, 238, 0.154);
}
&:disabled highlight, &:disabled progress {
background-color: rgba(238, 238, 238, 0.6);
background-image: none;
}
trough {
border: none;
background-color: rgba(255, 255, 255, 0.3);
}
}
.footer-box {
margin: -4.5px 9px 4.5px;
image {
-gtk-icon-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6);
}
}
.controls button {
all: unset;
label {
font-size: 2em;
color: rgba(255, 255, 255, 0.8);
transition: 200ms;
&.shuffle, &.loop {
font-size: 1.4em;
}
}
&:hover label {
color: rgba(255, 255, 255, 0.9);
}
&:active label {
color: white;
}
}
&.spotify button .shuffle.enabled {
color: #43c383;
}
&.spotify button .loop.playlist, &.spotify button .loop.track {
color: #43c383;
}
&.spotify button:active label {
color: #43c383;
}
&.spotify .position-slider:hover trough {
background-color: rgba(67, 195, 131, 0.5);
}
&.spotify .player-icon {
color: #43c383;
}
&.firefox button .shuffle.enabled {
color: #E79E64;
}
&.firefox button .loop.playlist, &.firefox button .loop.track {
color: #E79E64;
}
&.firefox button:active label {
color: #E79E64;
}
&.firefox .position-slider:hover trough {
background-color: rgba(231, 158, 100, 0.5);
}
&.firefox .player-icon {
color: #E79E64;
}
&.mpv button .shuffle.enabled {
color: #9077e7;
}
&.mpv button .loop.playlist, &.mpv button .loop.track {
color: #9077e7;
}
&.mpv button:active label {
color: #9077e7;
}
&.mpv .position-slider:hover trough {
background-color: rgba(144, 119, 231, 0.5);
}
&.mpv .player-icon {
color: #9077e7;
}
}
.media.spotify image {
color: #43c383;
}
.media.firefox image {
color: #E79E64;
}
.media.mpv image {
color: #9077e7;
} }

View file

@ -591,144 +591,78 @@ calendar:indeterminate {
.arrow { .arrow {
transition: -gtk-icon-transform 0.3s ease-in-out; transition: -gtk-icon-transform 0.3s ease-in-out;
margin-bottom: 5px; } margin-bottom: 12px; }
.media .player { .media {
all: unset;
border-radius: 9px;
color: #eee;
background-color: rgba(238, 238, 238, 0.06);
border: 1px solid rgba(238, 238, 238, 0.03);
margin-top: 9px; } margin-top: 9px; }
.media .player * {
font-size: 16px;
font-family: "Ubuntu Nerd Font", sans-serif; }
.media .player label {
color: white;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); }
.media .player .shader {
all: unset;
box-shadow: inset 0 0 3em 1em rgba(23, 23, 23, 0.7); }
.media .player .shader * {
font-size: 16px;
font-family: "Ubuntu Nerd Font", sans-serif; }
.media .player .shader label {
color: white;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); }
.media .player .cover {
border-radius: 7.2px;
min-height: 100px;
min-width: 100px;
box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.6);
margin: 9px;
margin-bottom: 0; }
.media .player .cover .shader {
background-color: transparent;
border-radius: 6.2px;
box-shadow: inset 0 0 0 999px rgba(23, 23, 23, 0.2); }
.media .player .blurred-cover, .media .player .cover {
background-size: cover;
background-position: center;
border-radius: 8px; }
.media .player .labels {
margin-top: 9px; }
.media .player .labels label {
font-size: 1.1em;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); }
.media .player .labels label.title {
font-weight: bold; }
.media .player .position-slider {
all: unset;
margin: 9px 0; }
.media .player .position-slider * {
font-size: 16px;
font-family: "Ubuntu Nerd Font", sans-serif; }
.media .player .position-slider * {
all: unset; }
.media .player .position-slider trough {
transition: 200ms;
border-radius: 0;
border: 1px solid rgba(238, 238, 238, 0.03);
background-color: rgba(238, 238, 238, 0.06);
min-height: 0.4em;
min-width: 0.4em; }
.media .player .position-slider trough highlight, .media .player .position-slider trough progress {
border-radius: 0;
background-image: linear-gradient(white, white);
min-height: 0.4em;
min-width: 0.4em; }
.media .player .position-slider trough:focus {
background-color: rgba(238, 238, 238, 0.154);
box-shadow: inset 0 0 0 1px #51a4e7; }
.media .player .position-slider slider {
box-shadow: none;
background-color: transparent;
border: 1px solid transparent;
transition: 200ms;
border-radius: 0;
min-height: 0.4em;
min-width: 0.4em;
margin: -0.5em; }
.media .player .position-slider:hover trough {
background-color: rgba(238, 238, 238, 0.154); }
.media .player .position-slider:disabled highlight, .media .player .position-slider:disabled progress {
background-color: rgba(238, 238, 238, 0.6);
background-image: none; }
.media .player .position-slider trough {
border: none;
background-color: rgba(255, 255, 255, 0.3); }
.media .player .footer-box {
margin: -4.5px 9px 4.5px; }
.media .player .footer-box image {
-gtk-icon-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6); }
.media .player .controls button {
all: unset; }
.media .player .controls button label {
font-size: 2em;
color: rgba(255, 255, 255, 0.8);
transition: 200ms; }
.media .player .controls button label.shuffle, .media .player .controls button label.loop {
font-size: 1.4em; }
.media .player .controls button:hover label {
color: rgba(255, 255, 255, 0.9); }
.media .player .controls button:active label {
color: white; }
.media .player.spotify button .shuffle.enabled {
color: #43c383; }
.media .player.spotify button .loop.playlist, .media .player.spotify button .loop.track {
color: #43c383; }
.media .player.spotify button:active label {
color: #43c383; }
.media .player.spotify .position-slider:hover trough {
background-color: rgba(67, 195, 131, 0.5); }
.media .player.spotify .player-icon {
color: #43c383; }
.media .player.firefox button .shuffle.enabled {
color: #E79E64; }
.media .player.firefox button .loop.playlist, .media .player.firefox button .loop.track {
color: #E79E64; }
.media .player.firefox button:active label {
color: #E79E64; }
.media .player.firefox .position-slider:hover trough {
background-color: rgba(231, 158, 100, 0.5); }
.media .player.firefox .player-icon {
color: #E79E64; }
.media .player.mpv button .shuffle.enabled {
color: #9077e7; }
.media .player.mpv button .loop.playlist, .media .player.mpv button .loop.track {
color: #9077e7; }
.media .player.mpv button:active label {
color: #9077e7; }
.media .player.mpv .position-slider:hover trough {
background-color: rgba(144, 119, 231, 0.5); }
.media .player.mpv .player-icon {
color: #9077e7; }
.media.spotify image { .player {
color: #43c383; } all: unset;
padding: 10px;
min-width: 400px;
min-height: 200px;
border-radius: 30px;
border-top: 2px solid rgba(189, 147, 249, 0.8);
border-bottom: 2px solid rgba(189, 147, 249, 0.8);
transition: background 250ms; }
.player .top {
font-size: 23px; }
.player .metadata .title {
font-weight: 500;
transition: text 250ms; }
.player .metadata .artist {
font-weight: 400;
font-size: 15px;
transition: text 250ms; }
.player .bottom {
font-size: 30px; }
.player .pausebutton {
transition: background 250ms;
font-size: 15px;
min-height: 14px;
min-width: 14px;
padding: 14px 14px 14px 17px; }
.player .playing {
transition: all ease .2s;
border-radius: 15px; }
.player .stopped,
.player .paused {
border-radius: 26px;
transition: all ease .2s;
padding: 14px 14px 14px 20px; }
.player button label {
min-width: 35px; }
.media.firefox image { .previous,
color: #E79E64; } .next,
.shuffle,
.loop {
border-radius: 100%;
transition: background-color 200ms; }
.previous:hover,
.next:hover,
.shuffle:hover,
.loop:hover {
border-radius: 100%;
background-color: rgba(127, 132, 156, 0.4);
transition: background-color 200ms; }
.media.mpv image { .loop label {
color: #9077e7; } padding-right: 8px; }
.position-slider highlight {
margin: 0px;
border-radius: 2em; }
.position-slider trough {
border-radius: 2em; }
.position-slider slider {
margin: -8px;
min-height: 20px;
border-radius: 10px;
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
transition: background-color 0.5s ease-in-out; }
.position-slider slider:hover {
transition: background-color 0.5s ease-in-out; }

View file

@ -11,7 +11,7 @@
in in
{ {
home.packages = [ home.packages = [
(builtins.getFlake "github:Aylur/ags").packages.x86_64-linux.default (builtins.getFlake "github:matt1432/ags").packages.x86_64-linux.default
pkgs.sassc pkgs.sassc
pkgs.kora-icon-theme pkgs.kora-icon-theme
pkgs.coloryou pkgs.coloryou