Advertisement
conformist

rc.lua

Apr 16th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.32 KB | None | 0 0
  1. -- Standard awesome library
  2. local gears = require("gears")
  3. local awful = require("awful")
  4. local lain = require("lain")
  5. awful.rules = require("awful.rules")
  6. require("awful.autofocus")
  7. -- Widget and layout library
  8. local wibox = require("wibox")
  9. local vicious = require("vicious")
  10. -- Theme handling library
  11. local beautiful = require("beautiful")
  12. -- Notification library
  13. local naughty = require("naughty")
  14. local menubar = require("menubar")
  15.  
  16. -- Load Debian menu entries
  17. require("debian.menu")
  18.  
  19. -- {{{ Error handling
  20. -- Check if awesome encountered an error during startup and fell back to
  21. -- another config (This code will only ever execute for the fallback config)
  22. if awesome.startup_errors then
  23.     naughty.notify({ preset = naughty.config.presets.critical,
  24.                      title = "Oops, there were errors during startup!",
  25.                      text = awesome.startup_errors })
  26. end
  27.  
  28. -- Handle runtime errors after startup
  29. do
  30.     local in_error = false
  31.     awesome.connect_signal("debug::error", function (err)
  32.         -- Make sure we don't go into an endless error loop
  33.         if in_error then return end
  34.         in_error = true
  35.  
  36.         naughty.notify({ preset = naughty.config.presets.critical,
  37.                          title = "Oops, an error happened!",
  38.                          text = err })
  39.         in_error = false
  40.     end)
  41. end
  42. -- }}}
  43.  
  44. -- {{{ Variable definitions
  45. -- Themes define colours, icons, and wallpapers
  46. beautiful.init("/usr/share/awesome/themes/zenburn/theme.lua")
  47.  
  48. -- This is used later as the default terminal and editor to run.
  49. terminal = "mate-terminal"
  50. browser = "google-chrome"
  51. editor = os.getenv("EDITOR") or "editor"
  52. editor_cmd = terminal .. " -e " .. editor
  53.  
  54. -- Default modkey.
  55. -- Usually, Mod4 is the key with a logo between Control and Alt.
  56. -- If you do not like this or do not have such a key,
  57. -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
  58. -- However, you can use another modifier like Mod1, but it may interact with others.
  59. modkey = "Mod1"
  60.  
  61. -- Table of layouts to cover with awful.layout.inc, order matters.
  62. local layouts =
  63. {
  64.     awful.layout.suit.floating,
  65.     awful.layout.suit.tile,
  66.     awful.layout.suit.tile.left,
  67.     --awful.layout.suit.tile.bottom,
  68.     --awful.layout.suit.tile.top,
  69.     awful.layout.suit.fair,
  70.     --awful.layout.suit.fair.horizontal,
  71.     --awful.layout.suit.spiral,
  72.     --awful.layout.suit.spiral.dwindle,
  73.     awful.layout.suit.max,
  74.     --awful.layout.suit.max.fullscreen,
  75.     --awful.layout.suit.magnifier
  76. }
  77. -- }}}
  78.  
  79. -- {{{ Wallpaper
  80. if beautiful.wallpaper then
  81.     for s = 1, screen.count() do
  82.         gears.wallpaper.maximized(beautiful.wallpaper, s, true)
  83.     end
  84. end
  85. -- }}}
  86.  
  87. -- {{{ Tags
  88. -- Define a tag table which hold all screen tags.
  89. tags = {}
  90. for s = 1, screen.count() do
  91.     -- Each screen has its own tag table.
  92.     tags[s] = awful.tag({ "chat", "www", "media", "term", "extra" }, s, {layouts[2], layouts[5], layouts[1], layouts[1], layouts[1]})
  93. end
  94. -- }}}
  95.  
  96. -- {{{ Menu
  97. -- Create a laucher widget and a main menu
  98. myawesomemenu = {
  99.    { "manual", terminal .. " -e man awesome" },
  100.    { "edit config", editor_cmd .. " " .. awesome.conffile },
  101.    { "restart", awesome.restart },
  102.    { "quit", awesome.quit }
  103. }
  104.  
  105. mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
  106.                                     { "Debian", debian.menu.Debian_menu.Debian },
  107.                                     { "open terminal", terminal }
  108.                                   }
  109.                         })
  110.  
  111. mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
  112.                                      menu = mymainmenu })
  113. -- Menubar configuration
  114. menubar.utils.terminal = terminal -- Set the terminal for applications that require it
  115. -- }}}
  116.  
  117. -- alsamixer
  118.  
  119. local alsawidget =
  120. {
  121.     channel = "Master",
  122.     step = "1dB",
  123.     colors =
  124.     {
  125.         unmute = "#AECF96",
  126.         mute = "#FF5656",
  127.         bg = "#494B4F"
  128.     },
  129.     mixer = terminal .. " -e alsamixer", -- or whatever your preferred sound mixer is
  130.     notifications =
  131.     {
  132.         icons =
  133.         {
  134.             -- the first item is the 'muted' icon
  135.             "/usr/share/icons/gnome/48x48/status/audio-volume-muted.png",
  136.             -- the rest of the items correspond to intermediate volume levels - you can have as many as you want (but must be >= 1)
  137.             "/usr/share/icons/gnome/48x48/status/audio-volume-low.png",
  138.             "/usr/share/icons/gnome/48x48/status/audio-volume-medium.png",
  139.             "/usr/share/icons/gnome/48x48/status/audio-volume-high.png"
  140.         },
  141.         font = "Monospace 11", -- must be a monospace font for the bar to be sized consistently
  142.         icon_size = 48,
  143.         bar_size = 20 -- adjust to fit your font if the bar doesn't fit
  144.     }
  145. }
  146.  
  147. function alsa (action)
  148.     awful.util.spawn ("amixer sset " .. alsawidget.channel .. " " .. action)
  149. end
  150.  
  151. -- widget
  152. alsawidget.bar = awful.widget.progressbar ()
  153. alsawidget.bar:set_width (8)
  154. alsawidget.bar:set_vertical (true)
  155. alsawidget.bar:set_background_color (alsawidget.colors.bg)
  156. alsawidget.bar:set_color (alsawidget.colors.unmute)
  157. alsawidget.bar:buttons (awful.util.table.join (
  158.     awful.button ({}, 1, function()
  159.         awful.util.spawn (alsawidget.mixer)
  160.     end),
  161.     awful.button ({}, 3, function()
  162.         alsa ("toggle")
  163.         vicious.force ({ alsawidget.bar })
  164.     end),
  165.     awful.button ({}, 4, function()
  166.         alsa (alsawidget.step .. "+")
  167.         vicious.force ({ alsawidget.bar })
  168.     end),
  169.     awful.button ({}, 5, function()
  170.         alsa (alsawidget.step .. "-")
  171.         vicious.force ({ alsawidget.bar })
  172.     end)
  173. ))
  174. -- tooltip
  175. alsawidget.tooltip = awful.tooltip ({ objects = { alsawidget.bar } })
  176. -- naughty notifications
  177. alsawidget._current_level = 0
  178. alsawidget._muted = false
  179. function alsawidget:notify ()
  180.     local preset =
  181.     {
  182.         height = 75,
  183.         width = 300,
  184.         font = alsawidget.notifications.font
  185.     }
  186.     local i = 1;
  187.     while alsawidget.notifications.icons[i + 1] ~= nil
  188.     do
  189.         i = i + 1
  190.     end
  191.     if i >= 2
  192.     then
  193.         preset.icon_size = alsawidget.notifications.icon_size
  194.         if alsawidget._muted or alsawidget._current_level == 0
  195.         then
  196.             preset.icon = alsawidget.notifications.icons[1]
  197.         elseif alsawidget._current_level == 100
  198.         then
  199.             preset.icon = alsawidget.notifications.icons[i]
  200.         else
  201.             local int = math.modf (alsawidget._current_level / 100 * (i - 1))
  202.             preset.icon = alsawidget.notifications.icons[int + 2]
  203.         end
  204.     end
  205.     if alsawidget._muted
  206.     then
  207.         preset.title = alsawidget.channel .. " - Muted"
  208.     elseif alsawidget._current_level == 0
  209.     then
  210.         preset.title = alsawidget.channel .. " - 0% (muted)"
  211.         preset.text = "[" .. string.rep (" ", alsawidget.notifications.bar_size) .. "]"
  212.     elseif alsawidget._current_level == 100
  213.     then
  214.         preset.title = alsawidget.channel .. " - 100% (max)"
  215.         preset.text = "[" .. string.rep ("|", alsawidget.notifications.bar_size) .. "]"
  216.     else
  217.         local int = math.modf (alsawidget._current_level / 100 * alsawidget.notifications.bar_size)
  218.         preset.title = alsawidget.channel .. " - " .. alsawidget._current_level .. "%"
  219.         preset.text = "[" .. string.rep ("|", int) .. string.rep (" ", alsawidget.notifications.bar_size - int) .. "]"
  220.     end
  221.     if alsawidget._notify ~= nil
  222.     then
  223.  
  224.         alsawidget._notify = naughty.notify (
  225.         {
  226.             replaces_id = alsawidget._notify.id,
  227.             preset = preset
  228.         })
  229.     else
  230.         alsawidget._notify = naughty.notify ({ preset = preset })
  231.     end
  232. end
  233. -- register the widget through vicious
  234. vicious.register (alsawidget.bar, vicious.widgets.volume, function (widget, args)
  235.     alsawidget._current_level = args[1]
  236.     if args[2] == "♩"
  237.     then
  238.         alsawidget._muted = true
  239.         alsawidget.tooltip:set_text (" [Muted] ")
  240.         widget:set_color (alsawidget.colors.mute)
  241.         return 100
  242.     end
  243.     alsawidget._muted = false
  244.     alsawidget.tooltip:set_text (" " .. alsawidget.channel .. ": " .. args[1] .. "% ")
  245.     widget:set_color (alsawidget.colors.unmute)
  246.     return args[1]
  247. end, 5, alsawidget.channel) -- relatively high update time, use of keys/mouse will force update
  248. -- {{{ Wibox
  249. -- Create a textclock widget
  250. mytextclock = awful.widget.textclock("%R")
  251. --Calendar
  252. lain.widgets.calendar:attach(mytextclock)
  253. -- Create a wibox for each screen and add it
  254. mywibox = {}
  255. mypromptbox = {}
  256. mylayoutbox = {}
  257. mytaglist = {}
  258. mytaglist.buttons = awful.util.table.join(
  259.                     awful.button({ }, 1, awful.tag.viewonly),
  260.                     awful.button({ modkey }, 1, awful.client.movetotag),
  261.                     awful.button({ }, 3, awful.tag.viewtoggle),
  262.                     awful.button({ modkey }, 3, awful.client.toggletag),
  263.                     awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
  264.                     awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
  265.                     )
  266. mytasklist = {}
  267. mytasklist.buttons = awful.util.table.join(
  268.                      awful.button({ }, 1, function (c)
  269.                                               if c == client.focus then
  270.                                                   c.minimized = true
  271.                                               else
  272.                                                   -- Without this, the following
  273.                                                   -- :isvisible() makes no sense
  274.                                                   c.minimized = false
  275.                                                   if not c:isvisible() then
  276.                                                       awful.tag.viewonly(c:tags()[1])
  277.                                                   end
  278.                                                   -- This will also un-minimize
  279.                                                   -- the client, if needed
  280.                                                   client.focus = c
  281.                                                   c:raise()
  282.                                               end
  283.                                           end),
  284.                      awful.button({ }, 3, function ()
  285.                                               if instance then
  286.                                                   instance:hide()
  287.                                                   instance = nil
  288.                                               else
  289.                                                   instance = awful.menu.clients({ width=250 })
  290.                                               end
  291.                                           end),
  292.                      awful.button({ }, 4, function ()
  293.                                               awful.client.focus.byidx(1)
  294.                                               if client.focus then client.focus:raise() end
  295.                                           end),
  296.                      awful.button({ }, 5, function ()
  297.                                               awful.client.focus.byidx(-1)
  298.                                               if client.focus then client.focus:raise() end
  299.                                           end))
  300.  
  301. for s = 1, screen.count() do
  302.     -- Create a promptbox for each screen
  303.     mypromptbox[s] = awful.widget.prompt()
  304.     -- Create an imagebox widget which will contains an icon indicating which layout we're using.
  305.     -- We need one layoutbox per screen.
  306.     mylayoutbox[s] = awful.widget.layoutbox(s)
  307.     mylayoutbox[s]:buttons(awful.util.table.join(
  308.                            awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
  309.                            awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
  310.                            awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
  311.                            awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
  312.     -- Create a taglist widget
  313.     mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
  314.  
  315.     -- Create a tasklist widget
  316.     mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
  317.  
  318.     -- Create the wibox
  319.     mywibox[s] = awful.wibox({ position = "top", screen = s })
  320.  
  321.     -- Widgets that are aligned to the left
  322.     local left_layout = wibox.layout.fixed.horizontal()
  323.     left_layout:add(mylauncher)
  324.     left_layout:add(mytaglist[s])
  325.     left_layout:add(mypromptbox[s])
  326.  
  327.     -- Widgets that are aligned to the right
  328.     local right_layout = wibox.layout.fixed.horizontal()
  329.     if s == 1 then right_layout:add(wibox.widget.systray()) end
  330.     right_layout:add(mytextclock)
  331.     right_layout:add(mylayoutbox[s])
  332.  
  333.     -- Now bring it all together (with the tasklist in the middle)
  334.     local layout = wibox.layout.align.horizontal()
  335.     layout:set_left(left_layout)
  336.     layout:set_middle(mytasklist[s])
  337.     layout:set_right(right_layout)
  338.  
  339.     mywibox[s]:set_widget(layout)
  340. end
  341. -- }}}
  342.  
  343. -- {{{ Mouse bindings
  344. root.buttons(awful.util.table.join(
  345.     awful.button({ }, 3, function () mymainmenu:toggle() end),
  346.     awful.button({ }, 4, awful.tag.viewnext),
  347.     awful.button({ }, 5, awful.tag.viewprev)
  348. ))
  349. -- }}}
  350.  
  351. -- {{{ Key bindings
  352. globalkeys = awful.util.table.join(
  353.     awful.key({ modkey,           }, "Left",   awful.tag.viewprev       ),
  354.     awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),
  355.     awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
  356.  
  357.     awful.key({ modkey,           }, "j",
  358.         function ()
  359.             awful.client.focus.byidx( 1)
  360.             if client.focus then client.focus:raise() end
  361.         end),
  362.     awful.key({ modkey,           }, "k",
  363.         function ()
  364.             awful.client.focus.byidx(-1)
  365.             if client.focus then client.focus:raise() end
  366.         end),
  367.     awful.key({ modkey,           }, "w", function () mymainmenu:show() end),
  368.  
  369.     -- Layout manipulation
  370.     awful.key({ modkey, "Shift"   }, "j", function () awful.client.swap.byidx(  1)    end),
  371.     awful.key({ modkey, "Shift"   }, "k", function () awful.client.swap.byidx( -1)    end),
  372.     awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
  373.     awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
  374.     awful.key({ modkey,           }, "u", awful.client.urgent.jumpto),
  375.     awful.key({ modkey,           }, "Tab",
  376.         function ()
  377.             awful.client.focus.history.previous()
  378.             if client.focus then
  379.                 client.focus:raise()
  380.             end
  381.         end),
  382.  
  383.     -- Standard program
  384.     awful.key({ modkey,           }, "Return", function () awful.util.spawn(terminal) end),
  385.     awful.key({ modkey, "Control" }, "r", awesome.restart),
  386.     awful.key({ modkey, "Shift"   }, "q", awesome.quit),
  387.  
  388.     awful.key({ modkey,           }, "l",     function () awful.tag.incmwfact( 0.05)    end),
  389.     awful.key({ modkey,           }, "h",     function () awful.tag.incmwfact(-0.05)    end),
  390.     awful.key({ modkey, "Shift"   }, "h",     function () awful.tag.incnmaster( 1)      end),
  391.     awful.key({ modkey, "Shift"   }, "l",     function () awful.tag.incnmaster(-1)      end),
  392.     awful.key({ modkey, "Control" }, "h",     function () awful.tag.incncol( 1)         end),
  393.     awful.key({ modkey, "Control" }, "l",     function () awful.tag.incncol(-1)         end),
  394.     awful.key({ modkey,           }, "space", function () awful.layout.inc(layouts,  1) end),
  395.     awful.key({ modkey, "Shift"   }, "space", function () awful.layout.inc(layouts, -1) end),
  396.  
  397.     awful.key({ modkey, "Control" }, "n", awful.client.restore),
  398.  
  399.     -- Prompt
  400.     awful.key({ modkey },            "r",     function () mypromptbox[mouse.screen]:run() end),
  401.  
  402.     awful.key({ modkey }, "x",
  403.               function ()
  404.                   awful.prompt.run({ prompt = "Run Lua code: " },
  405.                   mypromptbox[mouse.screen].widget,
  406.                   awful.util.eval, nil,
  407.                   awful.util.getdir("cache") .. "/history_eval")
  408.               end),
  409.     -- Menubar
  410.     awful.key({ modkey }, "p", function() menubar.show() end)
  411. )
  412.  
  413. clientkeys = awful.util.table.join(
  414.     awful.key({ modkey,           }, "f",      function (c) c.fullscreen = not c.fullscreen  end),
  415.     awful.key({ modkey, "Shift"   }, "c",      function (c) c:kill()                         end),
  416.     awful.key({ modkey, "Control" }, "space",  awful.client.floating.toggle                     ),
  417.     awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
  418.     awful.key({ modkey,           }, "o",      awful.client.movetoscreen                        ),
  419.     awful.key({ modkey,           }, "t",      function (c) c.ontop = not c.ontop            end),
  420.     awful.key({ modkey,           }, "n",
  421.         function (c)
  422.             -- The client currently has the input focus, so it cannot be
  423.             -- minimized, since minimized clients can't have the focus.
  424.             c.minimized = true
  425.         end),
  426.     awful.key({ modkey,           }, "m",
  427.         function (c)
  428.             c.maximized_horizontal = not c.maximized_horizontal
  429.             c.maximized_vertical   = not c.maximized_vertical
  430.         end)
  431. )
  432.  
  433. -- Bind all key numbers to tags.
  434. -- Be careful: we use keycodes to make it works on any keyboard layout.
  435. -- This should map on the top row of your keyboard, usually 1 to 9.
  436. for i = 1, 9 do
  437.     globalkeys = awful.util.table.join(globalkeys,
  438.         awful.key({ modkey }, "#" .. i + 9,
  439.                   function ()
  440.                         local screen = mouse.screen
  441.                         local tag = awful.tag.gettags(screen)[i]
  442.                         if tag then
  443.                            awful.tag.viewonly(tag)
  444.                         end
  445.                   end),
  446.         awful.key({ modkey, "Control" }, "#" .. i + 9,
  447.                   function ()
  448.                       local screen = mouse.screen
  449.                       local tag = awful.tag.gettags(screen)[i]
  450.                       if tag then
  451.                          awful.tag.viewtoggle(tag)
  452.                       end
  453.                   end),
  454.         awful.key({ modkey, "Shift" }, "#" .. i + 9,
  455.                   function ()
  456.                       if client.focus then
  457.                           local tag = awful.tag.gettags(client.focus.screen)[i]
  458.                           if tag then
  459.                               awful.client.movetotag(tag)
  460.                           end
  461.                      end
  462.                   end),
  463.         awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
  464.                   function ()
  465.                       if client.focus then
  466.                           local tag = awful.tag.gettags(client.focus.screen)[i]
  467.                           if tag then
  468.                               awful.client.toggletag(tag)
  469.                           end
  470.                       end
  471.                   end))
  472. end
  473.  
  474. clientbuttons = awful.util.table.join(
  475.     awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
  476.     awful.button({ modkey }, 1, awful.mouse.client.move),
  477.     awful.button({ modkey }, 3, awful.mouse.client.resize))
  478.  
  479. -- Set keys
  480. root.keys(globalkeys)
  481. -- }}}
  482.  
  483. -- {{{ Rules
  484. awful.rules.rules = {
  485.     -- All clients will match this rule.
  486.     { rule = { },
  487.       properties = { border_width = beautiful.border_width,
  488.                      border_color = beautiful.border_normal,
  489.                      focus = awful.client.focus.filter,
  490.                      keys = clientkeys,
  491.                      buttons = clientbuttons } },
  492.     { rule = { class = "MPlayer" },
  493.       properties = { floating = true } },
  494.     { rule = { class = "pinentry" },
  495.       properties = { floating = true } },
  496.     { rule = { class = "gimp" },
  497.       properties = { floating = true } },
  498.     -- Set Firefox to always map on tags number 2 of screen 1.
  499.     -- { rule = { class = "Firefox" },
  500.     --   properties = { tag = tags[1][2] } },
  501. }
  502. -- }}}
  503.  
  504. -- {{{ Signals
  505. -- Signal function to execute when a new client appears.
  506. client.connect_signal("manage", function (c, startup)
  507.     -- Enable sloppy focus
  508.     c:connect_signal("mouse::enter", function(c)
  509.         if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
  510.             and awful.client.focus.filter(c) then
  511.             client.focus = c
  512.         end
  513.     end)
  514.  
  515.     if not startup then
  516.         -- Set the windows at the slave,
  517.         -- i.e. put it at the end of others instead of setting it master.
  518.         -- awful.client.setslave(c)
  519.  
  520.         -- Put windows in a smart way, only if they does not set an initial position.
  521.         if not c.size_hints.user_position and not c.size_hints.program_position then
  522.             awful.placement.no_overlap(c)
  523.             awful.placement.no_offscreen(c)
  524.         end
  525.     end
  526.  
  527.     local titlebars_enabled = false
  528.     if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
  529.         -- buttons for the titlebar
  530.         local buttons = awful.util.table.join(
  531.                 awful.button({ }, 1, function()
  532.                     client.focus = c
  533.                     c:raise()
  534.                     awful.mouse.client.move(c)
  535.                 end),
  536.                 awful.button({ }, 3, function()
  537.                     client.focus = c
  538.                     c:raise()
  539.                     awful.mouse.client.resize(c)
  540.                 end)
  541.                 )
  542.  
  543.         -- Widgets that are aligned to the left
  544.         local left_layout = wibox.layout.fixed.horizontal()
  545.         left_layout:add(awful.titlebar.widget.iconwidget(c))
  546.         left_layout:buttons(buttons)
  547.  
  548.         -- Widgets that are aligned to the right
  549.         local right_layout = wibox.layout.fixed.horizontal()
  550.         right_layout:add(awful.titlebar.widget.floatingbutton(c))
  551.         right_layout:add(awful.titlebar.widget.maximizedbutton(c))
  552.         right_layout:add(awful.titlebar.widget.stickybutton(c))
  553.         right_layout:add(awful.titlebar.widget.ontopbutton(c))
  554.         right_layout:add(awful.titlebar.widget.closebutton(c))
  555.  
  556.         -- The title goes in the middle
  557.         local middle_layout = wibox.layout.flex.horizontal()
  558.         local title = awful.titlebar.widget.titlewidget(c)
  559.         title:set_align("center")
  560.         middle_layout:add(title)
  561.         middle_layout:buttons(buttons)
  562.  
  563.         -- Now bring it all together
  564.         local layout = wibox.layout.align.horizontal()
  565.         layout:set_left(left_layout)
  566.         layout:set_right(right_layout)
  567.         layout:set_middle(middle_layout)
  568.  
  569.         awful.titlebar(c):set_widget(layout)
  570.     end
  571. end)
  572.  
  573. client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
  574. client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
  575. -- }}}
  576. os.execute("sh /home/conformist/.awesome-autostart")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement