mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[scripts/playerctl-simple-menu] add a button for playing the track from start
This commit is contained in:
parent
7db0c34bca
commit
40dec8d6da
1 changed files with 9 additions and 4 deletions
|
@ -81,7 +81,7 @@ def iter_actions_for_player(player):
|
|||
player.next,
|
||||
)
|
||||
yield (
|
||||
"_Previous",
|
||||
"P_revious",
|
||||
"media-skip-backward",
|
||||
player.props.can_go_previous,
|
||||
player.previous,
|
||||
|
@ -101,16 +101,21 @@ def iter_actions_for_player(player):
|
|||
("Loop _one", Playerctl.LoopStatus.TRACK),
|
||||
("Loop _all", Playerctl.LoopStatus.PLAYLIST),
|
||||
]:
|
||||
if loop_action_status == loop_status:
|
||||
continue
|
||||
yield (
|
||||
loop_action_name,
|
||||
"media-playlist-repeat",
|
||||
True,
|
||||
loop_action_status != loop_status,
|
||||
lambda loop_action_status: player.set_loop_status(loop_action_status),
|
||||
loop_action_status,
|
||||
)
|
||||
|
||||
yield (
|
||||
"Play a_gain",
|
||||
"go-first",
|
||||
player.props.can_seek,
|
||||
lambda: player.set_position(0),
|
||||
)
|
||||
|
||||
|
||||
root_menu = Gtk.Menu()
|
||||
|
||||
|
|
Loading…
Reference in a new issue