X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/83a938857fe5f2b5872b13553931031699e73073..a5a6195ce76d754b5f02946ec474213ac79af103:/.config/awesome/rc.lua diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index fc513be..ce317dd 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -1,4 +1,5 @@ -- {{{ Imports + -- Standard awesome library local gears = require("gears") local awful = require("awful") @@ -943,16 +944,18 @@ awful.key({ cmdkey }, "Down", function () awful.spawn("pap next") end), awful.key({ cmdkey }, "Right", function () awful.spawn("pap seek +10") end), awful.key({ cmdkey, "Shift" }, "Right", function () awful.spawn("pap seek +60") end), awful.key({ cmdkey }, "space", function () awful.spawn("pap pause") end), -awful.key({ cmdkey }, "\\", function () run_output_notify("pap info") end), -awful.key({ cmdkey }, "]", function () run_output_notify("pap list") end) +awful.key({ cmdkey }, "\\", function () run_output_notify("pap info", "Track info") end), +awful.key({ cmdkey }, "]", function () run_output_notify("pap list", "Playlist") end) ) -function run_output_notify(cmd) +function run_output_notify(cmd, title) awful.spawn.easy_async(cmd, function(stdout, stderr, reason, exit_code) - naughty.notify({ - preset = naughty.config.presets.low, - title = "Playlist", - text = stdout}) + if #stdout > 1 then + naughty.notify({ + preset = naughty.config.presets.low, + title = title, + text = stdout}) + end end) end @@ -1139,12 +1142,12 @@ client.connect_signal("manage", function (c) -- Set the windows at the slave, -- i.e. put it at the end of others instead of setting it master. -- if not awesome.startup then awful.client.setslave(c) end - if not awesome.startup then - local t = awful.screen.focused().selected_tag - if t.name == "xmutt" then - awful.client.setslave(c) - end - end + --if not awesome.startup then + -- local t = awful.screen.focused().selected_tag + -- if t.name == "xmutt" then + -- awful.client.setslave(c) + -- end + --end if awesome.startup and not c.size_hints.user_position @@ -1205,6 +1208,8 @@ client.connect_signal("mouse::enter", function(c) and awful.client.focus.filter(c) then client.focus = c end +--17 18:03 < psychon> madduck: yes. In the default config at the very end there is code that actives a client on mouse::enter. Just add if c.class == "whatever virt-viewer uses" then return end to that, or +-- something like this end) client.connect_signal("focus", function(c)