Class: Wmctile::ClassWithDmenu

Inherits:
Class
  • Object
show all
Defined in:
lib/wmctile/class_with_dmenu.rb

Direct Known Subclasses

WindowManager

Instance Method Summary collapse

Methods inherited from Class

#cmd, #notify

Instance Method Details

#dmenu(items) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/wmctile/class_with_dmenu.rb', line 4

def dmenu items
	a = Dmenu.new
	# override defaults
	a.background = '#242424'
	a.case_insensitive = true
	a.font = 'Ubuntu Mono-12'
	a.foreground = 'white'
	a.lines = 10
	a.position = :bottom
	a.selected_background = '#2e557e'
	# set items
	a.items = items
	# run
	b = a.run()
	if b.is_a? Dmenu::Item
		return b.value
	else
		return b
	end
end