summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2017-10-08 18:07:01 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2017-10-08 18:07:01 +0100
commit742de6890679d081c58c693641d2bdb68af4c6ae (patch)
treefa1dc46105bd0caa08f40db1abeccea1badd00d0
parent7bf866fd2a14269e28655528bb5d10e79caae887 (diff)
downloadawesome-742de6890679d081c58c693641d2bdb68af4c6ae.tar.gz
Sync rc.lua with Awesome v4.2
-rw-r--r--.config/awesome/rc.lua74
1 files changed, 44 insertions, 30 deletions
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua
index a02ee8d..cc7338c 100644
--- a/.config/awesome/rc.lua
+++ b/.config/awesome/rc.lua
@@ -10,6 +10,9 @@ local beautiful = require("beautiful")
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget
+-- Enable hotkeys help widget for VIM and other apps
+-- when client with a matching name is opened:
+require("awful.hotkeys_popup.keys")
-- Load Debian menu entries
require("debian.menu")
@@ -48,8 +51,7 @@ end
-- }}}
-- {{{ Variable definitions
-configdir="/home/"..os.getenv("USER").."/.config/awesome/"
---configdir = gears.filesystem.get_configuration_dir() -- requires Awesome v4.1
+configdir = gears.filesystem.get_configuration_dir()
-- Themes define colours, icons, font and wallpapers.
beautiful.init(configdir .. "/theme.lua")
@@ -195,7 +197,7 @@ spacewidget:set_text(" ")
loadwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.uptime)
vicious.register(loadwidget, vicious.widgets.uptime, "load: $4, $5, $6", 3)
-loadwidget:buttons(awful.util.table.join(
+loadwidget:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell(terminal .. " -n htop -e htop") end)
)
)
@@ -238,7 +240,7 @@ vicious.register(volwidget, vicious.contrib.pulse,
end
return "vol: " .. volvalue .. "%"
end, 1, "alsa_output.pci-0000_05_00.0.analog-surround-71" )
-volwidget:buttons(awful.util.table.join(
+volwidget:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("pactl set-sink-mute 0 toggle") end),
awful.button({ }, 3, function() volmenu:show() end),
awful.button({ }, 4, function() awful.spawn.with_shell("pactl set-sink-volume 0 +5%") end),
@@ -289,7 +291,7 @@ weatherwidget = lain.widget.weather({
widget:set_text(units .. "°C")
end
})
-weatherwidget.widget:buttons(awful.util.table.join(
+weatherwidget.widget:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/firefox http://www.met.ie/latest/rainfall_radar.asp") end),
awful.button({ }, 3, function() awful.spawn.with_shell("/usr/bin/firefox http://www.met.ie/forecasts/5day-ireland.asp") end)
)
@@ -308,7 +310,7 @@ dbus.connect_signal("net.sacredchao.QuodLibet", function(...)
end
end
end)
-quodlibetwidget:buttons(awful.util.table.join(
+quodlibetwidget:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/quodlibet --run --play-pause") end),
--awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/xdotool key ctrl+shift+8") end),
awful.button({ }, 3, function() screen[2].tags[3]:view_only() end),
@@ -321,14 +323,14 @@ quodlibetwidget:buttons(awful.util.table.join(
-- {{ Quicklaunch
quicklaunch_urxvt = wibox.widget.imagebox()
quicklaunch_urxvt:set_image("/usr/share/pixmaps/urxvt_32x32.xpm")
-quicklaunch_urxvt:buttons(awful.util.table.join(
+quicklaunch_urxvt:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/urxvt") end)
)
)
quicklaunch_firefox = wibox.widget.imagebox()
quicklaunch_firefox:set_image("/usr/share/icons/hicolor/32x32/apps/firefox.png")
-quicklaunch_firefox:buttons(awful.util.table.join(
+quicklaunch_firefox:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/firefox") end),
awful.button({ }, 3, function() awful.spawn.with_shell("/usr/bin/firefox -private-window") end)
)
@@ -336,7 +338,7 @@ quicklaunch_firefox:buttons(awful.util.table.join(
quicklaunch_chromium = wibox.widget.imagebox()
quicklaunch_chromium:set_image("/usr/share/icons/hicolor/48x48/apps/chromium.png")
-quicklaunch_chromium:buttons(awful.util.table.join(
+quicklaunch_chromium:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/chromium %U --incognito --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\"" ) end),
awful.button({ }, 3, function() awful.spawn.with_shell("/usr/bin/chromium %U --incognito --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\" --disable-plugins --disable-bundled-ppapi-flash --proxy-server=alpha:8123 --host-resolver-rules=\"MAP * 0.0.0.0 , EXCLUDE alpha\" http://check.torproject.org") end)
)
@@ -344,63 +346,63 @@ quicklaunch_chromium:buttons(awful.util.table.join(
quicklaunch_chrome = wibox.widget.imagebox()
quicklaunch_chrome:set_image("/opt/google/chrome/product_logo_64.png")
-quicklaunch_chrome:buttons(awful.util.table.join(
+quicklaunch_chrome:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/google-chrome") end)
)
)
quicklaunch_torbrowser = wibox.widget.imagebox()
quicklaunch_torbrowser:set_image("/usr/share/pixmaps/torbrowser.png")
-quicklaunch_torbrowser:buttons(awful.util.table.join(
+quicklaunch_torbrowser:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/torbrowser-launcher" ) end)
)
)
quicklaunch_chrome_gpm = wibox.widget.imagebox()
quicklaunch_chrome_gpm:set_image(configdir .. "/icons/googleplaymusic.png")
-quicklaunch_chrome_gpm:buttons(awful.util.table.join(
+quicklaunch_chrome_gpm:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/google-chrome --app=https://play.google.com/music/listen") end)
)
)
quicklaunch_mutt = wibox.widget.imagebox()
quicklaunch_mutt:set_image("/usr/share/pixmaps/mutt.xpm")
-quicklaunch_mutt:buttons(awful.util.table.join(
+quicklaunch_mutt:buttons(gears.table.join(
awful.button({ }, 1, function() os.execute("sleep 1"); awful.spawn.with_shell(terminal .. " -n mutt -e mutt") end)
)
)
quicklaunch_vlc = wibox.widget.imagebox()
quicklaunch_vlc:set_image("/usr/share/icons/hicolor/32x32/apps/vlc.png")
-quicklaunch_vlc:buttons(awful.util.table.join(
+quicklaunch_vlc:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/vlc") end)
)
)
quicklaunch_quodlibet = wibox.widget.imagebox()
quicklaunch_quodlibet:set_image("/usr/share/icons/hicolor/64x64/apps/quodlibet.png")
-quicklaunch_quodlibet:buttons(awful.util.table.join(
+quicklaunch_quodlibet:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/quodlibet") end)
)
)
quicklaunch_virtmanager = wibox.widget.imagebox()
quicklaunch_virtmanager:set_image("/usr/share/icons/hicolor/32x32/apps/virt-manager.png")
-quicklaunch_virtmanager:buttons(awful.util.table.join(
+quicklaunch_virtmanager:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/virt-manager") end)
)
)
quicklaunch_remmina = wibox.widget.imagebox()
quicklaunch_remmina:set_image("/usr/share/icons/hicolor/32x32/apps/remmina.png")
-quicklaunch_remmina:buttons(awful.util.table.join(
+quicklaunch_remmina:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/remmina") end)
)
)
quicklaunch_thunar = wibox.widget.imagebox()
quicklaunch_thunar:set_image("/usr/share/icons/gnome/32x32/places/user-home.png")
-quicklaunch_thunar:buttons(awful.util.table.join(
+quicklaunch_thunar:buttons(gears.table.join(
awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/thunar") end)
)
)
@@ -422,7 +424,7 @@ quicklaunch:add(quicklaunch_thunar)
--}}
-- Create a wibox for each screen and add it
-local taglist_buttons = awful.util.table.join(
+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
@@ -439,7 +441,7 @@ local taglist_buttons = awful.util.table.join(
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
)
-local tasklist_buttons = awful.util.table.join(
+local tasklist_buttons = gears.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
@@ -488,10 +490,10 @@ awful.screen.connect_for_each_screen(function(s)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
- -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- 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(awful.util.table.join(
+ 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),
@@ -554,7 +556,7 @@ end)
-- }}}
-- {{{ Mouse bindings
-root.buttons(awful.util.table.join(
+root.buttons(gears.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
@@ -562,7 +564,7 @@ root.buttons(awful.util.table.join(
-- }}}
-- {{{ Key bindings
-globalkeys = awful.util.table.join(
+globalkeys = gears.table.join(
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
@@ -662,7 +664,7 @@ globalkeys = awful.util.table.join(
{description = "show the menubar", group = "launcher"})
)
-clientkeys = awful.util.table.join(
+clientkeys = gears.table.join(
awful.key({ modkey, }, "f",
function (c)
c.fullscreen = not c.fullscreen
@@ -691,14 +693,26 @@ clientkeys = awful.util.table.join(
c.maximized = not c.maximized
c:raise()
end ,
- {description = "maximize", group = "client"})
+ {description = "(un)maximize", group = "client"}),
+ awful.key({ modkey, "Control" }, "m",
+ function (c)
+ c.maximized_vertical = not c.maximized_vertical
+ c:raise()
+ end ,
+ {description = "(un)maximize vertically", group = "client"}),
+ awful.key({ modkey, "Shift" }, "m",
+ function (c)
+ c.maximized_horizontal = not c.maximized_horizontal
+ c:raise()
+ end ,
+ {description = "(un)maximize horizontally", group = "client"})
)
-- Bind all key numbers to tags.
--- Be careful: we use keycodes to make it works on any keyboard layout.
+-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
- globalkeys = awful.util.table.join(globalkeys,
+ globalkeys = gears.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
@@ -744,7 +758,7 @@ for i = 1, 9 do
)
end
-clientbuttons = awful.util.table.join(
+clientbuttons = gears.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
@@ -814,7 +828,7 @@ end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
- local buttons = awful.util.table.join(
+ local buttons = gears.table.join(
awful.button({ }, 1, function()
client.focus = c
c:raise()