Chris Lamb

screen-message prompt for Awesome

The following snippet adds a screen-message prompt to the Awesome window manager:

mypromptbox = widget({
  type = "textbox",
  name = "mypromptbox",
  align = "left"
})

globalkeys = awful.util.table.join(
  -- [..]
  awful.key({ "Mod1" }, "F6", function ()
    awful.prompt.run(
      { prompt = "Msg: " },
      mypromptbox,
      function (msg)
        awful.util.spawn_with_shell(
          'echo ' .. msg .. ' | sm - -b Black -f White'
        )
      end
  ) end)
)

root.keys(globalkeys)

(The default colour scheme of black-on-white is painful.)


Chris Lamb is a freelance software developer and the current Debian Project Leader. You can read other posts by me, see software I have written or read more about me. You can also follow me @lolamby.


Tags: Hacks GNU/Linux

Planets: WUGLUG UWCS Debian ALUG

Sunday 1st August 2010


Two comments