Compare commits
	
		
			2 Commits
		
	
	
		
			c571a09f4b
			...
			7fb4d8a8b0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7fb4d8a8b0 | |||
| e7063807dd | 
@@ -32,7 +32,7 @@ conky.config = {
 | 
				
			|||||||
	no_buffers = true,
 | 
						no_buffers = true,
 | 
				
			||||||
	update_interval = 1.0,
 | 
						update_interval = 1.0,
 | 
				
			||||||
	uppercase = false,
 | 
						uppercase = false,
 | 
				
			||||||
	use_spacer = 'right',
 | 
						use_spacer = false,
 | 
				
			||||||
    pad_percents = 3,
 | 
					    pad_percents = 3,
 | 
				
			||||||
    short_units = false,
 | 
					    short_units = false,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@ function split_fmt(f)
 | 
				
			|||||||
                in_spec = false
 | 
					                in_spec = false
 | 
				
			||||||
                curr = ""
 | 
					                curr = ""
 | 
				
			||||||
            elseif string.match(char, '[qs]') then
 | 
					            elseif string.match(char, '[qs]') then
 | 
				
			||||||
                if string.match(curr, '^%%[0-9]*$') then
 | 
					                if string.match(curr, '^%%%-?[0-9]*$') then
 | 
				
			||||||
                    curr = curr .. char
 | 
					                    curr = curr .. char
 | 
				
			||||||
                    table.insert(ret, curr)
 | 
					                    table.insert(ret, curr)
 | 
				
			||||||
                    in_spec = false
 | 
					                    in_spec = false
 | 
				
			||||||
@@ -28,7 +28,7 @@ function split_fmt(f)
 | 
				
			|||||||
                    io.stderr:write("Invalid format:  '" .. curr .. char .. "'\n")
 | 
					                    io.stderr:write("Invalid format:  '" .. curr .. char .. "'\n")
 | 
				
			||||||
                    return nil
 | 
					                    return nil
 | 
				
			||||||
                end
 | 
					                end
 | 
				
			||||||
            elseif string.match(char, '[0-9%.]') then
 | 
					            elseif string.match(char, '[0-9%.%-]') then
 | 
				
			||||||
                curr = curr .. char
 | 
					                curr = curr .. char
 | 
				
			||||||
            elseif string.match(char, '%%') then
 | 
					            elseif string.match(char, '%%') then
 | 
				
			||||||
                if string.match(curr, '^%%') then
 | 
					                if string.match(curr, '^%%') then
 | 
				
			||||||
@@ -105,7 +105,7 @@ function conky_printf(format, ...)
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
    for i,fs in ipairs(formats) do
 | 
					    for i,fs in ipairs(formats) do
 | 
				
			||||||
        if is_fmt_spec(fs) then -- we have a format specifier
 | 
					        if is_fmt_spec(fs) then -- we have a format specifier
 | 
				
			||||||
            if string.match(fs, '[dEefgiouXx]$') then -- we have a numeric format specifier, convert value to number
 | 
					            if string.match(fs, '[cdEefgiouXx]$') then -- we have a numeric format specifier, convert value to number
 | 
				
			||||||
                parsed_values[i] = tonumber(trim((parsed_values[i])))
 | 
					                parsed_values[i] = tonumber(trim((parsed_values[i])))
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user