Merge pull request #1341 from psychon/modeline

Lots of fun with vim modelines
This commit is contained in:
Daniel Hahler 2017-01-02 19:56:06 +01:00 committed by GitHub
commit 4b9e8e232d
138 changed files with 294 additions and 30 deletions

View File

@ -1,31 +1,31 @@
if(NOT VERSION) if(NOT VERSION)
set(VERSION "unknown") set(VERSION "unknown")
endif() endif()
string(REGEX REPLACE "^v?([0-9.]+)-?(.*)$" string(REGEX REPLACE "^v?([0-9.]+)-?(.*)$"
"\\1;\\2" version_result ${VERSION}) "\\1;\\2" version_result ${VERSION})
list(LENGTH version_result version_result_list_length) list(LENGTH version_result version_result_list_length)
if(version_result_list_length EQUAL 2) if(version_result_list_length EQUAL 2)
list(GET version_result 0 version_num) list(GET version_result 0 version_num)
list(GET version_result 1 version_gitstamp) list(GET version_result 1 version_gitstamp)
else(version_result_list_length EQUAL 2) else(version_result_list_length EQUAL 2)
message("Unable to deduce a meaningful version number. \ message("Unable to deduce a meaningful version number. \
Set OVERRIDE_VERSION when you run CMake (cmake .. -DOVERRIDE_VERSION=3.14.159), or \ Set OVERRIDE_VERSION when you run CMake (cmake .. -DOVERRIDE_VERSION=3.14.159), or \
just build from a git repository.") just build from a git repository.")
set(version_num "0.0.0") set(version_num "0.0.0")
set(version_gitstamp "") set(version_gitstamp "")
endif(version_result_list_length EQUAL 2) endif(version_result_list_length EQUAL 2)
if(version_gitstamp) if(version_gitstamp)
set(version_gitsuffix "~git${version_gitstamp}") set(version_gitsuffix "~git${version_gitstamp}")
else(version_gitstamp) else(version_gitstamp)
set(version_gitsuffix "") set(version_gitsuffix "")
endif(version_gitstamp) endif(version_gitstamp)
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
"\\1;\\2;\\3" version_num_split ${version_num}) "\\1;\\2;\\3" version_num_split ${version_num})
list(APPEND version_num_split 0 0 0) #ensure the list(GET )) commands below never fail list(APPEND version_num_split 0 0 0) #ensure the list(GET )) commands below never fail
@ -40,21 +40,21 @@ message(STATUS "Package version will be set to ${version_num}${version_gitsuffix
set(CPACK_PACKAGE_VERSION "${version_num}${version_gitsuffix}") set(CPACK_PACKAGE_VERSION "${version_num}${version_gitsuffix}")
if(NOT CPACK_GENERATOR) if(NOT CPACK_GENERATOR)
a_find_program(rpmbuild_path "rpmbuild" FALSE) a_find_program(rpmbuild_path "rpmbuild" FALSE)
if(rpmbuild_path) if(rpmbuild_path)
message(STATUS "rpmbuild found, enabling RPM for the 'package' target") message(STATUS "rpmbuild found, enabling RPM for the 'package' target")
list(APPEND CPACK_GENERATOR RPM) list(APPEND CPACK_GENERATOR RPM)
else(rpmbuild_path) else(rpmbuild_path)
message(STATUS "The 'package' target will not build a RPM") message(STATUS "The 'package' target will not build a RPM")
endif(rpmbuild_path) endif(rpmbuild_path)
a_find_program(dpkg_path "dpkg" FALSE) a_find_program(dpkg_path "dpkg" FALSE)
if (dpkg_path) if (dpkg_path)
message(STATUS "dpkg found, enabling DEB for the 'package' target") message(STATUS "dpkg found, enabling DEB for the 'package' target")
list(APPEND CPACK_GENERATOR DEB) list(APPEND CPACK_GENERATOR DEB)
else(dpkg_path) else(dpkg_path)
message(STATUS "The 'package' target will not build a DEB") message(STATUS "The 'package' target will not build a DEB")
endif(dpkg_path) endif(dpkg_path)
endif(NOT CPACK_GENERATOR) endif(NOT CPACK_GENERATOR)
set(CPACK_PACKAGE_NAME "awesome") set(CPACK_PACKAGE_NAME "awesome")
@ -62,5 +62,7 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "devnull@example.com")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A tiling window manager") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A tiling window manager")
if(CPACK_GENERATOR) if(CPACK_GENERATOR)
include(CPack) include(CPack)
endif() endif()
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker

View File

@ -16,3 +16,5 @@ foreach(doc_file_name ${doc_files})
# Create a new variable usable from lua files # Create a new variable usable from lua files
set(DOC_${DOC_FILE_NAME}_COMMON "Imported documentation\n\n${doc_file_content}") set(DOC_${DOC_FILE_NAME}_COMMON "Imported documentation\n\n${doc_file_content}")
endforeach() endforeach()
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker

View File

@ -47,3 +47,5 @@ endfunction()
generate_widget_list( "container" ) generate_widget_list( "container" )
generate_widget_list( "layout" ) generate_widget_list( "layout" )
generate_widget_list( "widget" ) generate_widget_list( "widget" )
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker

View File

@ -86,3 +86,5 @@ capi.client.connect_signal("focus", urgent.delete)
capi.client.connect_signal("unmanage", urgent.delete) capi.client.connect_signal("unmanage", urgent.delete)
return urgent return urgent
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -56,3 +56,5 @@ resize.add_move_callback(function(c, _, _)
end, "mouse.move") end, "mouse.move")
return setmetatable(module, {__call = function(_, ...) return module.drag_to_tag(...) end}) return setmetatable(module, {__call = function(_, ...) return module.drag_to_tag(...) end})
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -227,3 +227,5 @@ local function handler(_, client, context, args) --luacheck: no unused_args
end end
return setmetatable(module, {__call=handler}) return setmetatable(module, {__call=handler})
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -264,3 +264,5 @@ resize.add_leave_callback(function(c, _, args)
end, "mouse.move") end, "mouse.move")
return setmetatable(module, {__call = function(_, ...) return module.snap(...) end}) return setmetatable(module, {__call = function(_, ...) return module.snap(...) end})
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -238,3 +238,5 @@ function gears.geometry.rectangle.area_remove(areas, elem)
end end
return gears.geometry return gears.geometry
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -520,3 +520,5 @@ end
return setmetatable(module, { return setmetatable(module, {
__call = function(_,...) return add_steps(...) end __call = function(_,...) return add_steps(...) end
}) })
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -57,7 +57,7 @@ function(escape_string variable content escaped_content line_prefix)
set(tmp_output ${content}) set(tmp_output ${content})
foreach (LINE ${var_lines}) foreach (LINE ${var_lines})
if(NOT LINE MATCHES "^.+--DOC_[A-Z]+$") if(NOT LINE MATCHES "^.*--DOC_[A-Z]+")
set(tmp_output ${tmp_output}\n--${line_prefix}${LINE}) set(tmp_output ${tmp_output}\n--${line_prefix}${LINE})
endif() endif()
endforeach() endforeach()
@ -259,3 +259,5 @@ foreach(file ${test_files})
endforeach() endforeach()
message(STATUS "Example tests passed.") message(STATUS "Example tests passed.")
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker

View File

@ -11,3 +11,5 @@ mouse.coords {
} }
mouse.push_history() --DOC_HIDE mouse.push_history() --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -23,3 +23,5 @@ c = client.gen_fake {x = screen[3].geometry.x+10, y = screen[3].geometry.y+10, w
placement.align(c, {position = "center_horizontal", honor_workarea=true}) placement.align(c, {position = "center_horizontal", honor_workarea=true})
return {hide_lines=true} return {hide_lines=true}
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -14,3 +14,5 @@ awful.placement.bottom(client.focus)
assert(c.x == screen[1].geometry.width/2-40/2-c.border_width--DOC_HIDE assert(c.x == screen[1].geometry.width/2-40/2-c.border_width--DOC_HIDE
and c.y==screen[1].geometry.height-30-2*c.border_width--DOC_HIDE and c.y==screen[1].geometry.height-30-2*c.border_width--DOC_HIDE
and c.width==40 and c.height==30)--DOC_HIDE and c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -17,3 +17,5 @@ assert( --DOC_HIDE
and c.width == 40--DOC_HIDE and c.width == 40--DOC_HIDE
and c.height == 30--DOC_HIDE and c.height == 30--DOC_HIDE
) --DOC_HIDE ) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -14,3 +14,5 @@ awful.placement.bottom_right(client.focus)
assert(c.x == screen[1].geometry.width-40-2*c.border_width) --DOC_HIDE assert(c.x == screen[1].geometry.width-40-2*c.border_width) --DOC_HIDE
assert(c.y==screen[1].geometry.height-30-2*c.border_width) --DOC_HIDE assert(c.y==screen[1].geometry.height-30-2*c.border_width) --DOC_HIDE
assert(c.width==40 and c.height==30)--DOC_HIDE assert(c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ awful.placement.center_horizontal(client.focus)
assert(c.x == screen[1].geometry.width/2-40/2-c.border_width)--DOC_HIDE assert(c.x == screen[1].geometry.width/2-40/2-c.border_width)--DOC_HIDE
assert(c.y==35)--DOC_HIDE assert(c.y==35)--DOC_HIDE
assert(c.width==40 and c.height==30)--DOC_HIDE assert(c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -9,3 +9,5 @@ local awful = {placement = require("awful.placement")} --DOC_HIDE
--[[local c = ]]client.gen_fake {x = 45, y = 35, width=40, height=30} --DOC_HIDE --[[local c = ]]client.gen_fake {x = 45, y = 35, width=40, height=30} --DOC_HIDE
awful.placement.center_vertical(client.focus) awful.placement.center_vertical(client.focus)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -14,3 +14,5 @@ awful.placement.centered(client.focus)
assert(c.x == screen[1].geometry.width/2-40/2-c.border_width) --DOC_HIDE assert(c.x == screen[1].geometry.width/2-40/2-c.border_width) --DOC_HIDE
assert(c.y==screen[1].geometry.height/2-30/2-c.border_width) --DOC_HIDE assert(c.y==screen[1].geometry.height/2-30/2-c.border_width) --DOC_HIDE
assert(c.width==40 and c.height==30)--DOC_HIDE assert(c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -60,3 +60,5 @@ local _, corner = awful.placement.closest_corner(
{include_sides = true, bounding_rect = {x=0, y=0, width=200, height=200}} {include_sides = true, bounding_rect = {x=0, y=0, width=200, height=200}}
) )
print("Closest corner:", corner) print("Closest corner:", corner)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -9,3 +9,5 @@ f(client.focus)
local sg = screen[1].geometry--DOC_HIDE local sg = screen[1].geometry--DOC_HIDE
assert(c.x == sg.x and c.y==sg.height/2-30/2-c.border_width--DOC_HIDE assert(c.x == sg.x and c.y==sg.height/2-30/2-c.border_width--DOC_HIDE
and c.width==40 and c.height==30)--DOC_HIDE and c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -16,3 +16,5 @@ assert(c.x == wa.x and geo.x == wa.x)--DOC_HIDE
assert(c.y == wa.y) --DOC_HIDE assert(c.y == wa.y) --DOC_HIDE
assert(c.width == wa.width/2 - 2*c.border_width)--DOC_HIDE assert(c.width == wa.width/2 - 2*c.border_width)--DOC_HIDE
assert(c.height == wa.height - 2*c.border_width)--DOC_HIDE assert(c.height == wa.height - 2*c.border_width)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ awful.placement.left(client.focus)
assert(c.x == 0 and c.y==screen[1].geometry.height/2-30/2-c.border_width--DOC_HIDE assert(c.x == 0 and c.y==screen[1].geometry.height/2-30/2-c.border_width--DOC_HIDE
and c.width==40 and c.height==30)--DOC_HIDE and c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -16,3 +16,5 @@ local c1 = client.gen_fake {--DOC_HIDE
c1.height+2*c1.border_width == screen[1].geometry.height) --DOC_HIDE c1.height+2*c1.border_width == screen[1].geometry.height) --DOC_HIDE
end --DOC_HIDE end --DOC_HIDE
end --DOC_HIDE end --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ placement.maximize_horizontally(c)
assert(c.width + 2*c.border_width == screen[1].geometry.width) --DOC_HIDE assert(c.width + 2*c.border_width == screen[1].geometry.width) --DOC_HIDE
assert(c.y == 35) --DOC_HIDE assert(c.y == 35) --DOC_HIDE
assert(c.height == 30) --DOC_HIDE assert(c.height == 30) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ placement.maximize_vertically(c)
assert(c.height+2*c.border_width == screen[1].geometry.height)--DOC_HIDE assert(c.height+2*c.border_width == screen[1].geometry.height)--DOC_HIDE
assert(c.x == 45) --DOC_HIDE assert(c.x == 45) --DOC_HIDE
assert(c.width == 40) --DOC_HIDE assert(c.width == 40) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -6,3 +6,5 @@ mouse.coords {x= 50, y=50} --DOC_HIDE
mouse.push_history() --DOC_HIDE mouse.push_history() --DOC_HIDE
awful.placement.next_to_mouse(client.focus) awful.placement.next_to_mouse(client.focus)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -7,3 +7,5 @@ print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.hei
awful.placement.no_offscreen(c)--, {honor_workarea=true, margins=40}) awful.placement.no_offscreen(c)--, {honor_workarea=true, margins=40})
print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -24,3 +24,5 @@ awful.placement.no_overlap(client.focus) --FIXME --DOC_HIDE
--TODO maximized + no_overlap --DOC_HIDE --TODO maximized + no_overlap --DOC_HIDE
--TODO add 9 clients with no_overlap on all of them --DOC_HIDE --TODO add 9 clients with no_overlap on all of them --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -72,3 +72,5 @@ for _, v in ipairs(all_coords_in) do
assert(test_touch_mouse(client.get()[s]), v[1]) assert(test_touch_mouse(client.get()[s]), v[1])
s = s + 1 s = s + 1
end end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -14,3 +14,5 @@ awful.placement.right(client.focus)
assert(c.x == screen[1].geometry.width-40-2*c.border_width) --DOC_HIDE assert(c.x == screen[1].geometry.width-40-2*c.border_width) --DOC_HIDE
assert( c.y==screen[1].geometry.height/2-30/2-c.border_width)--DOC_HIDE assert( c.y==screen[1].geometry.height/2-30/2-c.border_width)--DOC_HIDE
assert( c.width==40 and c.height==30)--DOC_HIDE assert( c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -14,3 +14,5 @@ local c1 = client.gen_fake {--DOC_HIDE
placement.stretch(c1, {direction=pos}) placement.stretch(c1, {direction=pos})
end end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -16,3 +16,5 @@ assert(c.y==35) --DOC_HIDE
assert(c.width == 40) --DOC_HIDE assert(c.width == 40) --DOC_HIDE
assert(c.y+c.height+2*c.border_width == --DOC_HIDE assert(c.y+c.height+2*c.border_width == --DOC_HIDE
screen[1].geometry.y + screen[1].geometry.height) --DOC_HIDE screen[1].geometry.y + screen[1].geometry.height) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -12,3 +12,5 @@ local c = client.gen_fake {x = 45, y = 35, width=40, height=30} --DOC_HIDE
placement.stretch_left(client.focus) placement.stretch_left(client.focus)
assert(c.x == 0 and c.y == 35 and c.height == 30) --DOC_HIDE assert(c.x == 0 and c.y == 35 and c.height == 30) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ placement.stretch_right(client.focus)
local right = screen[1].geometry.x + screen[1].geometry.width --DOC_HIDE local right = screen[1].geometry.x + screen[1].geometry.width --DOC_HIDE
assert(c.height == 30 and c.x == 45 and c.x+c.width+2*c.border_width == right) --DOC_HIDE assert(c.height == 30 and c.x == 45 and c.x+c.width+2*c.border_width == right) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -15,3 +15,5 @@ assert(c.y==0) --DOC_HIDE
assert(c.x==45) --DOC_HIDE assert(c.x==45) --DOC_HIDE
assert(c.width == 40) --DOC_HIDE assert(c.width == 40) --DOC_HIDE
assert(c.height-2*c.border_width == 35+30) --DOC_HIDE assert(c.height-2*c.border_width == 35+30) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -15,3 +15,5 @@ assert(c.x == screen[1].geometry.width/2-40/2-c.border_width)
assert(c.y==0) --DOC_HIDE assert(c.y==0) --DOC_HIDE
assert( c.width==40) --DOC_HIDE assert( c.width==40) --DOC_HIDE
assert(c.height==30)--DOC_HIDE assert(c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -12,3 +12,5 @@ local c = client.gen_fake {x = 45, y = 35, width=40, height=30} --DOC_HIDE
awful.placement.top_left(client.focus) awful.placement.top_left(client.focus)
assert(c.x == 0 and c.y==0 and c.width==40 and c.height==30)--DOC_HIDE assert(c.x == 0 and c.y==0 and c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ awful.placement.top_right(client.focus)
assert(c.x == screen[1].geometry.width-40-2*c.border_width and c.y==0 --DOC_HIDE assert(c.x == screen[1].geometry.width-40-2*c.border_width and c.y==0 --DOC_HIDE
and c.width==40 and c.height==30)--DOC_HIDE and c.width==40 and c.height==30)--DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -9,3 +9,5 @@ awful.placement.under_mouse(client.focus)
assert(client.focus.x + client.focus.width /2 - mouse.coords().x <= 1) --DOC_HIDE assert(client.focus.x + client.focus.width /2 - mouse.coords().x <= 1) --DOC_HIDE
assert(client.focus.y + client.focus.height/2 - mouse.coords().y <= 1) --DOC_HIDE assert(client.focus.y + client.focus.height/2 - mouse.coords().y <= 1) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -136,3 +136,5 @@ for _, h in ipairs(mouse.old_histories) do
end end
img:finish() img:finish()
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.arc(cr,70,70, nil, 0, 2*math.pi) shape.arc(cr,70,70, nil, 0, 2*math.pi)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.arrow) : rotate_at(35,35,math.pi/2)(cr,70,70) shape.transform(shape.arrow) : rotate_at(35,35,math.pi/2)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.circle) : scale(0.5, 1)(cr,70,70) shape.transform(shape.circle) : scale(0.5, 1)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.cross) : scale(0.5, 1)(cr,70,70) shape.transform(shape.cross) : scale(0.5, 1)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.hexagon) : rotate_at(35,35,math.pi/2)(cr,70,40) shape.transform(shape.hexagon) : rotate_at(35,35,math.pi/2)(cr,70,40)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -10,3 +10,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.infobubble) shape.transform(shape.infobubble)
: rotate_at(35,35,3*math.pi/2) (cr,70,70, nil, nil, 40) : rotate_at(35,35,3*math.pi/2) (cr,70,70, nil, nil, 40)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.isosceles_triangle) : rotate_at(35, 35, math.pi/2)(cr,70,70) shape.transform(shape.isosceles_triangle) : rotate_at(35, 35, math.pi/2)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.losange) : scale(0.5, 1)(cr,70,70) shape.transform(shape.losange) : scale(0.5, 1)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.octogon) : translate(0, 25) (cr,70,20) shape.transform(shape.octogon) : translate(0, 25) (cr,70,20)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.parallelogram) : scale(0.5, 1)(cr,70,70) shape.transform(shape.parallelogram) : scale(0.5, 1)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.partially_rounded_rect(cr, 70, 70, true, true, false, true, 30) shape.partially_rounded_rect(cr, 70, 70, true, true, false, true, 30)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.pie(cr,70,70, 0, 2*math.pi, 10) shape.pie(cr,70,70, 0, 2*math.pi, 10)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.powerline) : translate(0, 25) (cr,70,20, -20) shape.transform(shape.powerline) : translate(0, 25) (cr,70,20, -20)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr, true) --DOC_HIDE
shape.radial_progress(cr, 70, 20, .9) shape.radial_progress(cr, 70, 20, .9)
show(cr, true) --DOC_HIDE show(cr, true) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.rectangle) : scale(0.5, 1)(cr,70,70) shape.transform(shape.rectangle) : scale(0.5, 1)(cr,70,70)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -11,3 +11,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.rectangular_tag) : translate(0, 30) (cr, 70, 10, -10) shape.transform(shape.rectangular_tag) : translate(0, 30) (cr, 70, 10, -10)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.rounded_bar(cr, 70, 20) shape.rounded_bar(cr, 70, 20)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ show(cr) --DOC_HIDE
shape.transform(shape.rounded_rect) : translate(0,25) (cr,70,20, 5) shape.transform(shape.rounded_rect) : translate(0,25) (cr,70,20, 5)
show(cr) --DOC_HIDE show(cr) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -2,3 +2,5 @@ return function() return {
data = {}, data = {},
connect_signal = function() end connect_signal = function() end
} end } end
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -21,4 +21,3 @@ return setmetatable(drawin, {
}) })
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -99,4 +99,3 @@ screen._add_screen {width=320, height=240}
return screen return screen
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -34,4 +34,3 @@ return setmetatable(tag, {
}) })
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -51,3 +51,5 @@ print(o.something)
o.something = "a cow" o.something = "a cow"
print(o.something) print(o.something)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -22,3 +22,5 @@ o:disconnect_signal("my_signal", slot)
-- This time, the `slot` wont be called as it is no longer connected. -- This time, the `slot` wont be called as it is no longer connected.
o:emit_signal "my_signal" o:emit_signal "my_signal"
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -3,3 +3,5 @@ require("_common_template")(...)
-- Execute the test -- Execute the test
loadfile(file_path)() loadfile(file_path)()
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -36,3 +36,5 @@ for _, v in ipairs {"", "#00ff00", "#0000ff"} do
end end
return nil, 60 return nil, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -46,3 +46,5 @@ for _, v in ipairs {0,1,3,6.5} do
end end
return nil, 60 return nil, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -77,3 +77,5 @@ l:add(wibox.widget {
}) })
return nil, 60 return nil, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -79,3 +79,5 @@ parent:add(wibox.widget {
}) })
return 500, 60 return 500, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -33,3 +33,5 @@ for _, v in ipairs {0, math.pi/2, math.pi} do
end end
return nil, 60 return nil, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -37,3 +37,5 @@ for _, v in ipairs {1,3,7,10} do
end end
return nil, 60 return nil, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -26,3 +26,5 @@ for _, v in ipairs {0,1,7,99} do
end end
return nil, 60 return nil, 60
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -25,3 +25,5 @@ parent : setup {
spacing = 10, spacing = 10,
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -30,3 +30,5 @@ parent : setup {
spacing = 10, spacing = 10,
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -25,3 +25,5 @@ parent : setup {
spacing = 10, spacing = 10,
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -38,3 +38,5 @@ parent : setup {
spacing = 10, spacing = 10,
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -43,3 +43,5 @@ return {
}, },
layout = wibox.container.margin layout = wibox.container.margin
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -22,3 +22,5 @@ return {
bg = beautiful.bg_highlight, bg = beautiful.bg_highlight,
widget = wibox.container.background widget = wibox.container.background
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -25,3 +25,5 @@ return {
}, },
layout = wibox.layout.fixed.vertical, layout = wibox.layout.fixed.vertical,
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -52,3 +52,5 @@ return {
expand = "none", expand = "none",
layout = wibox.layout.align.vertical, layout = wibox.layout.align.vertical,
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -17,3 +17,5 @@ return {
reflection = {horizontal = true}, reflection = {horizontal = true},
widget = wibox.container.mirror widget = wibox.container.mirror
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -23,3 +23,5 @@ return {
margins = 5, margins = 5,
layout = wibox.container.margin layout = wibox.container.margin
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -17,3 +17,5 @@ return {
direction = "east", direction = "east",
widget = wibox.container.rotate widget = wibox.container.rotate
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -75,3 +75,4 @@ local f_w, f_h = container:fit({dpi=96}, 9999, 9999)
local img = surface.widget_to_svg(container, image_path..".svg", f_w, f_h) local img = surface.widget_to_svg(container, image_path..".svg", f_w, f_h)
img:finish() img:finish()
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -24,3 +24,5 @@ local l = wibox.layout {
} }
parent:add(l) parent:add(l)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -27,3 +27,5 @@ local l = wibox.layout {
} }
parent:add(l) parent:add(l)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -24,3 +24,5 @@ local l = wibox.layout {
} }
parent:add(l) parent:add(l)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -31,3 +31,5 @@ local l = wibox.layout {
} }
parent:add(l) parent:add(l)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -26,3 +26,5 @@ local l = wibox.layout {
} }
parent:add(l) parent:add(l)
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -60,3 +60,5 @@ parent : setup { --DOC_HIDE
spacing = 10, --DOC_HIDE spacing = 10, --DOC_HIDE
layout = wibox.layout.fixed.horizontal --DOC_HIDE layout = wibox.layout.fixed.horizontal --DOC_HIDE
} --DOC_HIDE } --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ wibox.widget {
generic_widget( "third" ), generic_widget( "third" ),
layout = wibox.layout.align.horizontal layout = wibox.layout.align.horizontal
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ wibox.widget {
generic_widget( "third" ), generic_widget( "third" ),
layout = wibox.layout.fixed.horizontal layout = wibox.layout.fixed.horizontal
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ wibox.widget {
generic_widget( "third" ), generic_widget( "third" ),
layout = wibox.layout.flex.horizontal layout = wibox.layout.flex.horizontal
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -11,3 +11,5 @@ local w = wibox.widget {
w:ajust_ratio(2, 0.44, 0.33, 0.22) w:ajust_ratio(2, 0.44, 0.33, 0.22)
return w --DOC_HIDE return w --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -8,3 +8,5 @@ wibox.widget {
generic_widget( "third" ), generic_widget( "third" ),
layout = wibox.layout.stack layout = wibox.layout.stack
} }
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -101,3 +101,5 @@ end
-- Save to the output file -- Save to the output file
local img = surface["widget_to_svg"](widget, image_path..".svg", w or 200, h or 30) local img = surface["widget_to_svg"](widget, image_path..".svg", w or 200, h or 30)
img:finish() img:finish()
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -13,3 +13,5 @@ parent:add( --DOC_HIDE
} }
) --DOC_HIDE ) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -15,3 +15,5 @@ parent:add( --DOC_HIDE
} }
) --DOC_HIDE ) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -27,3 +27,4 @@ f_w, f_h = f_w+10, f_h+10
local img = surface["widget_to_"..image_type](container, image_path.."."..image_type, w or f_w, h or f_h) local img = surface["widget_to_"..image_type](container, image_path.."."..image_type, w or f_w, h or f_h)
img:finish() img:finish()
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -18,3 +18,5 @@ parent:add( --DOC_HIDE
widget = wibox.widget.checkbox widget = wibox.widget.checkbox
} }
) --DOC_HIDE ) --DOC_HIDE
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

Some files were not shown because too many files have changed in this diff Show More