From cabc1bf0811eabd37f60ee74f8ba0dea36dc7ae6 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 23 Jul 2019 15:32:39 +0200 Subject: [PATCH 1/2] Fix keybindings help and add minimize keybinding --- rc.lua | 10 +++++++--- tiling.lua | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rc.lua b/rc.lua index 5db770f..902dd52 100644 --- a/rc.lua +++ b/rc.lua @@ -364,15 +364,19 @@ clientkeys = gears.table.join( -- tiling awful.key({modkey,}, "Right", tiling.key.tileRight, - {description = "Move right", group = "window_tiling"} + {description = "Tile right", group = "tiling"} ), awful.key({modkey,}, "Left", tiling.key.tileLeft, - {description = "Move left", group = "window_tiling"} + {description = "Tile left", group = "tiling"} ), awful.key({modkey,}, "Up", tiling.key.toggleMaximized, - {description = "Move left", group = "window_tiling"} + {description = "Toggle maximized", group = "tiling"} + ), + awful.key({modkey,}, "Down", + tiling.key.minimize, + {description = "Lower", group = "tiling"} ), awful.key({ modkey, }, "f", diff --git a/tiling.lua b/tiling.lua index b4f18b9..224a045 100644 --- a/tiling.lua +++ b/tiling.lua @@ -62,6 +62,9 @@ return { c.maximized = false end end + end, + minimize = function(c) + c.minimized = true end } } \ No newline at end of file From d65438528cc845c53ab1e16dbe676fb20573296e Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 23 Jul 2019 15:36:39 +0200 Subject: [PATCH 2/2] Move terminal setting to our config file --- default_config.lua | 2 ++ rc.lua | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/default_config.lua b/default_config.lua index b9e7ed1..e8bde36 100644 --- a/default_config.lua +++ b/default_config.lua @@ -5,6 +5,8 @@ local awful = require("awful") local config = {} +-- Terminal +config.terminal = "terminator" -- Theme -- Change to gears.filesystem.get_themes_dir() .. "default/theme.lua" to use default awesome theme diff --git a/rc.lua b/rc.lua index 902dd52..df806b0 100644 --- a/rc.lua +++ b/rc.lua @@ -57,9 +57,8 @@ end beautiful.init(config.theme) -- This is used later as the default terminal and editor to run. -terminal = "terminator" editor = os.getenv("EDITOR") or "nano" -editor_cmd = terminal .. " -e " .. editor +editor_cmd = config.terminal .. " -e " .. editor -- Default modkey. -- Usually, Mod4 is the key with a logo between Control and Alt. @@ -93,14 +92,14 @@ awful.layout.layouts = { -- Create a launcher widget and a main menu myawesomemenu = { { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, - { "manual", terminal .. " -e man awesome" }, + { "manual", config.terminal .. " -e man awesome" }, { "edit config", editor_cmd .. " " .. awesome.conffile }, { "restart", awesome.restart }, { "quit", function() awesome.quit() end }, } mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "open terminal", terminal } + { "open terminal", config.terminal } } }) @@ -108,7 +107,7 @@ mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu }) -- Menubar configuration -menubar.utils.terminal = terminal -- Set the terminal for applications that require it +menubar.utils.terminal = config.terminal -- Set the terminal for applications that require it -- }}} -- Keyboard map indicator and switcher @@ -297,7 +296,7 @@ globalkeys = gears.table.join( {description = "go back", group = "client"}), -- Standard program - awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + awful.key({ modkey, }, "Return", function () awful.spawn(config.terminal) end, {description = "open a terminal", group = "launcher"}), awful.key({ modkey, "Control" }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}),