How can I define a keyboard shortcut in awesome to open a file using vi or
vim in the shell? I tried the following (I also tried replacing vim with
vi, and replacing spawn_with_shell with spawn):

awful.key({ modkey, "Shift"   }, "y", function ()
awful.util.spawn_with_shell("vim
/home/julian/Documents/Information/zen.txt") end),

I thought the problem might be caused by using zsh, but when I switched to
bash, this still doesn't work. Plenty of my other config shortcuts work -
for example, this works:

awful.key({ modkey, "Shift"   }, "`", function () awful.util.spawn("i3lock
-t -i /home/julian/Pictures/awesome_background.png") end),

This does not work:

awful.key({ modkey, "Shift"   }, "y", function () awful.util.spawn("vim
/home/julian/Documents/Information/zen.txt") end),

If I reload and run the above, the cursor blinks but nothing happens; I'm
guessing that it executes in a shell, then exits.

Any advice would be greatly appreciated.

Cheers,
Julian

-- 

PGP: 0xC447520A / F928 2C2E 478A 0A9E 42CB  DB52 A049 A8E4 C447 520A

Reply via email to