moltenbar/mod/bspwm_taskbar

24 lines
361 B
Plaintext
Raw Normal View History

2016-09-27 08:13:42 +00:00
# vim: ft=ruby
class BspwmTaskbar < Worker
def mainloop()
IO.popen("xtitle -s -f '%s\n'") do |pipe|
2016-09-27 10:03:14 +00:00
pipe.each do |line|
line.chomp!
if line == ""
line = "desktop"
2016-09-27 10:03:14 +00:00
end
if line.length >= 43
self.write "#{line[0...43]}..."
else
self.write line
end
2016-09-27 08:13:42 +00:00
end
end
end
end
Modules.add("bspwm_taskbar", "BspwmTaskbar")