Initial commit
This commit is contained in:
17
src/util/mpris.lua
Normal file
17
src/util/mpris.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local function play_pause()
|
||||
os.execute('playerctl play-pause')
|
||||
end
|
||||
|
||||
local function previous()
|
||||
os.execute('playerctl previous')
|
||||
end
|
||||
|
||||
local function skip()
|
||||
os.execute('playerctl next')
|
||||
end
|
||||
|
||||
return {
|
||||
play_pause = play_pause,
|
||||
skip = skip,
|
||||
previous = previous
|
||||
}
|
||||
7
src/util/path.lua
Normal file
7
src/util/path.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
local fs = require('gears.filesystem')
|
||||
|
||||
print(awesome.conffile)
|
||||
|
||||
return {
|
||||
conf_dir = awesome.conffile:match('^(.+)/')
|
||||
}
|
||||
23
src/util/volume.lua
Normal file
23
src/util/volume.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
local volume_changed_signal = 'volume_changed'
|
||||
|
||||
local function toggle_mute()
|
||||
os.execute('wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle')
|
||||
awesome.emit_signal(volume_changed_signal)
|
||||
end
|
||||
|
||||
local function vol_up()
|
||||
os.execute('wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+')
|
||||
awesome.emit_signal(volume_changed_signal)
|
||||
end
|
||||
|
||||
local function vol_down()
|
||||
os.execute('wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-')
|
||||
awesome.emit_signal(volume_changed_signal)
|
||||
end
|
||||
|
||||
return {
|
||||
volume_changed_signal = volume_changed_signal,
|
||||
toggle_mute = toggle_mute,
|
||||
vol_up = vol_up,
|
||||
vol_down = vol_down,
|
||||
}
|
||||
Reference in New Issue
Block a user