Some other shit

This commit is contained in:
2016-09-27 13:03:14 +03:00
parent b97d52cce5
commit 33b6dca429
4 changed files with 65 additions and 8 deletions

View File

@@ -5,8 +5,16 @@ class ModBspwmTaskbar < ModBasic
def data_loop()
while true do
IO.popen("xtitle -s -f '%s'").each do |line|
$panel_data[@@mod_name.to_sym] = line.chomp
pipe = IO.popen("xtitle -s -f '%s'")
$children << pipe.pid
pipe.each do |line|
if line == "\n"
$panel_data[@@mod_name.to_sym] = ""
else
$panel_data[@@mod_name.to_sym] = $config['mod']['bspwm_taskbar']['begin'].erb + line.chomp + $config['mod']['bspwm_taskbar']['end'].erb
end
$queue << 1
end
end