local beautiful = require("beautiful") local awful = require("awful") local gears = require("gears") local wibox = require("wibox") -- {{{ Wibar -- Create a wibox for each screen and add it local function set_wallpaper(s) -- Wallpaper if beautiful.wallpaper then local wallpaper = beautiful.wallpaper -- If wallpaper is a function, call it with the screen if type(wallpaper) == "function" then wallpaper = wallpaper(s) end gears.wallpaper.maximized(wallpaper, s, true) end end -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) screen.connect_signal("property::geometry", set_wallpaper) -- {{{ Non-widget modules -- The following modules are not exactly widgets, however they are part of the ui. -- Load the keybindings list require("core.widgets.hotkeys_popup") -- Load the menubar require("core.widgets.menubar") -- }}} awful.screen.connect_for_each_screen(function(s) -- Wallpaper set_wallpaper(s) -- Each screen has its own tag table. awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) -- Create a promptbox for each screen s.mypromptbox = require("core.widgets.prompt")() -- Create an imagebox widget which will contain an icon indicating which layout we're using. -- Create the taglist s.mytaglist = require("core.widgets.taglist")(s) -- We need one layoutbox per screen. s.mylayoutbox = require("core.widgets.layout_box")(s) -- Create a tasklist widget s.mytasklist = require("core.widgets.tasklist")(s) -- Create the wibox s.mywibox = awful.wibar({ position = "top", screen = s, bg = beautiful.topbar_bg, }) -- Add screen lock require("widgets.lock")({screen = s, obscure = true}) require("widgets.unitybar")(s,{ top_widgets = { require("widgets.polytasklist")({ vertical = true, stretch = false, --constraint = 180, names = false, margins = 5 })(s), }, bottom_widgets = { require("widgets.polylauncher")({vertical = true}) } }) -- Add widgets to the wibox s.mywibox:setup { expand = "outside", layout = wibox.layout.align.horizontal, { -- Left widgets { require("core.widgets.menu_launcher"), --require("widgets.polylauncher")({vertical = false}), --s.mytaglist, s.mypromptbox, layout = wibox.layout.fixed.horizontal, spacing = 3 }, widget = wibox.container.place, halign = "left", fill_horizontal = false, }, -- Middle widget wibox.widget.textclock(), { -- Right widgets { require("widgets.drawer")({ wibox.widget.systray() }), awful.widget.keyboardlayout(), require("widgets.wallpapers")({ screen = s, path = os.getenv("HOME").."/Pictures/Wallpapers/", }), require("widgets.mailbox")({ screen = s, style = { rounding = 1, } }), require("widgets.volume")({}), require("widgets.battery")({ percentage = false, }), s.mylayoutbox, layout = wibox.layout.fixed.horizontal, spacing = 4 }, widget = wibox.container.place, halign = "right", fill_horizontal = false }, } end) -- }}}