aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkj-sh6042024-07-23 18:34:43 -0400
committerkj-sh6042024-07-23 18:34:43 -0400
commit36164fb9392ce680bbe146c9abd9af7876b9014c (patch)
treeed36eefeb1ef90fdbcb86be6e73edee07e9f6d58
parent6d3bff06f743f6136d5238b394883e50ec4075dc (diff)
refactor: allow use of numpad on -git `rc.lua`
-rw-r--r--.config/awesome/rc.lua53
1 files changed, 48 insertions, 5 deletions
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua
index a16050c..7bc217d 100644
--- a/.config/awesome/rc.lua
+++ b/.config/awesome/rc.lua
@@ -295,7 +295,6 @@ awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "Menu", function() mymainmenu:show() end,
{ description = "show main menu", group = "awesome" }),
-
awful.key({ modkey, "Shift" }, "F10", function() mymainmenu:show() end,
{ description = "show main menu", group = "awesome" }),
@@ -474,8 +473,8 @@ awful.keyboard.append_global_keybindings({
{ description = "toggle dunst notifications", group = "launcher" }),
-- run boomer (requires boomer-git from AUR)
- awful.key({ modkey }, "z", function () awful.spawn.easy_async_with_shell("boomer") end,
- {description = "run boomer (zoomer application for Linux)", group = "launcher"}),
+ awful.key({ modkey }, "z", function() awful.spawn.easy_async_with_shell("boomer") end,
+ { description = "run boomer (zoomer application for Linux)", group = "launcher" }),
-- tiled client resizing
-- h,j,k,l binds
@@ -604,6 +603,50 @@ awful.keyboard.append_global_keybindings({
end
end,
},
+ }),
+
+ -- tags manipulation via keyboard number pad
+ awful.keyboard.append_global_keybindings({
+ awful.key {
+ modifiers = { "Control", "Mod1" },
+ keygroup = "numpad",
+ description = "only view tag",
+ group = "tag",
+ on_press = function(index)
+ local screen = awful.screen.focused()
+ local tag = screen.tags[index]
+ if tag then
+ tag:view_only()
+ end
+ end,
+ },
+ awful.key {
+ modifiers = { modkey },
+ keygroup = "numpad",
+ description = "toggle tag",
+ group = "tag",
+ on_press = function(index)
+ local screen = awful.screen.focused()
+ local tag = screen.tags[index]
+ if tag then
+ awful.tag.viewtoggle(tag)
+ end
+ end,
+ },
+ awful.key {
+ modifiers = { modkey, "Shift" },
+ keygroup = "numpad",
+ description = "move focused client to tag",
+ group = "tag",
+ on_press = function(index)
+ if client.focus then
+ local tag = client.focus.screen.tags[index]
+ if tag then
+ client.focus:move_to_tag(tag)
+ end
+ end
+ end,
+ },
})
}
)
@@ -740,8 +783,8 @@ ruled.client.connect_signal("request::rules", function()
"Kruler",
"Mate-system-monitor",
"mate-system-monitor",
- "MessageWin", -- kalarm.
- "mullvadbrowser", -- needs a fixed window size to avoid fingerprinting by screen size.
+ "MessageWin", -- kalarm.
+ "mullvadbrowser", -- needs a fixed window size to avoid fingerprinting by screen size.
"Mullvad Browser", -- needs a fixed window size to avoid fingerprinting by screen size.
"screengrab",
"Sxiv",