colours yo
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
8544bb8cd4
commit
6c714c12df
|
@ -49,7 +49,7 @@ class BspwmPager < Worker
|
|||
|
||||
if state[:monitors].count > 1 or @my_config['show_single_monitor']
|
||||
if m[:focused]
|
||||
out << "%{B#{@config['colours']['mon_focused']}} #{m_name} %{B-}"
|
||||
out << "%{BC{mon_focused}} #{m_name} %{B-}"
|
||||
else
|
||||
out << " #{m_name} "
|
||||
end
|
||||
|
@ -61,7 +61,7 @@ class BspwmPager < Worker
|
|||
end
|
||||
|
||||
if d[:focused]
|
||||
out << "%{B#{@config['colours']['bg_focused']}} #{d_name} %{B-}"
|
||||
out << "%{BC{bg_focused}} #{d_name} %{B-}"
|
||||
elsif d[:urgent]
|
||||
out << "%{A:bspc desktop -f #{d_name}:}%{R} #{d_name} %{R}%{A}"
|
||||
elsif d[:occupied]
|
||||
|
|
12
moltenbar
12
moltenbar
|
@ -84,17 +84,21 @@ end
|
|||
class Panel
|
||||
attr_accessor :modData
|
||||
|
||||
def initialize(template)
|
||||
def initialize(config)
|
||||
@modData = {}
|
||||
@template = template
|
||||
@config = config
|
||||
end
|
||||
|
||||
def render
|
||||
panel = @template
|
||||
panel = @config["format"]
|
||||
@modData.each do |modName, modData|
|
||||
panel = panel.gsub(/@{#{modName}}/, modData)
|
||||
end
|
||||
|
||||
@config["colours"].each do |colName, colValue|
|
||||
panel = panel.gsub(/C{#{colName}}/, colValue)
|
||||
end
|
||||
|
||||
return panel
|
||||
end
|
||||
end
|
||||
|
@ -186,7 +190,7 @@ lemonbar_cmd = [
|
|||
|
||||
printf("Launching lemonbar as:\n %s\n", lemonbar_cmd.join(" "))
|
||||
|
||||
p = Panel.new(config['format'])
|
||||
p = Panel.new(config)
|
||||
IO.popen(lemonbar_cmd, "w+") do |pipe_lb|
|
||||
pipe_lb.sync = true
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user