summaryrefslogtreecommitdiff
path: root/widgets/button.lua
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/button.lua')
-rw-r--r--widgets/button.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/widgets/button.lua b/widgets/button.lua
new file mode 100644
index 0000000..cd1da1e
--- /dev/null
+++ b/widgets/button.lua
@@ -0,0 +1,33 @@
+local awful = require("awful")
+local beautiful = require("beautiful")
+local menubar = require("menubar")
+
+local hotkeys_popup = require("awful.hotkeys_popup")
+-- Enable hotkeys help widget for VIM and other apps
+-- when client with a matching name is opened:
+require("awful.hotkeys_popup.keys")
+
+-- Menu
+-- Create a launcher widget and a main menu
+myawesomemenu = {
+ { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
+ { "restart", awesome.restart },
+ { "quit", function() awesome.quit() end },
+}
+
+mymainmenu = awful.menu({
+ items = {
+ { "awesome", myawesomemenu, beautiful.awesome_icon },
+ { "open terminal", terminal }
+ }
+})
+
+mylauncher = awful.widget.launcher({
+ image = beautiful.awesome_icon,
+ menu = mymainmenu
+})
+
+-- Menubar configuration
+menubar.utils.terminal = terminal -- Set the terminal for applications that require it
+
+return mylauncher