Updated README
This commit is contained in:
parent
a7ea1d4ae6
commit
ea3d9063aa
84
README.md
84
README.md
@ -77,13 +77,15 @@ chmod +x $HOME/.local/bin/volumectl
|
||||
|
||||
## Usage
|
||||
|
||||
### Command line
|
||||
|
||||
To use the script, simply execute the `volumectl` with the flag you want,
|
||||
example:
|
||||
```bash
|
||||
volumectl -i
|
||||
```
|
||||
|
||||
### Possible flags
|
||||
#### Possible flags
|
||||
(You can find all the information below by doing `volumectl -h`)
|
||||
|
||||
|Short flag | Equivalent long flag |Description|
|
||||
@ -102,13 +104,71 @@ volumectl -i
|
||||
|`-G` | `--get-mute` | prints the current mute state |
|
||||
|
||||
|
||||
### Optional flags
|
||||
#### Optional flags
|
||||
|Short flag | Equivalent long flag |Description|
|
||||
|-----|-----|-----|
|
||||
|`-c <file>` | `--config <file>` | use `<file>` as the config file instead of the default location (see below) |
|
||||
|`-v` | `--verbose` | print each step the script passes through |
|
||||
|`-h` | `--help` | print the help message and exit |
|
||||
|
||||
### Key Bindings
|
||||
|
||||
#### Awesomewm
|
||||
Here is an example of how keybindings would look like in awesomewm (tested)
|
||||
|
||||
```lua
|
||||
---- Volume Management
|
||||
awful.key({ }, "XF86AudioMute",
|
||||
function ()
|
||||
awful.spawn("volumectl -t")
|
||||
end,
|
||||
{description = "Toggle mute", group = "Media management"}),
|
||||
|
||||
awful.key({ "Shift" }, "XF86AudioMute",
|
||||
function ()
|
||||
awful.spawn("volumectl -m")
|
||||
end,
|
||||
{description = "Set mute", group = "Media management"}),
|
||||
|
||||
awful.key({ }, "XF86AudioRaiseVolume",
|
||||
function ()
|
||||
awful.spawn("volumectl -i")
|
||||
end,
|
||||
{description = "Increase volume", group = "Media management"}),
|
||||
|
||||
awful.key({ "Shift" }, "XF86AudioRaiseVolume",
|
||||
function ()
|
||||
awful.spawn("volumectl -I")
|
||||
end,
|
||||
{description = "Increase volume a lot", group = "Media management"}),
|
||||
|
||||
awful.key({ }, "XF86AudioLowerVolume",
|
||||
function ()
|
||||
awful.spawn("volumectl -d")
|
||||
end,
|
||||
{description = "Decrease volume", group = "Media management"}),
|
||||
|
||||
awful.key({ "Shift" }, "XF86AudioLowerVolume",
|
||||
function ()
|
||||
awful.spawn("volumectl -D")
|
||||
end,
|
||||
{description = "Decrease volume a lot", group = "Media management"}),
|
||||
```
|
||||
|
||||
#### i3
|
||||
|
||||
Here is an example of how keybindings would look like in awesomewm (**NOT TESTED**, please tell me if it's wrong)
|
||||
|
||||
```i3
|
||||
bindsym XF86AudioMute exec --no-startup-id volumectl -t
|
||||
bindsym Shift+XF86AudioMute exec --no-startup-id volumectl -m
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id volumectl -i
|
||||
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id volumectl -I
|
||||
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id volumectl -d
|
||||
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id volumectl -D
|
||||
```
|
||||
|
||||
## Config
|
||||
|
||||
@ -117,13 +177,29 @@ volume controller than the default one ([pamixer](https://github.com/cdemoulins/
|
||||
|
||||
To enable the config file, first make you installed the `read_ini.sh` script
|
||||
(see above, in the dependencies) just create a `config.ini` file in the
|
||||
`$HOME/.config/volumectl/` directory.
|
||||
`$XDG_CONFIG_HOME/volumectl` (`$HOME/.config/volumectl/` if `$XDG_CONFIG_HOME`
|
||||
is not set) directory.
|
||||
|
||||
If you think the default values are fine but want to modify just one value,
|
||||
then you can just place that value in the config file, `volumectl` will just
|
||||
take that changed value and keep the rest as default.
|
||||
|
||||
You can see what a normal config file looks like by looking at the [example_config.ini](./example_config.ini).
|
||||
You can see what all the available config variables are by looking at the
|
||||
[example_config.ini](./example_config.ini).
|
||||
|
||||
The easiest way to go to setup a custom config is by running the following commands
|
||||
```console
|
||||
mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/volumectl
|
||||
cp $HOME/.local/lib/volumectl/example_config.ini ${XDG_CONFIG_HOME:-$HOME/.config}/volumectl/config.ini
|
||||
```
|
||||
and then editing the config with your prefered editor and tinker with it.
|
||||
|
||||
Quick tip: when tinkering with the config, be sure to use `volumectl -v` (it's
|
||||
important to put the `-v` right after the command, so that you see everything
|
||||
that's happening) so that you see what the values are for the variables and
|
||||
will be able to spot where your error is, if there is any.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user