Awesome uses EDITOR and TERMCMD variables.

master
Pierre Neidhardt 2013-06-14 11:13:25 +02:00
parent b916e38bfc
commit 9f9e3fdd71
3 changed files with 10 additions and 7 deletions

View File

@ -317,7 +317,7 @@ end
-- Note that some laptop will not work when pressing Super+Fn.
-- Therefore we only use Fn and Mod1+Fn.
--------------------------------------------------------------------------------
term = "urxvt"
term = os.getenv("TERMCMD") or "urxvt"
termcmd = term .. " -e "
globalkeys = awful.util.table.join(
@ -329,8 +329,11 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "b", function () awful.util.spawn(termcmd .. "calc") end),
awful.key({ }, "XF86Calculator", function () awful.util.spawn(termcmd .. "calc") end),
-- File browser
awful.key({ modkey, }, "e", function () awful.util.spawn(termcmd .. "ranger") end),
-- Editor
awful.key({ modkey, }, "e", function () awful.util.spawn(os.getenv("EDITOR")) end),
-- Directory browser
awful.key({ modkey, }, "d", function () awful.util.spawn(termcmd .. "ranger") end),
awful.key({ }, "XF86Explorer", function () awful.util.spawn(termcmd .. "ranger") end),
awful.key({ }, "XF86MyComputer", function () awful.util.spawn(termcmd .. "ranger") end),

View File

@ -24,10 +24,6 @@ elif [ "$TERM" != "dumb" ]; then
# export LSCOLORS="ExfxcxDxCxdxdxCxCxECEh"
fi
## This env variable is used by some programs (like ranger) to get terminal
## executable name.
export TERMCMD="urxvt"
## Title
## If this is an xterm set the title to user@host:dir
#case "$TERM" in

View File

@ -27,3 +27,7 @@ if [ "$OSTYPE" = "linux-gnu" ] ; then
fi
[ -d "$HOME/temp" ] && export TEMP="$HOME/temp"
## This env variable is used by some programs (like ranger and awesome) to get
## terminal executable name.
export TERMCMD="urxvt"