This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gears.timer { | |
timeout = 30, | |
callback = function() | |
awful.spawn.easy_async( | |
{"sh", "-c", "acpi | sed -n 's/^.*, \\([0-9]*\\)%/\\1/p'"}, | |
function(out) | |
for s=1, screen.count() do | |
screen[s].mywibox.bg = tonumber(out) < 5 and "#ffaa00" or beautiful.bg_normal | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
call pathogen#infect('bundle/{}') | |
syntax on | |
filetype plugin indent on | |
set rtp+=$HOME/config_files/.vim/bundle/powerline/powerline/bindings/vim/ | |
"let g:airline_section_z = airline#section#create(['windowswap', '⮀%3p%% ', 'linenr', ':%3v']) | |
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
--- Extra helper functions for the keygrabber. | |
-- | |
-- @author dodo | |
-- @copyright 2012 dodo | |
-- @classmod keygrabber | |
--------------------------------------------------------------------------- | |
local ipairs = ipairs | |
local table = table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) install bob | |
2) install foo | |
3) build exe | |
cmake .. -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF | |
ld: error: cannot find -lbob | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- sharingmodule.lua | |
local mysharedvariables = { | |
a = "foo", | |
b = "bar" | |
} | |
return mysharedvariables | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Main NeoMutt configuration file rewritten in Lua | |
local unpack = unpack or table.unpack --lua 5.1 compat | |
--FIXME remove this hack | |
local delimiter = "⮀" | |
------------------------------------ | |
-- Constants -- | |
------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awesome-client 'print_as_csv = function(rows) local ret = {}; for k,v in pairs(rows) do table.insert(ret, table.concat(v, ",")) end; return table.concat(ret, "\n") end' | |
awesome-client 'local ret = {} for _,c in ipairs(client.get()) do table.insert(ret, {c.class, c.name, c.x, c.y, c.width, c.height}) end; return print_as_csv(ret)' | column -ts',' -o ' | ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local pb = wibox.widget { | |
value = 0.5, | |
color = "#0000ff", | |
border_color = "#00ff00", | |
border_width = 3, | |
bar_corder_color="#ff00ff", | |
bar_border_width = 2, | |
background_color = "#ffff00", | |
forced_width = 300, | |
widget = wibox.widget.progressbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Add widgets to the wibox | |
s.mywibox:setup { | |
layout = wibox.layout.align.horizontal, | |
{ -- Left widgets | |
layout = wibox.layout.fixed.horizontal, | |
mylauncher, | |
s.mytaglist, | |
s.mypromptbox, | |
}, | |
s.mytasklist, -- Middle widget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local w = wibox { | |
bg = "#ff0000", | |
height = 50, | |
width =50, | |
shape = function(cr, w, h, ...) | |
return gears.shape.transform(gears.shape.arrow) : rotate_at(w/2, h/2, math.pi) (cr, w, h, ...) | |
end, | |
visible = true | |
} |