Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.8 KiB

2 years ago
1 year ago
  1. -- This file is part of Reno desktop.
  2. --
  3. -- Reno desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  4. --
  5. -- Reno desktop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  6. --
  7. -- You should have received a copy of the GNU General Public License along with Reno desktop. If not, see <https://www.gnu.org/licenses/>.
  8. -- Base upon which modules are layered.
  9. --libraries
  10. local awful = require("awful")
  11. local beautiful = require("beautiful")
  12. local gears = require("gears")
  13. awful.util.shell = global.shell
  14. --error handling
  15. if awesome.startup_errors then
  16. print("Error during startup: "..awesome.startup_errors)
  17. end
  18. do
  19. local in_error = false
  20. awesome.connect_signal("debug::error",function(err)
  21. if in_error then return end
  22. in_error = true
  23. print("Error during runtime: "..tostring(err))
  24. in_error = false
  25. end)
  26. end
  27. --screen setup
  28. awful.screen.connect_for_each_screen(function(s)
  29. gears.wallpaper.maximized(root_path.."/background.jpg")
  30. awful.tag({ "1" }, s, awful.layout.suit.floating)
  31. end)
  32. --theme initialization
  33. beautiful.init(root_path.."/themes/"..global.theme.."/theme.lua")
  34. --client mouse bindings
  35. clientbuttons = gears.table.join(
  36. awful.button({}, 1, function(c)
  37. c:emit_signal("request::activate", "mouse_click", {raise = true})
  38. end)
  39. )
  40. --client rules
  41. awful.rules.rules = {
  42. { --catch-all rules
  43. rule = {},
  44. properties = {
  45. focus = awful.client.focus.filter,
  46. raise = true,
  47. screen = awful.screen.preferred,
  48. border_width = beautiful.border_width,
  49. border_color = beautiful.border_normal,
  50. placement = awful.placement.no_overlap+awful.placement.no_offscreen
  51. }
  52. }
  53. }
  54. --client signals
  55. client.connect_signal("manage", function(c)
  56. -- append the window at the end rather than at the top.
  57. -- if not awesome.startup then awful.client.setslave(c) end
  58. if awesome.startup
  59. --place client on available screens when screen count changes
  60. and not c.size_hints.user_position
  61. and not c.size_hints.program_position then
  62. awful.placement.no_offscreen(c)
  63. end
  64. end)
  65. --available layouts
  66. awful.layout.layouts = {
  67. awful.layout.suit.floating
  68. }
  69. client.connect_signal("focus", function(c)
  70. c.border_color = beautiful.border_focus
  71. end)
  72. client.connect_signal("unfocus", function(c)
  73. c.border_color = beautiful.border_normal
  74. end)
  75. --screen setup
  76. awful.screen.connect_for_each_screen(function(s)
  77. awful.tag({ "1", "2", "3", "4" }, s, awful.layout.suit.floating)
  78. end)