X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/71fd31c2d9b0b43c41c5354cbbe1daed186d0578..3329c3e7fd0f5679c6014b59ac75fce93991fb2c:/awesome/rc.lua diff --git a/awesome/rc.lua b/awesome/rc.lua index 454d441..ead665c 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -66,26 +66,8 @@ if beautiful.wallpaper then end -- }}} --- {{{ Menu --- Create a laucher widget and a main menu -myawesomemenu = { - { "manual", terminal .. " -e man awesome" }, - { "edit config", editor_cmd .. " " .. awesome.conffile }, - { "restart", awesome.restart }, - { "quit", awesome.quit } -} - -mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "open terminal", terminal } - } - }) - -mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, - menu = mymainmenu }) - --- Menubar configuration -menubar.utils.terminal = terminal -- Set the terminal for applications that require it --- }}} +--Menu +require("menu") -- {{{ Wibox -- Create a textclock widget @@ -122,6 +104,7 @@ mytasklist.buttons = awful.util.table.join( c:raise() end end), + awful.button({ }, 2, function (c) c:kill() end), awful.button({ }, 3, function () if instance then instance:hide() @@ -185,26 +168,8 @@ end -- Mouse/Key Bindings require("bindings") --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons } }, - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - { rule = { class = "pinentry" }, - properties = { floating = true } }, - { rule = { class = "gimp" }, - properties = { floating = true } }, - -- Set Firefox to always map on tags number 2 of screen 1. - -- { rule = { class = "Firefox" }, - -- properties = { tag = tags[1][2] } }, -} --- }}} +-- Rules +require("rules") -- {{{ Signals -- Signal function to execute when a new client appears. @@ -228,51 +193,6 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_offscreen(c) end end - - local titlebars_enabled = false - if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then - -- buttons for the titlebar - local buttons = awful.util.table.join( - awful.button({ }, 1, function() - client.focus = c - c:raise() - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - client.focus = c - c:raise() - awful.mouse.client.resize(c) - end) - ) - - -- Widgets that are aligned to the left - local left_layout = wibox.layout.fixed.horizontal() - left_layout:add(awful.titlebar.widget.iconwidget(c)) - left_layout:buttons(buttons) - - -- Widgets that are aligned to the right - local right_layout = wibox.layout.fixed.horizontal() - right_layout:add(awful.titlebar.widget.floatingbutton(c)) - right_layout:add(awful.titlebar.widget.maximizedbutton(c)) - right_layout:add(awful.titlebar.widget.stickybutton(c)) - right_layout:add(awful.titlebar.widget.ontopbutton(c)) - right_layout:add(awful.titlebar.widget.closebutton(c)) - - -- The title goes in the middle - local middle_layout = wibox.layout.flex.horizontal() - local title = awful.titlebar.widget.titlewidget(c) - title:set_align("center") - middle_layout:add(title) - middle_layout:buttons(buttons) - - -- Now bring it all together - local layout = wibox.layout.align.horizontal() - layout:set_left(left_layout) - layout:set_right(right_layout) - layout:set_middle(middle_layout) - - awful.titlebar(c):set_widget(layout) - end end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)