mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 12:30:32 +01:00
Fix for awesome 4.1.
This commit is contained in:
@@ -11,6 +11,8 @@ local naughty = require("naughty")
|
|||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
||||||
local volume = require("volume")
|
local volume = require("volume")
|
||||||
|
-- Enable VIM help for hotkeys widget when client with matching name is opened:
|
||||||
|
require("awful.hotkeys_popup.keys.vim")
|
||||||
|
|
||||||
-- Startup programs
|
-- Startup programs
|
||||||
do
|
do
|
||||||
@@ -120,7 +122,7 @@ mykeyboardlayout = awful.widget.keyboardlayout()
|
|||||||
mytextclock = wibox.widget.textclock()
|
mytextclock = wibox.widget.textclock()
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- 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({ }, 1, function(t) t:view_only() end),
|
||||||
awful.button({ modkey }, 1, function(t)
|
awful.button({ modkey }, 1, function(t)
|
||||||
if client.focus then
|
if client.focus then
|
||||||
@@ -137,7 +139,7 @@ local taglist_buttons = awful.util.table.join(
|
|||||||
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
|
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)
|
awful.button({ }, 1, function (c)
|
||||||
if c == client.focus then
|
if c == client.focus then
|
||||||
c.minimized = true
|
c.minimized = true
|
||||||
@@ -189,7 +191,7 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
||||||
-- We need one layoutbox per screen.
|
-- We need one layoutbox per screen.
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
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({ }, 1, function () awful.layout.inc( 1) end),
|
||||||
awful.button({ }, 3, 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({ }, 4, function () awful.layout.inc( 1) end),
|
||||||
@@ -226,7 +228,7 @@ end)
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Mouse bindings
|
-- {{{ Mouse bindings
|
||||||
root.buttons(awful.util.table.join(
|
root.buttons(gears.table.join(
|
||||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||||
awful.button({ }, 4, awful.tag.viewnext),
|
awful.button({ }, 4, awful.tag.viewnext),
|
||||||
awful.button({ }, 5, awful.tag.viewprev)
|
awful.button({ }, 5, awful.tag.viewprev)
|
||||||
@@ -234,7 +236,7 @@ root.buttons(awful.util.table.join(
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = awful.util.table.join(
|
globalkeys = gears.table.join(
|
||||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
{description="show help", group="awesome"}),
|
{description="show help", group="awesome"}),
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||||
@@ -352,7 +354,7 @@ globalkeys = awful.util.table.join(
|
|||||||
awful.key({ "Control" }, "Print", function () awful.spawn("gnome-screenshot -a") end)
|
awful.key({ "Control" }, "Print", function () awful.spawn("gnome-screenshot -a") end)
|
||||||
)
|
)
|
||||||
|
|
||||||
clientkeys = awful.util.table.join(
|
clientkeys = gears.table.join(
|
||||||
awful.key({ modkey, }, "f",
|
awful.key({ modkey, }, "f",
|
||||||
function (c)
|
function (c)
|
||||||
c.fullscreen = not c.fullscreen
|
c.fullscreen = not c.fullscreen
|
||||||
@@ -381,14 +383,26 @@ clientkeys = awful.util.table.join(
|
|||||||
c.maximized = not c.maximized
|
c.maximized = not c.maximized
|
||||||
c:raise()
|
c:raise()
|
||||||
end ,
|
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.
|
-- 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.
|
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||||
for i = 1, 9 do
|
for i = 1, 9 do
|
||||||
globalkeys = awful.util.table.join(globalkeys,
|
globalkeys = gears.table.join(globalkeys,
|
||||||
-- View tag only.
|
-- View tag only.
|
||||||
awful.key({ modkey }, "#" .. i + 9,
|
awful.key({ modkey }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
@@ -434,7 +448,7 @@ for i = 1, 9 do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
clientbuttons = awful.util.table.join(
|
clientbuttons = gears.table.join(
|
||||||
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
||||||
awful.button({ modkey }, 1, awful.mouse.client.move),
|
awful.button({ modkey }, 1, awful.mouse.client.move),
|
||||||
awful.button({ modkey }, 3, awful.mouse.client.resize))
|
awful.button({ modkey }, 3, awful.mouse.client.resize))
|
||||||
@@ -514,7 +528,7 @@ end)
|
|||||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||||
client.connect_signal("request::titlebars", function(c)
|
client.connect_signal("request::titlebars", function(c)
|
||||||
-- buttons for the titlebar
|
-- buttons for the titlebar
|
||||||
local buttons = awful.util.table.join(
|
local buttons = gears.table.join(
|
||||||
awful.button({ }, 1, function()
|
awful.button({ }, 1, function()
|
||||||
client.focus = c
|
client.focus = c
|
||||||
c:raise()
|
c:raise()
|
||||||
|
|||||||
Reference in New Issue
Block a user