Skip to content

Commit

Permalink
fix(i3): volume controls
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxd committed Oct 2, 2022
1 parent b5a2652 commit 1aa9a3c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Operating-Systems/Linux/Window-Manager/i3/spotify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Control Spotify in i3

```bash
# spotify player controls
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
```
13 changes: 12 additions & 1 deletion Operating-Systems/Linux/Window-Manager/i3/volume.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Volume Control in i3

A graphical control for [PulseAudio](https://wiki.archlinux.org/title/PulseAudio) is `pavucontrol`.
A graphical control for [PulseAudio](https://wiki.archlinux.org/title/PulseAudio) is `pavucontrol`.

## Keys

```
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
```

0 comments on commit 1aa9a3c

Please sign in to comment.