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

No comments

§

July  
24 Four men in a mine
12 10K Challenge: Week 1
5 10K Challenge: Week 0
June  
7 Distributing locking with Python and Redis
1 Appending the request URL to SQL statements in Django
May  
4 Rotating email into your inbox using imapfilter
April  
22 Locating source for any Python module
March  
17 Per-channel BTS bot filtering
December  
27 Readline tab completion using Django models
November  
19 Transparent directory replacement with zsh
...

§