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
|
@ -1,7 +1,7 @@
|
|||
const hyprland = await Service.import("hyprland")
|
||||
|
||||
const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`);
|
||||
const wsSymbols = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
|
||||
const wsSymbols = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"]
|
||||
const Workspaces = () => Widget.EventBox({
|
||||
onScrollUp: () => dispatch('+1'),
|
||||
onScrollDown: () => dispatch('-1'),
|
||||
|
|
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