aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/awesome/services/common.lua64
1 files changed, 32 insertions, 32 deletions
diff --git a/.config/awesome/services/common.lua b/.config/awesome/services/common.lua
index 9657c8a..f3730c0 100644
--- a/.config/awesome/services/common.lua
+++ b/.config/awesome/services/common.lua
@@ -33,11 +33,11 @@ local function read(file, format)
end
-- create file in case it's not there yet
-if not gfs.file_readable "/tmp/wp_audio_status" then
- assert(io.open("/tmp/wp_audio_status", "w")):write("{}"):close()
-end
+-- if not gfs.file_readable "/tmp/wp_audio_status" then
+-- assert(io.open("/tmp/wp_audio_status", "w")):write("{}"):close()
+-- end
-local audio_file = qnative.util.open_file "/tmp/wp_audio_status"
+-- local audio_file = qnative.util.open_file "/tmp/wp_audio_status"
-- qstore.brightness_file = qnative.util.open_file "/sys/class/backlight/amdgpu_bl1/actual_brightness"
local wifi_file = qnative.util.open_file "/proc/net/wireless"
@@ -48,34 +48,34 @@ local wifi_file = qnative.util.open_file "/proc/net/wireless"
---@type table<string, Service>
local services = {
- audio = {
- -- volume, muted
- function()
- local audio_status = qjson.decode(read(audio_file))
- local default_sink = audio_status["G435 Wireless Gaming Headset Analog Stereo"]
-
- if not default_sink then
- return nil, false
- end
-
- return default_sink.volume, default_sink.muted
- end,
- function(volume, muted)
- if muted or not volume then
- return phosphor.speaker_simple_x_fill, qcolor.palette.red()
- end
-
- local icon_data = qmath.step_value(volume, {
- { 0, "slash" },
- { 25, "none" },
- { 50, "low" },
- { 75, "high" },
- { 100 },
- })
-
- return phosphor["speaker_simple_" .. icon_data .. "_fill"], qcolor.palette.fg()
- end,
- },
+ -- audio = {
+ -- -- volume, muted
+ -- function()
+ -- local audio_status = qjson.decode(read(audio_file))
+ -- local default_sink = audio_status["G435 Wireless Gaming Headset Analog Stereo"]
+ --
+ -- if not default_sink then
+ -- return nil, false
+ -- end
+ --
+ -- return default_sink.volume, default_sink.muted
+ -- end,
+ -- function(volume, muted)
+ -- if muted or not volume then
+ -- return phosphor.speaker_simple_x_fill, qcolor.palette.red()
+ -- end
+ --
+ -- local icon_data = qmath.step_value(volume, {
+ -- { 0, "slash" },
+ -- { 25, "none" },
+ -- { 50, "low" },
+ -- { 75, "high" },
+ -- { 100 },
+ -- })
+ --
+ -- return phosphor["speaker_simple_" .. icon_data .. "_fill"], qcolor.palette.fg()
+ -- end,
+ -- },
-- brightness = {
-- -- brightness
-- function()