File: float-sb.lua

package info (click to toggle)
notion 3%2B2012042300-1
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 4,724 kB
  • sloc: ansic: 45,614; makefile: 544; sh: 409; perl: 113
file content (23 lines) | stat: -rw-r--r-- 432 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--
-- Example of floating toggleable statusbar
--

local floatsbscr=ioncore.find_screen_id(0)
local floatsb

floatsb=floatsbscr:attach_new{
    type="WStatusBar", 
    unnumbered=true, 
    sizepolicy='northwest', 
    template='/ %date /', 
    passive=true, 
    level=2
}

local function toggle_floatsb()
    floatsbscr:set_hidden(floatsb, 'toggle')
end

ioncore.defbindings("WScreen", {
    kpress(META.."D", toggle_floatsb)
})