Keyd : Add audio seek controls.

This commit is contained in:
Dmitry Voronin 2024-04-25 04:10:00 +03:00
parent 0bf7586f41
commit bc04c908f7
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
3 changed files with 11 additions and 5 deletions

View file

@ -33,8 +33,10 @@
space = "playpause";
w = "volumeup";
s = "volumedown";
d = "nextsong";
a = "previoussong";
d = "forward";
a = "back";
e = "nextsong";
q = "previoussong";
};
layer_macro = {};

View file

@ -1,9 +1,10 @@
{ setting, ... }: let
step = setting.volume.step;
step_volume = setting.volume.step;
step_music = setting.music.step;
in {
text = ''
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +${step}%'
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -${step}%'
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +${step_volume}%'
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -${step_volume}%'
bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
bindsym XF86AudioPlay exec 'playerctl play-pause'
@ -11,5 +12,7 @@ in {
bindsym XF86AudioStop exec 'playerctl stop'
bindsym XF86AudioNext exec 'playerctl next'
bindsym XF86AudioPrev exec 'playerctl previous'
bindsym XF86Forward exec 'playerctl position ${step_music}+'
bindsym XF86Back exec 'playerctl position ${step_music}-'
'';
}

View file

@ -57,4 +57,5 @@
brightness.step = "5";
volume.step = "5";
music.step = "10";
}