Skip to content

Instantly share code, notes, and snippets.

@psychon
Created February 6, 2019 08:09
Show Gist options
  • Save psychon/f8a1fb569d00f73ed80a9e72117e20e4 to your computer and use it in GitHub Desktop.
Save psychon/f8a1fb569d00f73ed80a9e72117e20e4 to your computer and use it in GitHub Desktop.
--- rc.lua.orig 2019-02-06 09:08:41.020626552 +0100
+++ rc.lua 2019-02-06 09:08:00.733232262 +0100
@@ -95,60 +95,10 @@ mymainmenu = awful.menu({ items = { { "a
}
})
-mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
- menu = mymainmenu })
-
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- }}}
--- Keyboard map indicator and switcher
-mykeyboardlayout = awful.widget.keyboardlayout()
-
--- {{{ Wibar
--- Create a textclock widget
-mytextclock = wibox.widget.textclock()
-
--- Create a wibox for each screen and add it
-local taglist_buttons = gears.table.join(
- awful.button({ }, 1, function(t) t:view_only() end),
- awful.button({ modkey }, 1, function(t)
- if client.focus then
- client.focus:move_to_tag(t)
- end
- end),
- awful.button({ }, 3, awful.tag.viewtoggle),
- awful.button({ modkey }, 3, function(t)
- if client.focus then
- client.focus:toggle_tag(t)
- end
- end),
- awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
- awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
- )
-
-local tasklist_buttons = gears.table.join(
- awful.button({ }, 1, function (c)
- if c == client.focus then
- c.minimized = true
- else
- c:emit_signal(
- "request::activate",
- "tasklist",
- {raise = true}
- )
- end
- end),
- awful.button({ }, 3, function()
- awful.menu.client_list({ theme = { width = 250 } })
- end),
- awful.button({ }, 4, function ()
- awful.client.focus.byidx(1)
- end),
- awful.button({ }, 5, function ()
- awful.client.focus.byidx(-1)
- end))
-
local function set_wallpaper(s)
-- Wallpaper
if beautiful.wallpaper then
@@ -170,52 +120,6 @@ awful.screen.connect_for_each_screen(fun
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.suit.max)
-
- -- Create a promptbox for each screen
- s.mypromptbox = awful.widget.prompt()
- -- Create an imagebox widget which will contain an icon indicating which layout we're using.
- -- We need one layoutbox per screen.
- s.mylayoutbox = awful.widget.layoutbox(s)
- s.mylayoutbox:buttons(gears.table.join(
- awful.button({ }, 1, function () awful.layout.inc( 1) end),
- awful.button({ }, 3, function () awful.layout.inc(-1) end),
- awful.button({ }, 4, function () awful.layout.inc( 1) end),
- awful.button({ }, 5, function () awful.layout.inc(-1) end)))
- -- Create a taglist widget
- s.mytaglist = awful.widget.taglist {
- screen = s,
- filter = awful.widget.taglist.filter.all,
- buttons = taglist_buttons
- }
-
- -- Create a tasklist widget
- s.mytasklist = awful.widget.tasklist {
- screen = s,
- filter = awful.widget.tasklist.filter.currenttags,
- buttons = tasklist_buttons
- }
-
- -- Create the wibox
- s.mywibox = awful.wibar({ position = "top", screen = s })
-
- -- Add widgets to the wibox
- s.mywibox:setup {
- layout = wibox.layout.align.horizontal,
- { -- Left widgets
- layout = wibox.layout.fixed.horizontal,
- mylauncher,
- s.mytaglist,
- s.mypromptbox,
- },
- s.mytasklist, -- Middle widget
- { -- Right widgets
- layout = wibox.layout.fixed.horizontal,
- mykeyboardlayout,
- wibox.widget.systray(),
- mytextclock,
- s.mylayoutbox,
- },
- }
end)
-- }}}
@@ -310,20 +214,6 @@ globalkeys = gears.table.join(
end,
{description = "restore minimized", group = "client"}),
- -- Prompt
- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
- {description = "run prompt", group = "launcher"}),
-
- awful.key({ modkey }, "x",
- function ()
- awful.prompt.run {
- prompt = "Run Lua code: ",
- textbox = awful.screen.focused().mypromptbox.widget,
- exe_callback = awful.util.eval,
- history_path = awful.util.get_cache_dir() .. "/history_eval"
- }
- end,
- {description = "lua execute prompt", group = "awesome"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment