Skip to content

Commit

Permalink
Added some volume shortcuts to support non-multimedia keyboards.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeyZ committed Jul 2, 2013
1 parent 2eb1cee commit 46cf9ba
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions rc.lua
Expand Up @@ -11,6 +11,8 @@ local xrandr = require("xrandr")
local error = require("error")

local terminal = "urxvt -e zsh -c 'tmux attach'"
local browser = "chromium"
local editor = "gvim"
local modkey = "Mod4"
local home = os.getenv("HOME")
local confdir = home .. "/.config/awesome"
Expand All @@ -22,7 +24,7 @@ local active_theme = themes .. "/myzenburn"
-- {{{ Theme initialization
beautiful.init(active_theme .. "/theme.lua")
--beautiful.wallpaper = wallpapers .. "/pacman.jpg"
beautiful.wallpaper = wallpapers .. "/coffee.jpg"
beautiful.wallpaper = wallpapers .. "/nodejs.png"

if beautiful.wallpaper then
for s = 1, screen.count() do
Expand Down Expand Up @@ -169,7 +171,7 @@ for s = 1, screen.count() do
left_layout:add(mypromptbox[s])

local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then
if screen.count() == 2 and s == 2 or screen.count() == 1 then
right_layout:add(mpdicon)
right_layout:add(mpdwidget)
right_layout:add(space)
Expand Down Expand Up @@ -222,6 +224,8 @@ globalkeys = awful.util.table.join(
awful.client.movetotag(tags[mouse.screen][dstidx], c)
end),
awful.key({ modkey, }, "Return", function() awful.util.spawn(terminal) end),
awful.key({ modkey, }, "F9", function() awful.util.spawn(editor) end),
awful.key({ modkey, }, "F10", function() awful.util.spawn(browser) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Control" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function() awful.tag.incmwfact( 0.05) end),
Expand All @@ -239,6 +243,15 @@ globalkeys = awful.util.table.join(
end),
awful.key({ }, "XF86AudioMute", function()
awful.util.spawn("amixer set Master toggle", false)
end),
awful.key({ "Mod4" }, "F3", function()
awful.util.spawn("amixer set Master 1%+", false)
end),
awful.key({ "Mod4" }, "F2", function()
awful.util.spawn("amixer set Master 1%-", false)
end),
awful.key({ "Mod4" }, "F1", function()
awful.util.spawn("amixer set Master toggle", false)
end)
)

Expand Down Expand Up @@ -305,6 +318,7 @@ rules.rules = {
size_hints_honor = false
}
},
{ rule = { class = "Exe"}, properties = {floating = true} },
}
-- }}}

Expand Down

0 comments on commit 46cf9ba

Please sign in to comment.