-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathawemedia.lua
49 lines (39 loc) · 1013 Bytes
/
awemedia.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-- awemedia.lua
local awful = require("awful")
local client = client
local pairs = pairs
local print = print
local USE_T = true
function media_key(key)
os.execute("/home/gp/.config/awesome/mediakeys.sh "..key)
end
function volume(chanel, sign)
os.execute("amixer -D pulse set "..chanel.." 1+ unmute")
os.execute("amixer sset "..chanel.." 3%"..sign)
end
function mute(chanel)
os.execute("amixer -D pulse set "..chanel.." 1+ toggle")
end
function app_is_active(app_name, clients)
for i, c in pairs(clients) do
if app_name == c.instance then
return true
end
end
return false
end
function get_player_status(player)
os.execute("/home/gp/.config/awesome/playerStatus.sh "..player)
for line in io.lines("/tmp/awesomeps1") do
status = line
end
return status
end
--[[function sleep(n)
local t0 = clock()
while clock() - t0 <= n do end
end]]--
--[[
--note to self:
--io.popen gives more control over bash commands)
--]]