Staninna

Untitled

Jun 28th, 2022
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. local awful = require("awful")
  2. local gears = require("gears")
  3. local naughty = require("naughty")
  4. local wibox = require("wibox")
  5.  
  6.  
  7. local taglist_buttons = gears.table.join(
  8. awful.button(
  9. { }, 1, function(t) t:view_only() end
  10. ),
  11. awful.button(
  12. { modkey }, 1, function(t)
  13. if client.focus then
  14. client.focus:move_to_tag(t)
  15. end
  16. end
  17. ),
  18. awful.button(
  19. { }, 3, awful.tag.viewtoggle
  20. ),
  21. awful.button(
  22. { modkey }, 3, function(t)
  23. if client.focus then
  24. client.focus:toggle_tag(t)
  25. end
  26. end
  27. )
  28. )
  29.  
  30. local tasklist_buttons = gears.table.join(
  31. awful.button(
  32. { }, 1, function (c)
  33. if c == client.focus then
  34. c.minimized = true
  35. else
  36. c:emit_signal(
  37. "request::activate",
  38. "tasklist",
  39. { raise = true }
  40. )
  41. end
  42. end
  43. ),
  44. awful.button(
  45. { }, 3, function()
  46. awful.menu.client_list({ theme = { width = 250 } })
  47. end
  48. )
  49. )
  50.  
  51. -- Add bars to screens
  52. awful.screen.connect_for_each_screen(function(s)
  53.  
  54. -- Create a taglist widget
  55. s.mytaglist = awful.widget.taglist {
  56. screen = s,
  57. filter = awful.widget.taglist.filter.all,
  58. buttons = taglist_buttons
  59. }
  60.  
  61. -- Create a tasklist widget
  62. s.mytasklist = awful.widget.tasklist {
  63. screen = s,
  64. filter = awful.widget.tasklist.filter.currenttags,
  65. buttons = tasklist_buttons
  66. }
  67.  
  68. -- Create the wibox
  69. s.bar_left = awful.wibar(
  70. {
  71. -- position = "top",
  72. screen = s,
  73. width = 126,
  74. height = 25,
  75. border_width = (gap_size * 2),
  76. x = s.geometry.x,
  77. y = s.geometry.y,
  78. }
  79. )
  80.  
  81. -- Add widgets to the wibox
  82. s.bar_left:setup {
  83. layout = wibox.layout.align.horizontal,
  84. { -- Left widgets
  85. layout = wibox.layout.fixed.horizontal,
  86. s.mytaglist,
  87. },
  88. s.mytasklist, -- Middle widget
  89. { -- Right widgets
  90. layout = wibox.layout.fixed.horizontal,
  91. mykeyboardlayout,
  92. wibox.widget.systray(),
  93. mytextclock,
  94. s.mylayoutbox,
  95. },
  96. }
  97. end)
  98.  
Advertisement
Add Comment
Please, Sign In to add comment