mirror of https://github.com/tiyn/wiki
parent
ee6c1e6c43
commit
5d49df8915
@ -0,0 +1,37 @@
|
||||
# PlayerCTL
|
||||
|
||||
[PlayerCTL](https://github.com/altdesktop/playerctl) is a MPRIS (Media Player
|
||||
Remote Interfacing Specification) [media player](/wiki/audio.md#media-software)
|
||||
command-line controller for Spotify, [Sonixd](/wiki/subsonic.md#client), MPV and
|
||||
many other different media clients aswell as [browser](/wiki/browser.md).
|
||||
|
||||
## Setup
|
||||
|
||||
On most linux distributions PlayerCTL can be installed with the `playerctl`
|
||||
package.
|
||||
Alternatively it can be installed via
|
||||
[Github](https://github.com/altdesktop/playerctl).
|
||||
|
||||
## Usage
|
||||
|
||||
## Basic Commands
|
||||
|
||||
For starting, stopping the music the commans are simple and very intuitive.
|
||||
The following commands show how to control music.
|
||||
The commands are quite self-explaining.
|
||||
|
||||
```sh
|
||||
playerctl play
|
||||
playerctl pause
|
||||
playerctl play-pause
|
||||
playerctl stop
|
||||
playerctl next
|
||||
playerctl previous
|
||||
```
|
||||
|
||||
## Using Hotkeys
|
||||
|
||||
Hotkeys can be more accessible than typing the commands to start or stop music
|
||||
in the terminal.
|
||||
With [SXHKD](/wiki/linux/sxhkd.md#setting-a-hotkey) commands from the CLI can
|
||||
be set to a hotkey.
|
@ -0,0 +1,43 @@
|
||||
# SXHKD
|
||||
|
||||
[SXHKD](https://github.com/baskerville/sxhkd) - short for Simple
|
||||
[X](/wiki/linux/x_window_system.md) hotkey daemon - is a program to set hotkeys.
|
||||
|
||||
## Setup
|
||||
|
||||
On most linux distributions SXHKD can be installed with the `sxhkd`
|
||||
package.
|
||||
Alternatively it can be installed via
|
||||
[Github](https://github.com/baskerville/sxhkd).
|
||||
|
||||
## Usage
|
||||
|
||||
### Setting a Hotkey
|
||||
|
||||
Configuration for setting hotkeys is done in the file `~/.config/sxhkd/sxhkdrc`.
|
||||
A hotkey corresponds to typically two, sometimes more lines within this
|
||||
configuration file.
|
||||
The first line describes the keys that act as hotkeys and the second line
|
||||
describes the commands that are run on pressing the hotkey.
|
||||
|
||||
There are simple hotkeys using only one key (in this case the Launch Button).
|
||||
|
||||
```txt
|
||||
XF86LaunchB
|
||||
xdotool selectwindow | xsel -bi
|
||||
```
|
||||
|
||||
And some commands use modifier keys or multiple keys.
|
||||
|
||||
```txt
|
||||
super + shift + equal
|
||||
sxiv -rt "$HOME/image"
|
||||
```
|
||||
|
||||
When using similar commands it can be useful to map multiple hotkeys in one
|
||||
entry.
|
||||
|
||||
```txt
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
```
|
Loading…
Reference in new issue