From b011071da89f9e464e670ac9af50083d499a171e Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Wed, 30 Jun 2021 15:34:16 +0530 Subject: added some basic app keybindings --- .config/awesome/modalbind | 1 + .config/awesome/rc.lua | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 160000 .config/awesome/modalbind (limited to '.config/awesome') diff --git a/.config/awesome/modalbind b/.config/awesome/modalbind new file mode 160000 index 0000000..0ba5c28 --- /dev/null +++ b/.config/awesome/modalbind @@ -0,0 +1 @@ +Subproject commit 0ba5c286ace89e2fbb600383ba9e988af42a9250 diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index e749fda..7ca3792 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -22,6 +22,10 @@ require("awful.hotkeys_popup.keys") local treetile = require("treetile") treetile.focusnew = true +-- basically emacs-style keybindings from https://github.com/crater2150/awesome-modalbind +local modalbind = require("modalbind") +modalbind.init() + -- {{{ Error handling -- Check if awesome encountered an error during startup and fell back to -- another config (This code will only ever execute for the fallback config) @@ -230,7 +234,26 @@ root.buttons(gears.table.join( -- }}} -- {{{ Key bindings + +local my_i_keys = { + { "l", function() awful.spawn.with_shell("librewolf") end, "Librewolf" }, + { "b", function() awful.spawn.with_shell("brave") end, "Brave" }, + { "d", function() awful.spawn.with_shell("discord") end, "Discord" }, + { "s", function() awful.spawn.with_shell("steam") end, "Steam" }, + { "t", function() awful.spawn.with_shell("transmission-gtk") end, "Transmission" }, + { "k", function() awful.spawn.with_shell("konqueror") end, "Konqueror" }, + { "f", function() awful.spawn.with_shell("filezilla") end, "Filezilla" }, + { "n", function() awful.spawn.with_shell("blueman-manager") end, "Blueman" }, + { "p", function() awful.spawn.with_shell("pavucontrol") end, "Pavucontrol" }, + { "v", function() awful.spawn.with_shell("virtualbox") end, "VirtualBox" }, + { "c", function() awful.spawn.with_shell("scrcpy") end, "scrcpy" }, + { "v", function() awful.spawn.with_shell("vlc") end, "VLC" } +} + + globalkeys = gears.table.join( + awful.key({ modkey }, "i", function() modalbind.grab{keymap=my_i_keys, name="Apps", stay_in_mode=false} end), + awful.key({ modkey, }, "F1", hotkeys_popup.show_help, {description="show help", group="awesome"}), awful.key({ not_modkey, }, "h", awful.tag.viewprev, -- cgit v1.2.3