feat(home-manager): service defs and fmt
fmt: reformatted using nixpkgs-fmt prettifier mpd: created configuration hypr: add window rules commons: add usingMusicPlayerDaemon variable
This commit is contained in:
parent
2d4b39c72f
commit
7d88765f5d
67 changed files with 633 additions and 573 deletions
17
home-manager/stvnliu/ags/config/mpris.js
Normal file
17
home-manager/stvnliu/ags/config/mpris.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const mpris = await Service.import('mpris')
|
||||
|
||||
/**
|
||||
* @param {import('types/service/mpris').MprisPlayer} player
|
||||
* */
|
||||
const Player = (player, count) => Widget.Button({
|
||||
onClicked: () => player.playPause(),
|
||||
child: Widget.Label().hook(player, label => {
|
||||
const { track_artists, track_title } = player;
|
||||
label.label = `${count} PLAYING`;
|
||||
}),
|
||||
})
|
||||
|
||||
export const players = Widget.Box({
|
||||
children: mpris.bind('players').as(p => p.map(
|
||||
(this_player, index, array) => { return Player(this_player, array.length) }))
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue