Keymapping for generating IMEC TOTP

This commit is contained in:
Thomas Avé 2022-11-19 15:07:34 +01:00
parent 3ffc1fba3a
commit 79afd5af4a
1 changed files with 8 additions and 1 deletions

View File

@ -137,6 +137,13 @@ keys.globalkeys = gears.table.join(
end, end,
{description = "Open Firefox", group = "launcher"} {description = "Open Firefox", group = "launcher"}
), ),
-- Generate IMEC TOTP
awful.key({modkey}, "i",
function()
awful.spawn.with_shell("ykman oath accounts code \"Microsoft (IMEC)\" | cut -d ' ' -f 5 | xsel --clipboard")
end,
{description = "Generate IMEC TOTP", group = "launcher"}
),
-- Spawn file manager -- Spawn file manager
awful.key({modkey}, "a", awful.key({modkey}, "a",
function() function()
@ -261,7 +268,7 @@ keys.globalkeys = gears.table.join(
awful.key({}, "XF86Calculator", awful.key({}, "XF86Calculator",
function() function()
awful.util.spawn("rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | xsel -i\"") awful.util.spawn("rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | xsel --clipboard\"")
end, end,
{description = "Launch the calculator", group = "hotkeys"} {description = "Launch the calculator", group = "hotkeys"}
), ),