--- /dev/null
+-- Delightful widgets
+require('delightful.widgets.battery')
+require('delightful.widgets.cpu')
+require('delightful.widgets.datetime')
+require('delightful.widgets.memory')
+require('delightful.widgets.network')
+require('delightful.widgets.pulseaudio')
+
+-- Which widgets to install?
+-- This is the order the widgets appear in the wibox.
+install_delightful = {
+ delightful.widgets.battery,
+ delightful.widgets.network,
+ delightful.widgets.cpu,
+ delightful.widgets.memory,
+-- delightful.widgets.pulseaudio,
+ delightful.widgets.datetime
+}
+
+-- Widget configuration
+delightful_config = {
+ [delightful.widgets.network] = {
+ excluded_devices = { '^lo.*$' },
+ },
+ [delightful.widgets.cpu] = {
+ command = 'gnome-system-monitor',
+ },
+ [delightful.widgets.memory] = {
+ command = 'gnome-system-monitor',
+ },
+ [delightful.widgets.battery] = {
+ battery = "BAT0",
+ }
+-- [delightful.widgets.pulseaudio] = {
+-- mixer_command = 'gnome-volume-control',
+-- }
+}
+
+-- Prepare the container that is used when constructing the wibox
+local delightful_container = { widgets = {}, icons = {} }
+if install_delightful then
+ for _, widget in pairs(awful.util.table.reverse(install_delightful)) do
+ local config = delightful_config and delightful_config[widget]
+ local widgets, icons = widget:load(config)
+ if widgets then
+ if not icons then
+ icons = {}
+ end
+ table.insert(delightful_container.widgets, awful.util.table.reverse(widgets))
+ table.insert(delightful_container.icons, awful.util.table.reverse(icons))
+ end
+ end
+end
+