Initial commit

This commit is contained in:
2024-07-06 20:31:50 +02:00
commit b5f83958c9
299 changed files with 11284 additions and 0 deletions

17
src/util/mpris.lua Normal file
View 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
View 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
View 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,
}