Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
awesome-wm-widgets-streetturtle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hglawe
awesome-wm-widgets-streetturtle
Commits
f62cf5f0
Commit
f62cf5f0
authored
3 years ago
by
streetturtle
Browse files
Options
Downloads
Patches
Plain Diff
update readme
parent
dddcd72e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
volume-widget/README.md
+2
-1
2 additions, 1 deletion
volume-widget/README.md
volume-widget/volume.lua
+4
-4
4 additions, 4 deletions
volume-widget/volume.lua
with
6 additions
and
5 deletions
volume-widget/README.md
+
2
−
1
View file @
f62cf5f0
...
...
@@ -57,7 +57,8 @@ It is possible to customize the widget by providing a table with all or some of
| Name | Default | Description |
|---|---|---|
|
`mixer_cmd`
|
`pavucontrol`
| command to run on middle click (e.g. a mixer program) |
|
`widget_type`
|
`icon_and_text`
| Widget type, one of
`horizontal_bar`
,
`vertical_bar`
,
`icon`
,
`icon_and_text`
,
`arc`
|
|
`widget_type`
|
`icon_and_text`
| widget type, one of
`horizontal_bar`
,
`vertical_bar`
,
`icon`
,
`icon_and_text`
,
`arc`
|
|
`step`
| 5 | the percentage step when increasing/decreasing the volume
Depending on the chosen widget type add parameters from the corresponding section below:
...
...
This diff is collapsed.
Click to expand it.
volume-widget/volume.lua
+
4
−
4
View file @
f62cf5f0
...
...
@@ -18,8 +18,8 @@ local utils = require("awesome-wm-widgets.volume-widget.utils")
local
LIST_DEVICES_CMD
=
[[sh -c "pacmd list-sinks; pacmd list-sources"]]
local
GET_VOLUME_CMD
=
'amixer -D pulse sget Master'
local
INC_VOLUME_CMD
local
DEC_VOLUME_CMD
local
INC_VOLUME_CMD
=
'amixer -D pulse sset Master %d%%+'
local
DEC_VOLUME_CMD
=
'amixer -D pulse sset Master %d%%-'
local
TOG_VOLUME_CMD
=
'amixer -D pulse sset Master toggle'
...
...
@@ -168,8 +168,8 @@ local function worker(user_args)
local
refresh_rate
=
args
.
refresh_rate
or
1
local
step
=
args
.
step
or
5
INC_VOLUME_CMD
=
'amixer -D pulse sset Master '
..
step
..
'%+'
DEC_VOLUME_CMD
=
'amixer -D pulse sset Master '
..
step
..
'%-'
INC_VOLUME_CMD
=
string.format
(
INC_VOLUME_CMD
,
step
)
DEC_VOLUME_CMD
=
string.format
(
DEC_VOLUME_CMD
,
step
)
if
widget_types
[
widget_type
]
==
nil
then
volume
.
widget
=
widget_types
[
'icon_and_text'
].
get_widget
(
args
.
icon_and_text_args
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment