Textclock Format & Keybindings

- Change textclock format
- Change tag history restore keybinding
- Change client history restore keybinding
- Change toggle floating keybinding
- Fix conflicting keybinding for restoring
  minimized client
This commit is contained in:
Sravan Balaji
2023-03-25 22:25:48 -04:00
parent 291f4c5c4f
commit d0262d3b58
2 changed files with 14 additions and 8 deletions

View File

@@ -250,8 +250,12 @@ mykeyboardlayout = awful.widget.keyboardlayout()
Create a textclock widget
See https://www.gammon.com.au/scripts/doc.php?lua=os.date for formatting options
#+BEGIN_SRC lua :tangle rc.lua
mytextclock = wibox.widget.textclock()
mytextclock.format = " %a %m/%d/%y  %I:%M %p"
mytextclock.refresh = 60 -- in seconds
#+END_SRC
** Tag List
@@ -402,7 +406,7 @@ globalkeys = gears.table.join(
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
awful.key({ modkey, }, "Tab", awful.tag.history.restore,
{description = "go back", group = "tag"}),
awful.key({ modkey, }, "j",
@@ -431,7 +435,7 @@ globalkeys = gears.table.join(
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "Tab",
awful.key({ modkey, "Control" }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
@@ -465,7 +469,7 @@ globalkeys = gears.table.join(
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}),
awful.key({ modkey, "Control" }, "n",
awful.key({ modkey, "Shift" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
@@ -550,7 +554,7 @@ clientkeys = gears.table.join(
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
awful.key({ modkey, }, "f", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, }, "Return", function (c) c:swap(awful.client.getmaster()) end,
{description = "move to master", group = "client"}),

10
rc.lua
View File

@@ -106,6 +106,8 @@ mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
mykeyboardlayout = awful.widget.keyboardlayout()
mytextclock = wibox.widget.textclock()
mytextclock.format = " %a %m/%d/%y  %I:%M %p"
mytextclock.refresh = 60 -- in seconds
local taglist_buttons = gears.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
@@ -224,7 +226,7 @@ globalkeys = gears.table.join(
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
awful.key({ modkey, }, "Tab", awful.tag.history.restore,
{description = "go back", group = "tag"}),
awful.key({ modkey, }, "j",
@@ -253,7 +255,7 @@ globalkeys = gears.table.join(
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "Tab",
awful.key({ modkey, "Control" }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
@@ -287,7 +289,7 @@ globalkeys = gears.table.join(
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}),
awful.key({ modkey, "Control" }, "n",
awful.key({ modkey, "Shift" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
@@ -368,7 +370,7 @@ clientkeys = gears.table.join(
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
awful.key({ modkey, }, "f", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, }, "Return", function (c) c:swap(awful.client.getmaster()) end,
{description = "move to master", group = "client"}),