mirror of
				https://github.com/tiyn/wiki.git
				synced 2025-11-04 12:21:14 +01:00 
			
		
		
		
	audio: added and linked playerctl and sxhkd
This commit is contained in:
		@@ -8,6 +8,8 @@ Music and Audiobooks can be obtained by buying the digital files or by
 | 
			
		||||
[extracting them off of a CD](#extract-audio-files-from-cds).
 | 
			
		||||
Podcasts need a so called Podcatcher.
 | 
			
		||||
A Podcatcher is used to subscribe to podcasts and download them automatically.
 | 
			
		||||
For Linux specific music software navigate to the corresponding
 | 
			
		||||
[wiki entry](/wiki/linux/audio.md).
 | 
			
		||||
 | 
			
		||||
## Media Software
 | 
			
		||||
 | 
			
		||||
@@ -17,6 +19,9 @@ There are differences depending on your preffered software interface.
 | 
			
		||||
 | 
			
		||||
### Software for Music/Podcasts/Audiobooks
 | 
			
		||||
 | 
			
		||||
The following is a list of server software, that is featured in this wiki.
 | 
			
		||||
The corresponding client software is handled in the server softwares wiki entry.
 | 
			
		||||
 | 
			
		||||
- [Subsonic](./subsonic.md) is a media streamer for music, podcasts and
 | 
			
		||||
  audiobooks.
 | 
			
		||||
  Subsonic is self-hostable.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
# Audio
 | 
			
		||||
 | 
			
		||||
Audio is an important point in a linux desktop environment
 | 
			
		||||
For non-Linux specific audio software navigate to the corresponding
 | 
			
		||||
[wiki article](/wiki/audio.md).
 | 
			
		||||
 | 
			
		||||
## Sound Server
 | 
			
		||||
 | 
			
		||||
@@ -23,3 +25,12 @@ installed.
 | 
			
		||||
Belonging to the latter option noise cancellation can be easily achieved by
 | 
			
		||||
installing [Noisetorch](https://github.com/lawl/NoiseTorch).
 | 
			
		||||
After the installation modify the `Voice Activation Threshhold` to your needs.
 | 
			
		||||
 | 
			
		||||
## Control Audio from Command Line/by Hotkey
 | 
			
		||||
 | 
			
		||||
Audio from many different clients can be controlled (started, stopped, skipped)
 | 
			
		||||
using the command line with [PlayerCTL](/wiki/linux/playerctl.md).
 | 
			
		||||
With additional software it can also be used to control audio/music by pressing
 | 
			
		||||
hotkeys.
 | 
			
		||||
This is explained in the
 | 
			
		||||
[PlayerCTL entry](/wiki/linux/playerctl.md#using-hotkeys).
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										37
									
								
								wiki/linux/playerctl.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								wiki/linux/playerctl.md
									
									
									
									
									
										Normal file
									
								
							@@ -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.
 | 
			
		||||
							
								
								
									
										43
									
								
								wiki/linux/sxhkd.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								wiki/linux/sxhkd.md
									
									
									
									
									
										Normal file
									
								
							@@ -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}
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user