August 1st 2010

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.)




You can subscribe to new posts via email or RSS.