Awesome configs for Ben.

This commit is contained in:
Derek Taylor
2023-04-05 14:32:50 -05:00
parent 1966d656c1
commit 6252ad30c1
608 changed files with 9300 additions and 3600 deletions

30
.config/awesome/lain/wiki/alsabar.md Executable file → Normal file
View File

@@ -1,6 +1,6 @@
## Usage
[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage)
[Read here.](https://github.com/copycat-killer/lain/wiki/Widgets#usage)
### Description
@@ -14,33 +14,31 @@ local volume = lain.widget.alsabar()
Variable | Meaning | Type | Default
--- | --- | --- | ---
`timeout` | Refresh timeout (in seconds) | integer | 5
`timeout` | Refresh timeout seconds | number | 5
`settings` | User settings | function | empty function
`width` | Bar width | number | 63
`height` | Bar height | number | 1
`margins` | Bar margins | number | 1
`paddings` | Bar paddings | number | 1
`ticks` | Set bar ticks on | boolean | false
`ticks_size` | Ticks size | integer | 7
`ticks_size` | Ticks size | number | 7
`cmd` | ALSA mixer command | string | "amixer"
`channel` | Mixer channel | string | "Master"
`togglechannel` | Toggle channel | string | `nil`
`colors` | Bar colors | table | see [Default colors](https://github.com/lcpz/lain/wiki/alsabar#default-colors)
`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/alsabar#default-notification_preset)
`colors` | Bar colors | table | see [Default colors](https://github.com/copycat-killer/lain/wiki/alsabar#default-colors)
`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/copycat-killer/lain/wiki/alsabar#default-notification_preset)
`followtag` | Display the notification on currently focused screen | boolean | false
`cmd` is useful if you need to pass additional arguments to `amixer`. For instance, you may want to define `cmd = "amixer -c X"` in order to set amixer with card `X`.
`cmd` is useful if you need to pass additional arguments to `amixer`. For instance, you may want to define `command = "amixer -c X"` in order to set amixer with card `X`.
In case mute toggling can't be mapped to master channel (this happens, for instance, when you are using an HDMI output), define `togglechannel` as your S/PDIF device. Read [`alsa`](https://github.com/lcpz/lain/wiki/alsa#toggle-channel) page to know how.
In case mute toggling can't be mapped to master channel (this happens, for instance, when you are using an HDMI output), define `togglechannel` as your S/PDIF device. Read [`alsa`](https://github.com/copycat-killer/lain/wiki/alsa#toggle-channel) page to know how.
`settings` can use the following variables:
Variable | Meaning | Type | Values
--- | --- | --- | ---
`volume_now.level` | Volume level | integer | 0-100
`volume_now.level` | Volume level | number | 0-100
`volume_now.status` | Device status | string | "on", "off"
With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen.
In multiple screen setups, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen.
### Default colors
@@ -79,19 +77,19 @@ volume.bar:buttons(awful.util.table.join(
awful.spawn(string.format("%s -e alsamixer", terminal))
end),
awful.button({}, 2, function() -- middle click
os.execute(string.format("%s set %s 100%%", volume.cmd, volume.channel))
awful.spawn(string.format("%s set %s 100%%", volume.cmd, volume.channel))
volume.update()
end),
awful.button({}, 3, function() -- right click
os.execute(string.format("%s set %s toggle", volume.cmd, volume.togglechannel or volume.channel))
awful.spawn(string.format("%s set %s toggle", volume.cmd, volume.togglechannel or volume.channel))
volume.update()
end),
awful.button({}, 4, function() -- scroll up
os.execute(string.format("%s set %s 1%%+", volume.cmd, volume.channel))
awful.spawn(string.format("%s set %s 1%%+", volume.cmd, volume.channel))
volume.update()
end),
awful.button({}, 5, function() -- scroll down
os.execute(string.format("%s set %s 1%%-", volume.cmd, volume.channel))
awful.spawn(string.format("%s set %s 1%%-", volume.cmd, volume.channel))
volume.update()
end)
))
@@ -99,4 +97,4 @@ volume.bar:buttons(awful.util.table.join(
## Keybindings
Read [here](https://github.com/lcpz/lain/wiki/alsa#keybindings). If you want notifications, use `volume.notify()` instead of `volume.update()`.
Read [here](https://github.com/copycat-killer/lain/wiki/alsa#keybindings). If you want notifications, use `volume.notify()` instead of `volume.update()`.