lua prompt, rules, keybind cleanup
This commit is contained in:
parent
371a2218f0
commit
d78f47867a
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
wp
|
wp
|
||||||
wallpaper
|
wallpaper
|
||||||
walls
|
walls
|
||||||
|
*.swp
|
||||||
|
|
71
bindings.lua
71
bindings.lua
|
@ -8,13 +8,10 @@ awful.button({ }, 5, awful.tag.viewprev)
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = awful.util.table.join(
|
globalkeys = awful.util.table.join(
|
||||||
--{{{
|
--{{{ Focus and Tags
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
||||||
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
||||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
||||||
awful.key({ }, "XF86Word", awful.tag.viewprev ),
|
|
||||||
awful.key({ }, "XF86WebCam", awful.tag.viewnext ),
|
|
||||||
awful.key({ }, "XF86Away", awful.tag.history.restore),
|
|
||||||
|
|
||||||
awful.key({ modkey, }, "j",
|
awful.key({ modkey, }, "j",
|
||||||
function ()
|
function ()
|
||||||
|
@ -26,13 +23,14 @@ globalkeys = awful.util.table.join(
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
|
|
||||||
|
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
|
||||||
|
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
--{{{ Layout manipulation
|
--{{{ Layout manipulation
|
||||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
||||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
|
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
|
||||||
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
|
|
||||||
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
|
|
||||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
||||||
awful.key({ modkey, }, "Tab",
|
awful.key({ modkey, }, "Tab",
|
||||||
function ()
|
function ()
|
||||||
|
@ -49,32 +47,30 @@ globalkeys = awful.util.table.join(
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
--}}}
|
--}}}
|
||||||
-- Standard program
|
--
|
||||||
|
--{{{ Spawns
|
||||||
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
||||||
-- awful.key({ modkey, }, "f", function () awful.util.spawn("firefox") end),
|
|
||||||
-- awful.key({ modkey, }, "t", function () awful.util.spawn("thunderbird") end),
|
|
||||||
-- awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end),
|
|
||||||
-- awful.key({ modkey, }, "s", function () awful.util.spawn("sunbird") end),
|
|
||||||
-- awful.key({ modkey, }, "g", function () awful.util.spawn("gmpc") end),
|
|
||||||
awful.key({ modkey, }, "f", function () awful.util.spawn("firefox") end),
|
awful.key({ modkey, }, "f", function () awful.util.spawn("firefox") end),
|
||||||
awful.key({ modkey, }, "t", function () awful.util.spawn("claws-mail") end),
|
awful.key({ modkey, }, "t", function () awful.util.spawn("claws-mail") end),
|
||||||
awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end),
|
awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end),
|
||||||
awful.key({ modkey, }, "g", function () awful.util.spawn("gmpc") end),
|
awful.key({ modkey, }, "g", function () awful.util.spawn("gmpc") end),
|
||||||
awful.key({ modkey, }, "w", function () awful.util.spawn("awsetbg -a -r /home/crater2150/.config/awesome/walls/ &") end),
|
awful.key({ modkey, }, "w", function () awful.util.spawn("awsetbg -a -r /home/crater2150/.config/awesome/walls/ &") end),
|
||||||
awful.key({ }, "XF86Mail", function () awful.util.spawn("xset dpms force off") end),
|
|
||||||
awful.key({ }, "XF86Mail", function () awful.util.spawn("xset dpms force off") end),
|
|
||||||
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
||||||
awful.key({ modkey, "Shift" }, "q", awesome.quit),
|
awful.key({ modkey, "Shift" }, "q", awesome.quit),
|
||||||
awful.key({ }, "Menu", aweswt.switch),
|
awful.key({ }, "Menu", aweswt.switch),
|
||||||
|
awful.key({ }, "Scroll_Lock", aweswt.switch),
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ tabletpc keys
|
||||||
|
|
||||||
--tabletpc keys
|
|
||||||
awful.key({ hyper }, "6", function () awful.util.spawn("/usr/local/bin/rotate") end),
|
awful.key({ hyper }, "6", function () awful.util.spawn("/usr/local/bin/rotate") end),
|
||||||
--awful.key({ modkey }, "x", function () awful.util.spawn("cellwriter --show-window") end),
|
|
||||||
awful.key({ modkey }, "x", function () teardrop("cellwriter","top","center", 0.99, 0.4)end ),
|
awful.key({ modkey }, "x", function () teardrop("cellwriter","top","center", 0.99, 0.4)end ),
|
||||||
awful.key({ modkey, "Control" }, "Delete", function () awful.util.spawn("xlock") end),
|
awful.key({ modkey, "Control" }, "Delete", function () awful.util.spawn("xlock") end),
|
||||||
|
|
||||||
-- Audio control
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Audio control
|
||||||
awful.key({ }, "Print", function () teardrop("urxvtc -e alsamixer","top","center", 0.99, 0.4)end ),
|
awful.key({ }, "Print", function () teardrop("urxvtc -e alsamixer","top","center", 0.99, 0.4)end ),
|
||||||
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2dB-")end ),
|
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2dB-")end ),
|
||||||
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2dB+")end ),
|
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2dB+")end ),
|
||||||
|
@ -89,11 +85,37 @@ globalkeys = awful.util.table.join(
|
||||||
awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
|
awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
|
||||||
awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpdmenu -a") end),
|
awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpdmenu -a") end),
|
||||||
awful.key({ modkey , "Control" }, "n", function () awful.util.spawn("mpdmenu -j") end),
|
awful.key({ modkey , "Control" }, "n", function () awful.util.spawn("mpdmenu -j") end),
|
||||||
-- Prompt
|
|
||||||
awful.key({ modkey }, "r", function () obvious.popup_run_prompt.run_prompt() end),
|
--}}}
|
||||||
awful.key({ }, "Scroll_Lock", function () awful.util.spawn("wli") end),
|
|
||||||
|
--{{{ Prompt
|
||||||
|
|
||||||
|
awful.key({ modkey }, "r", function ()
|
||||||
|
obvious.popup_run_prompt.set_prompt_string(" Run~ ")
|
||||||
|
obvious.popup_run_prompt.set_cache("history")
|
||||||
|
obvious.popup_run_prompt.set_run_function(awful.util.spawn)
|
||||||
|
obvious.popup_run_prompt.run_prompt()
|
||||||
|
end),
|
||||||
|
awful.key({ modkey }, "e", function ()
|
||||||
|
obvious.popup_run_prompt.set_prompt_string(" exec Lua~ ")
|
||||||
|
obvious.popup_run_prompt.set_cache("history_eval")
|
||||||
|
obvious.popup_run_prompt.set_run_function(awful.util.eval)
|
||||||
|
obvious.popup_run_prompt.run_prompt()
|
||||||
|
end),
|
||||||
awful.key({ }, "F12", function () teardrop(terminal,"center","center", 0.99, 0.7)end ),
|
awful.key({ }, "F12", function () teardrop(terminal,"center","center", 0.99, 0.7)end ),
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ g15Keys
|
||||||
|
|
||||||
|
awful.key({ }, "XF86Word", awful.tag.viewprev ),
|
||||||
|
awful.key({ }, "XF86WebCam", awful.tag.viewnext ),
|
||||||
|
awful.key({ }, "XF86Away", awful.tag.history.restore),
|
||||||
|
|
||||||
|
awful.key({ }, "XF86iTouch", function () awful.screen.focus_relative( 1) end),
|
||||||
|
awful.key({ }, "XF86Support", function () awful.screen.focus_relative(-1) end),
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
--{{{ Default
|
--{{{ Default
|
||||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
||||||
|
@ -113,10 +135,13 @@ clientkeys = awful.util.table.join(
|
||||||
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
|
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
|
||||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
|
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
|
||||||
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
||||||
awful.key({ modkey, }, "o", function (c) c.ontop = not c.ontop end),
|
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
||||||
|
awful.key({ modkey, "Control" }, "o", function (c) c.ontop = not c.ontop end),
|
||||||
awful.key({ modkey, }, "a", function (c) c.sticky = not c.sticky end),
|
awful.key({ modkey, }, "a", function (c) c.sticky = not c.sticky end),
|
||||||
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
|
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
|
||||||
awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end)
|
awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end),
|
||||||
|
|
||||||
|
awful.key({ }, "XF86Calculater", awful.client.movetoscreen )
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Compute the maximum number of digit we need, limited to 9
|
-- Compute the maximum number of digit we need, limited to 9
|
||||||
|
|
24
rules.lua
24
rules.lua
|
@ -15,44 +15,34 @@ awful.rules.rules = {
|
||||||
properties = { floating = true,
|
properties = { floating = true,
|
||||||
ontop = true,
|
ontop = true,
|
||||||
focus = true } },
|
focus = true } },
|
||||||
{ rule = { class = "Teardrop" },
|
|
||||||
properties = { floating = true, tag = tags[1][12] } },
|
|
||||||
{ rule = { class = "pinentry" },
|
{ rule = { class = "pinentry" },
|
||||||
properties = { floating = true } },
|
properties = { floating = true } },
|
||||||
{ rule = { class = "gimp" },
|
{ rule = { class = "gimp" },
|
||||||
properties = { floating = true } },
|
properties = { floating = true } },
|
||||||
-- Set Firefox to always map on tags number 2 of screen 1.
|
-- Set Firefox to always map on tags number 2 of screen 1.
|
||||||
{ rule = { class = "Firefox" },
|
{ rule = { class = "Firefox", instance = "Navigator" },
|
||||||
properties = { tag = tags[1][2],
|
properties = { tag = tags[2][2],
|
||||||
floating = false } },
|
floating = false } },
|
||||||
{ rule = { class = "Pidgin" },
|
{ rule = { class = "Pidgin" },
|
||||||
properties = { tag = tags[1][3]} },
|
properties = { tag = tags[2][3]} },
|
||||||
{ rule = { role = "buddy_list" },
|
{ rule = { role = "buddy_list" },
|
||||||
properties = { master = true } },
|
properties = { master = true } },
|
||||||
{ rule = { role = "conversation" },
|
{ rule = { role = "conversation" },
|
||||||
callback = awful.client.setslave},
|
callback = awful.client.setslave},
|
||||||
{ rule = { instance = "Irssi"},
|
{ rule = { instance = "Weechat"},
|
||||||
properties = { tag = tags[1][3]} ,
|
properties = { tag = tags[2][3]} ,
|
||||||
callback = awful.client.setslave},
|
callback = awful.client.setslave},
|
||||||
{ rule = { class = "Irssi"},
|
{ rule = { class = "Irssi"},
|
||||||
properties = { tag = tags[1][3]} ,
|
properties = { tag = tags[2][3]} ,
|
||||||
callback = awful.client.setslave},
|
callback = awful.client.setslave},
|
||||||
{ rule = { class = "Claws-mail" },
|
{ rule = { class = "Claws-mail" },
|
||||||
properties = { tag = tags[1][4] } },
|
properties = { tag = tags[2][4] } },
|
||||||
{ rule = { class = "Thunderbird" },
|
|
||||||
properties = { tag = tags[1][4] } },
|
|
||||||
{ rule = { class = "Claws-mail" },
|
|
||||||
properties = { tag = tags[1][4] } },
|
|
||||||
{ rule = { class = "Sunbird-bin" },
|
|
||||||
properties = { tag = tags[1][5] } },
|
|
||||||
{ rule = { class = "Gmpc" },
|
{ rule = { class = "Gmpc" },
|
||||||
properties = { tag = tags[1][6] } },
|
properties = { tag = tags[1][6] } },
|
||||||
{ rule = { class = "Deluge" },
|
{ rule = { class = "Deluge" },
|
||||||
properties = { tag = tags[1][7] } },
|
properties = { tag = tags[1][7] } },
|
||||||
{ rule = { class = "Xhtop" },
|
{ rule = { class = "Xhtop" },
|
||||||
properties = { tag = tags[1][22] } },
|
properties = { tag = tags[1][22] } },
|
||||||
--{ rule = { class = "OpenOffice.org 3.2" },
|
|
||||||
--properties = { floating = false } },
|
|
||||||
{ rule = { class = "Cellwriter" },
|
{ rule = { class = "Cellwriter" },
|
||||||
properties = { tag = tags[1][1],
|
properties = { tag = tags[1][1],
|
||||||
ontop = true,
|
ontop = true,
|
||||||
|
|
Loading…
Reference in a new issue