Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2017-05-22 19:46:44 +03:00
parent 72d67d16f2
commit e321246abc
2 changed files with 10 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class BspwmPager < Worker
# Example: WMDVI-I-1:o1:o2:f3:f4:O5:f6:f7:f8:f9:fh:LT:TF:G
out = []
string.split(":").each do |part|
string[1..-1].split(":").each do |part|
n = part[1..-1]
if @my_config['blacklist'] != nil
@ -27,6 +27,10 @@ class BspwmPager < Worker
end
case part
when /^M.+/
out << "%{B#{@config['colours']['mon_focused']}} #{n} %{B-}"
when /^m.+/
out << " #{n} "
when /^(O|F|U).+/
out << "%{B#{@config['colours']['bg_focused']}} #{n} %{B-}"
when /^u.+/

View File

@ -2,12 +2,14 @@
class BspwmTaskbar < Worker
def mainloop()
IO.popen("xtitle -s -f '%s\n'") do |pipe|
IO.popen("xtitle -s -f '%s'") do |pipe|
pipe.each do |line|
if line == "\n"
line.chomp!
if line == ""
self.write ""
else
tmpl = Template.new(@my_config['begin'] + line.chomp + @my_config['end'])
tmpl = Template.new(@my_config['begin'] + line + @my_config['end'])
self.write tmpl.render(@config, nil)
end
end