Files
custum-hyprpanel/modules/menus/media/components/title/index.ts
Rubin Bhandari da1784d486 feat: make music label more dynamically configurable (#389)
* feat: make music lable more dynamically configurable

* fix: move seekbar above controls

* fix: add menu for media

* fix: add menu for media

* fix: add menu for media

* Organize media player code

* fix: revert back controls position

* Delete pnpm-lock.yaml

* Update options.ts

* Update widget/settings/pages/config/bar/index.ts

* fix: merge changes broken

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
2024-10-31 02:06:53 -07:00

20 lines
701 B
TypeScript

import { BoxWidget } from 'lib/types/widget';
import { songName } from './name/index';
import { songAuthor } from './author/index';
import { songAlbum } from './album/index';
import options from 'options';
const { hideAlbum, hideAuthor } = options.menus.media;
export const MediaInfo = (): BoxWidget => {
return Widget.Box({
class_name: 'media-indicator-current-media-info',
hpack: 'center',
hexpand: true,
vertical: true,
children: Utils.merge([hideAlbum.bind('value'), hideAuthor.bind('value')], (hidAlbum, hidAuthor) => {
return [songName(), ...(hidAuthor ? [] : [songAuthor()]), ...(hidAlbum ? [] : [songAlbum()])];
}),
});
};