Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xlockmore + mediakeys: mute bei VolUp/VolDown
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4565

PostPosted: Tue Aug 27, 2013 8:30 am    Post subject: xlockmore + mediakeys: mute bei VolUp/VolDown Reply with quote

Das Problem schleppe ich schon einige Zeit mir mir rum. Wenn ich mit meinen mediakeys (an laptop Lenovo L520) die Lautstärke hoch und runter stelle, wird automatisch gemutet. Aber nicht immer, manchmal geht es.
Hatte anfangs meine awesome-config in Verdacht:
Code:
function volume (mode, widget)
    local cardid  = 0
    local channel = "Master"
    if mode == "update" then
        local status = io.popen("amixer -c " .. cardid .. " -- sget " .. channel):read("*all")
       
        local volume = tonumber(string.match(status, "(%d?%d?%d)%%"))

        status = string.match(status, "%[(o[^%]]*)%]")

        local color = "#FF0000"
        if string.find(status, "on", 1, true) then
             color = "#00FF00"
        end
        status = ""
        for i = 1, math.floor(volume / 10) do
            status = status .. "|"
        end
        for i = math.floor(volume / 10) + 1, 10 do
            status = status .. ":"
        end
        status = "-[" ..status .. "]+"
        widget:set_markup("<span color=\"" .. color .. "\">" .. status .. "</span>")
    elseif mode == "up" then
        os.execute("amixer -q -c " .. cardid .. " sset " .. channel .. " 5%+")
        volume("update", widget)
    elseif mode == "down" then
        os.execute("amixer -q -c " .. cardid .. " sset " .. channel .. " 5%-")
        volume("update", widget)
    elseif mode == "mute" then
        os.execute("amixer -c " .. cardid .. " sset " .. channel .. " toggle")
        volume("update", widget)
    else
        volume("update", widget)
    end
end

tb_volume = wibox.widget.textbox()
tb_volume:buttons(awful.util.table.join(
    awful.button({ }, 4, function () volume("up", tb_volume) end),
    awful.button({ }, 5, function () volume("down", tb_volume) end),
    awful.button({ }, 1, function () volume("mute", tb_volume) end)
))
....
    awful.key({ }, "XF86AudioMute", function() volume("mute", tb_volume) end),
    awful.key({ }, "XF86AudioRaiseVolume", function() volume("up", tb_volume) end),
    awful.key({ }, "XF86AudioLowerVolume", function() volume("down", tb_volume) end),

Aber Mausrad auf dem widget funktioniert problemlos.
Da es aber alles andere als reproduzierbar war, hab ich erstmal damit gelebt.
Durch Zufall habe ich aber jetzt einen Weg gefunden, das Verhalten zu reproduzieren:
xlock -mode blank - bei gelocktem screen dann die Mute-Taste drücken. Einloggen. Und schon wird bei Volup und VolDown gemutet aber nicht mehr un-mutet). Wieder locken, Mute drücken -> VolUp und VolDown muten nicht mehr.
Kann das jemand bestätigen?
xlockmore ist schnell installiert, xlock sollte dann nichts böses machen und in jedem DE funktionieren. Wäre nett, wenn das jemand testen könnte, ich würde dann einen Bugreport aufmachen.

Grüße
Franz
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4555
Location: Germany

PostPosted: Mon Sep 02, 2013 3:43 pm    Post subject: Reply with quote

franzf wrote:
Durch Zufall habe ich aber jetzt einen Weg gefunden, das Verhalten zu reproduzieren:
xlock -mode blank - bei gelocktem screen dann die Mute-Taste drücken. Einloggen. Und schon wird bei Volup und VolDown gemutet aber nicht mehr un-mutet). Wieder locken, Mute drücken -> VolUp und VolDown muten nicht mehr.
Kann das jemand bestätigen?
xlockmore ist schnell installiert, xlock sollte dann nichts böses machen und in jedem DE funktionieren. Wäre nett, wenn das jemand testen könnte, ich würde dann einen Bugreport aufmachen.

Hallo Franz, auch wenn es vermutlich nicht viel hilft,
ich habs hier mal kurz unter kde mit xlockmore-5.43 getestet, und kann es so nicht bestätigen.
In der mit "$ xlock -mode blank" gesperrten Session sind Multimediatasten wie VolUp und VolDown und Mute hier unwirksam (so wie in einer im kde gesperrten Session mit Strg+Alt+L auch)
Nach dem entsperren (mit PW+Enter) funktionieren VolUp und VolDown und Mute wieder einwandfrei. In konsole gibt es dann den Hinweis
xlock: unexpected event: 34
aus der einst gesperrten Session.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum