An AwesomeWM configuration that'll get you started with good defaults and some bonuses.
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.

214 lines
5.5 KiB

  1. -- Default configuration file
  2. -- This file will be overridden on update.
  3. -- Copy to `~/.config/awesome/config.lua` to avoid losing your changes.
  4. local awful = require("awful")
  5. local naughty = require("naughty")
  6. local config = {}
  7. --
  8. -- Awesome WM
  9. --
  10. config.awesome = {
  11. -- Enable window autofocus on mouse hover
  12. autofocus = true,
  13. -- Enable hotkeys help widget for VIM and other apps
  14. -- when client with a matching name is opened:
  15. hotkeys_popup = true,
  16. -- Application launcher
  17. application_launcher_check = "rofi -version",
  18. application_launcher = "rofi -show drun -modi drun -show-icons -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
  19. application_launcher_cmd = "rofi -show run -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
  20. -- Screen locker
  21. lock_command = "i3lock --blur=5 -f -k --timecolor=ffffffff --datecolor=ffffffff --indicator --ringcolor=aaaaaaaa",
  22. -- lock_command = "xscreensaver-command -lock",
  23. -- Terminal
  24. terminal = "terminator",
  25. -- Window tiling
  26. tiling = {
  27. -- Available window layouts - order matters
  28. layouts = {
  29. awful.layout.suit.floating,
  30. awful.layout.suit.tile,
  31. awful.layout.suit.tile.left,
  32. awful.layout.suit.tile.bottom,
  33. awful.layout.suit.tile.top,
  34. -- awful.layout.suit.fair,
  35. -- awful.layout.suit.fair.horizontal,
  36. -- awful.layout.suit.spiral,
  37. -- awful.layout.suit.spiral.dwindle,
  38. -- awful.layout.suit.max,
  39. -- awful.layout.suit.max.fullscreen,
  40. -- awful.layout.suit.magnifier,
  41. -- awful.layout.suit.corner.nw,
  42. -- awful.layout.suit.corner.ne,
  43. -- awful.layout.suit.corner.sw,
  44. -- awful.layout.suit.corner.se,
  45. },
  46. },
  47. }
  48. -- Default text editor
  49. config.awesome.editor = os.getenv("EDITOR") or "nano"
  50. -- config.awesome.editor = "vi"
  51. -- config.awesome.editor = "code"
  52. -- Default text editor command
  53. config.awesome.editor_cmd = config.awesome.terminal .. " -e " .. config.awesome.editor
  54. --
  55. -- Keys / Hotkeys / Shortcuts
  56. --
  57. -- To disable a shortcut, simply remove it (tip: comment it out with a leading "--")
  58. --
  59. config.keys = {
  60. -- Main modifier key for meta hotkeys like moving windows or locking the session
  61. -- Usually, Mod4 is the key with a logo between Control and Alt.
  62. modkey = "Mod4",
  63. }
  64. -- Hotkeys globally available (through the entire OS, regardless of what's focused)
  65. config.keys.global_keys = {
  66. -- Application launcher
  67. launcher = { { config.keys.modkey }, "space", },
  68. launcher_cmd = { { "Ctrl", config.keys.modkey }, "space", },
  69. -- Screen locker
  70. lock_screen = { { config.keys.modkey }, "l" },
  71. --
  72. -- Media and volume controls
  73. -- See media_control.lua
  74. --
  75. media_control = {
  76. -- Raise volume
  77. raiseVolume = { {}, "XF86AudioRaiseVolume" },
  78. -- Lower volume
  79. lowerVolume = { {}, "XF86AudioLowerVolume" },
  80. -- Toggle mute
  81. toggleMute = { {}, "XF86AudioMute" },
  82. -- Toggle Play / Pause
  83. playPause = { {}, "XF86AudioPlay" },
  84. -- Next track
  85. nextTrack = { {}, "XF86AudioNext" },
  86. -- Previous track
  87. previousTrack = { {}, "XF86AudioPrev" },
  88. -- Brightness up
  89. brightnessUp = { {}, "XF86MonBrightnessUp" },
  90. -- Brightness down
  91. brightnessDown = { {}, "XF86MonBrightnessDown" },
  92. },
  93. -- Keyboard layout
  94. keyboard_layout = {
  95. -- Switch between layouts
  96. switch = { { "Mod1" }, "Shift_L" },
  97. -- Switch between layouts (alternative)
  98. switch_alt = { { "Shift" }, "Alt_L" },
  99. }
  100. }
  101. -- Custom global hotkeys
  102. config.keys.custom_keys = {
  103. -- Example:
  104. -- {
  105. -- hotkey = {
  106. -- { config.keys.modkey, },
  107. -- "t"
  108. -- },
  109. -- action = function()
  110. -- awful.spawn('terminator')
  111. -- end,
  112. -- identity = { description = "open terminator", group = "utilities" }
  113. -- }
  114. };
  115. --
  116. -- Audio
  117. --
  118. config.audio = {
  119. card = '-D pulse',
  120. device = 'Master',
  121. };
  122. --
  123. -- Widgets
  124. --
  125. config.widgets = {
  126. -- Keyboard layout widget
  127. keyboard_layout = {
  128. enabled = true,
  129. layouts = { "fr", "us" },
  130. layout_switch_command = "setxkbmap",
  131. },
  132. -- Enable/disable the system resources monitoring widget
  133. system_resources = {
  134. bars = {
  135. enabled = true,
  136. screens = { 1, 2 },
  137. refresh_interval = 1.5, -- In seconds
  138. },
  139. battery = {
  140. enabled = true,
  141. screens = { 1, 2 },
  142. refresh_interval = 30, -- In seconds
  143. precision = 0, -- How many decimals
  144. },
  145. },
  146. }
  147. --
  148. -- Auto start custom applications
  149. --
  150. config.autostart = {
  151. -- Network manager widget
  152. {
  153. "nm-applet --help", -- Verification command that will be checked before spawning the next command
  154. "nm-applet", -- The app
  155. },
  156. -- Screenshot utility
  157. "flameshot",
  158. }
  159. -- Theme
  160. -- Change to gears.filesystem.get_themes_dir() .. "default/theme.lua" to use default awesome theme
  161. config.theme = awful.util.getdir("config") .. "/theme.lua"
  162. -- Screenshot utility
  163. config.screenshot_utility_command = "flameshot gui"
  164. -- Run menu
  165. config.windowSwitcher = "rofi -show window -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi"
  166. -- Media control
  167. config.volume_osd_timeout = 2
  168. -- Awesome tweaks
  169. naughty.config.defaults.timeout = 15
  170. return config