Skip to content

Conversation

@adarsh-67r
Copy link

  • Added XF86AudioPlay, XF86AudioNext, and XF86AudioPrev key bindings to control media playback (play/pause, next, previous) via playerctl.

}
XF86AudioPrev allow-when-locked=true {
spawn "playerctl" "previous";
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use DMS IPC for this? Since playerctl is using mpris anyway. Takes away a needed dependency.

Also good to add to hyprland stock config I think

Copy link

@ypurpl ypurpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XF86AudioNext allow-when-locked=true hotkey-overlay-title="Media: Next Track" {
	spawn "dms" "ipc" "call" "mpris" "next";
}
XF86AudioPlay allow-when-locked=true hotkey-overlay-title="Media: Play/Pause" {
	spawn "dms" "ipc" "call" "mpris" "playPause";
}
XF86AudioPrev allow-when-locked=true hotkey-overlay-title="Media: Previous Track" {
	spawn "dms" "ipc" "call" "mpris" "previous";
}

quick question, whats the difference between dms ipc call mpris and dms ipc mpris?

@Shorakie
Copy link

call executes a command. we can omit it here.
fun fact we can do
dms ipc call call... mpris playPause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants