Class: Wmctile::Class

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

Direct Known Subclasses

ClassWithDmenu, Memory, Router, Settings, Window, WindowTiler

Instance Method Summary collapse

Instance Method Details

#cmd(cmd) ⇒ Object



2
3
4
5
# File 'lib/wmctile/class.rb', line 2

def cmd cmd
	# [0..-2] to strip the last \n
	`#{ cmd }`[0..-2]
end

#notify(title, string, icon = nil) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/wmctile/class.rb', line 6

def notify title, string, icon = nil
	if icon
		system "notify-send -i '#{ icon }' '#{title}' '#{string}'"
	else	
		system "notify-send '#{title}' '#{string}'"
	end
end