Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local awful = require("awful")
- local gears = require("gears")
- local naughty = require("naughty")
- local wibox = require("wibox")
- local taglist_buttons = gears.table.join(
- awful.button(
- { }, 1, function(t) t:view_only() end
- ),
- awful.button(
- { modkey }, 1, function(t)
- if client.focus then
- client.focus:move_to_tag(t)
- end
- end
- ),
- awful.button(
- { }, 3, awful.tag.viewtoggle
- ),
- awful.button(
- { modkey }, 3, function(t)
- if client.focus then
- client.focus:toggle_tag(t)
- end
- end
- )
- )
- local tasklist_buttons = gears.table.join(
- awful.button(
- { }, 1, function (c)
- if c == client.focus then
- c.minimized = true
- else
- c:emit_signal(
- "request::activate",
- "tasklist",
- { raise = true }
- )
- end
- end
- ),
- awful.button(
- { }, 3, function()
- awful.menu.client_list({ theme = { width = 250 } })
- end
- )
- )
- -- Add bars to screens
- awful.screen.connect_for_each_screen(function(s)
- -- Create a taglist widget
- s.mytaglist = awful.widget.taglist {
- screen = s,
- filter = awful.widget.taglist.filter.all,
- buttons = taglist_buttons
- }
- -- Create a tasklist widget
- s.mytasklist = awful.widget.tasklist {
- screen = s,
- filter = awful.widget.tasklist.filter.currenttags,
- buttons = tasklist_buttons
- }
- -- Create the wibox
- s.bar_left = awful.wibar(
- {
- -- position = "top",
- screen = s,
- width = 126,
- height = 25,
- border_width = (gap_size * 2),
- x = s.geometry.x,
- y = s.geometry.y,
- }
- )
- -- Add widgets to the wibox
- s.bar_left:setup {
- layout = wibox.layout.align.horizontal,
- { -- Left widgets
- layout = wibox.layout.fixed.horizontal,
- s.mytaglist,
- },
- s.mytasklist, -- Middle widget
- { -- Right widgets
- layout = wibox.layout.fixed.horizontal,
- mykeyboardlayout,
- wibox.widget.systray(),
- mytextclock,
- s.mylayoutbox,
- },
- }
- end)
Advertisement
Add Comment
Please, Sign In to add comment