Created
March 14, 2012 12:26
-
-
Save crater2150/2036143 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function client_opacity_set(c, default, max, step) | |
if c.opacity < 0 or c.opacity > 1 then | |
c.opacity = default | |
end | |
if c.opacity * step < (max-step) * step then | |
c.opacity = c.opacity + step | |
else | |
c.opacity = max | |
end | |
end | |
clientkeys = awful.util.table.join( | |
-- insert other clientkeys here ... | |
awful.key({ modkey, }, "Up", function(c) client_opacity_set(c, 1, 1, 0.1) end), | |
awful.key({ modkey, }, "Down", function(c) client_opacity_set(c, 1, 0, -0.1) end), | |
) | |
awful.rules.rules = { | |
-- ... | |
{ rule = { class = "Pidgin" }, | |
properties = { tag = tags[rule_screen][3], opacity = 0.9 } }, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment