From 497d1db5426c0f0f5332a177f8e7260e36abf0b8 Mon Sep 17 00:00:00 2001 From: Bart Trojanowski Date: Sat, 28 Mar 2009 20:54:51 -0400 Subject: [PATCH] moved source files to src directory --- Makefile | 243 +++++++--------------- Makefile.check | 20 ++ Makefile => src/Makefile | 64 +----- {core => src/core}/history.lua | 0 {core => src/core}/wmii.lua | 0 install-wmiirc-lua => src/install-wmiirc-lua | 0 {luaeventloop => src/luaeventloop}/.gitignore | 0 {luaeventloop => src/luaeventloop}/Makefile | 4 +- {luaeventloop => src/luaeventloop}/lel_debug.c | 0 {luaeventloop => src/luaeventloop}/lel_debug.h | 0 {luaeventloop => src/luaeventloop}/lel_instance.c | 0 {luaeventloop => src/luaeventloop}/lel_instance.h | 0 {luaeventloop => src/luaeventloop}/lel_main.c | 0 {luaeventloop => src/luaeventloop}/lel_util.c | 0 {luaeventloop => src/luaeventloop}/lel_util.h | 0 {luaeventloop => src/luaeventloop}/test.lua | 0 {luaixp => src/luaixp}/.gitignore | 0 {luaixp => src/luaixp}/Makefile | 4 +- {luaixp => src/luaixp}/lixp_debug.c | 0 {luaixp => src/luaixp}/lixp_debug.h | 0 {luaixp => src/luaixp}/lixp_instance.c | 0 {luaixp => src/luaixp}/lixp_instance.h | 0 {luaixp => src/luaixp}/lixp_main.c | 0 {luaixp => src/luaixp}/lixp_util.c | 0 {luaixp => src/luaixp}/lixp_util.h | 0 {luaixp => src/luaixp}/test.lua | 0 {plugins => src/plugins}/battery.lua | 0 {plugins => src/plugins}/browser.lua | 0 {plugins => src/plugins}/clock.lua | 0 {plugins => src/plugins}/cpu.lua | 0 {plugins => src/plugins}/loadavg.lua | 0 {plugins => src/plugins}/messages.lua | 0 {plugins => src/plugins}/mpd.lua | 0 {plugins => src/plugins}/network.lua | 0 {plugins => src/plugins}/ssh.lua | 0 {plugins => src/plugins}/volume.lua | 0 wmii-lua => src/wmii-lua | 0 wmii-lua.desktop => src/wmii-lua.desktop | 0 wmiirc.lua => src/wmiirc.lua | 0 test.lua | 46 ---- 40 files changed, 114 insertions(+), 267 deletions(-) rewrite Makefile (74%) create mode 100644 Makefile.check copy Makefile => src/Makefile (60%) rename {core => src/core}/history.lua (100%) rename {core => src/core}/wmii.lua (100%) rename install-wmiirc-lua => src/install-wmiirc-lua (100%) rename {luaeventloop => src/luaeventloop}/.gitignore (100%) rename {luaeventloop => src/luaeventloop}/Makefile (89%) rename {luaeventloop => src/luaeventloop}/lel_debug.c (100%) rename {luaeventloop => src/luaeventloop}/lel_debug.h (100%) rename {luaeventloop => src/luaeventloop}/lel_instance.c (100%) rename {luaeventloop => src/luaeventloop}/lel_instance.h (100%) rename {luaeventloop => src/luaeventloop}/lel_main.c (100%) rename {luaeventloop => src/luaeventloop}/lel_util.c (100%) rename {luaeventloop => src/luaeventloop}/lel_util.h (100%) rename {luaeventloop => src/luaeventloop}/test.lua (100%) rename {luaixp => src/luaixp}/.gitignore (100%) rename {luaixp => src/luaixp}/Makefile (89%) rename {luaixp => src/luaixp}/lixp_debug.c (100%) rename {luaixp => src/luaixp}/lixp_debug.h (100%) rename {luaixp => src/luaixp}/lixp_instance.c (100%) rename {luaixp => src/luaixp}/lixp_instance.h (100%) rename {luaixp => src/luaixp}/lixp_main.c (100%) rename {luaixp => src/luaixp}/lixp_util.c (100%) rename {luaixp => src/luaixp}/lixp_util.h (100%) rename {luaixp => src/luaixp}/test.lua (100%) rename {plugins => src/plugins}/battery.lua (100%) rename {plugins => src/plugins}/browser.lua (100%) rename {plugins => src/plugins}/clock.lua (100%) rename {plugins => src/plugins}/cpu.lua (100%) rename {plugins => src/plugins}/loadavg.lua (100%) rename {plugins => src/plugins}/messages.lua (100%) rename {plugins => src/plugins}/mpd.lua (100%) rename {plugins => src/plugins}/network.lua (100%) rename {plugins => src/plugins}/ssh.lua (100%) rename {plugins => src/plugins}/volume.lua (100%) rename wmii-lua => src/wmii-lua (100%) rename wmii-lua.desktop => src/wmii-lua.desktop (100%) rename wmiirc.lua => src/wmiirc.lua (100%) delete mode 100755 test.lua diff --git a/Makefile b/Makefile dissimilarity index 74% index 64ea18d..b4115ef 100644 --- a/Makefile +++ b/Makefile @@ -1,166 +1,77 @@ -include config.mk - -MAN = wmii.3lua - - -# ------------------------------------------------------------------------ -# main target - -.PHONY: all help deb debi libs luaixp luaeventloop docs man clean distclean tags install install-user install-variable-check install-user-variable-check -all: libs man - -help: - @echo "make [target]" - @echo - @echo " general targets" - @echo " all - build everything" - @echo " libs - build libraries" - @echo " docs - build documentation" - @echo " clean - clean up build" - @echo " distclean - clean even more" - @echo " install - install in system dir" - @echo " install-user - install in user home dir" - @echo - @echo " development targets" - @echo " tags - build ctags index" - @echo " cscope - build cscope index" - @echo - @echo " Debian targets" - @echo " deb - build the .deb" - @echo " debi - install the deb" - -deb: - debuild - -debi: deb - sudo debi - -config.mk: config.mk.dist - if test -f $@ ; then \ - touch $@ ; \ - else \ - cp $< $@ ; \ - fi - -# ------------------------------------------------------------------------ -# building - -libs: luaeventloop luaixp -luaeventloop luaixp: - ${MAKE} -C $@ - -docs: man -man: ${MAN} -${MAN}: core/wmii.lua - ${POD2MAN} \ - --name=wmii \ - --center="WMII Lua Integration" \ - --section=3lua \ - --release="wmii 3.6" \ - $< $@ - -# ------------------------------------------------------------------------ -# cleaning - -clean: - -rm -f *~ */*~ - -rm -f wmii.3lua - -rm -f cscope.files cscope.out tags - -${MAKE} -C luaixp clean - -${MAKE} -C luaeventloop clean - -distclean: clean - -rm -f config.mk - -# ------------------------------------------------------------------------ -# installing - -# -# install system wide -# -install: ${MAN} install-variable-check - # create directories - ${INSTALL} -d ${ALL_INSTALL_DIRS} - # - # install libraries - ${MAKE} -C luaixp install - ${MAKE} -C luaeventloop install - # - # install core and plugin lua scripts - ${INSTALL} -m 0644 -t ${CORE_LUA_DIR} core/*.lua - ${INSTALL} -m 0644 -t ${PLUGIN_LUA_DIR} plugins/*.lua - # - # install new config file - ${INSTALL} -m 0755 -t ${RC_DIR} wmiirc.lua - ${INSTALL} -m 0644 -t ${XS_DIR} wmii-lua.desktop - # - # install man page - ${INSTALL} -m 0644 -t ${MAN_DIR} ${MAN} - # - # install scripts - ${INSTALL} -m 0755 -t ${BIN_DIR} install-wmiirc-lua - ${INSTALL} -m 0755 -t ${BIN_DIR} wmii-lua - -install-variable-check: - $(if ${ALL_INSTALL_DIRS},,$(error ALL_INSTALL_DIRS variable is empty; check config.mk)) - $(if ${CORE_LUA_DIR},, $(error CORE_LUA_DIR variable is empty; check config.mk)) - $(if ${PLUGIN_LUA_DIR},, $(error PLUGIN_LUA_DIR variable is empty; check config.mk)) - $(if ${RC_DIR},, $(error RC_DIR variable is empty; check config.mk)) - $(if ${XS_DIR},, $(error XS_DIR variable is empty; check config.mk)) - $(if ${MAN_DIR},, $(error MAN_DIR variable is empty; check config.mk)) - $(if ${BIN_DIR},, $(error BIN_DIR variable is empty; check config.mk)) - @echo Config vars OK. - -# -# install in user directory -# -install-user: install-user-variable-check -ifeq ($(shell pwd),$(wildcard ~/.wmii-3.5)) - @echo "You're already in the ~/.wmii-3.5/ directory" -else - ${INSTALL} -d ${ALL_HOME_DIRS} - @if test -f ${HOME_WMII}/wmiirc ; then \ - echo "NOTE: you might want to look at ${HOME_WMII}/wmiirc.dist" ; \ - ${INSTALL} -T -m 0744 -b wmiirc.lua ${HOME_WMII}/wmiirc.dist ; \ - else \ - echo "Installing new ${HOME_WMII}/wmiirc" ; \ - ${INSTALL} -T -m 0744 -b wmiirc.lua ${HOME_WMII}/wmiirc ; \ - fi - ${INSTALL} -m 0644 -b -t ${HOME_CORE} core/*.lua - ${INSTALL} -m 0644 -b -t ${HOME_PLUGINS} plugins/*.lua - ${INSTALL} -m 0644 -b -t ${HOME_WMII} ${MAN} - ${INSTALL} -m 0744 -t ${HOME_BIN_DIR} wmii-lua - ${MAKE} -C luaixp install-user - ${MAKE} -C luaeventloop install-user - -install-user: ${MAN} -endif - -install-user-variable-check: - $(if ${ALL_HOME_DIRS},,$(error ALL_HOME_DIRS variable is empty; check config.mk)) - $(if ${HOME_WMII},, $(error HOME_WMII variable is empty; check config.mk)) - $(if ${HOME_CORE},, $(error HOME_CORE variable is empty; check config.mk)) - $(if ${HOME_PLUGINS},, $(error HOME_PLUGINS variable is empty; check config.mk)) - $(if ${HOME_WMII},, $(error HOME_WMII variable is empty; check config.mk)) - $(if ${HOME_BIN_DIR},, $(error HOME_BIN_DIR variable is empty; check config.mk)) - @echo Config vars OK. - -.PHONY: xxx -xxx: - ${MAKE} all - sudo ${MAKE} install PREFIX=/usr - - -# ------------------------------------------------------------------------ -# tags and cscope - -cscope.files:: - find . -name '*.[ch]' -o -name '*.lua' | grep -v -e CVS -e SCCS > cscope.files - -cscope.out: cscope.files - -cscope -P`pwd` -b - -tags: cscope.out - rm -f tags - xargs -n 50 ctags -a < cscope.files - +# ------------------------------------------------------------------------ +# default target + +.PHONY: default +default: all + +# ------------------------------------------------------------------------ +# includes and defines + +include config.mk +include Makefile.check + +# ------------------------------------------------------------------------ +# main targets + +.PHONY: all help docs clean distclean tags + +all clean distclean docs install install-user: + ${MAKE} -C src $@ + +help: + @echo "make [target]" + @echo + @echo " general targets" + @echo " all - build everything" + @echo " docs - build documentation" + @echo " clean - clean up build" + @echo " distclean - clean even more" + @echo " install - install in system dir" + @echo " install-user - install in user home dir" + @echo + @echo " development targets" + @echo " tags - build ctags/cscope index" + +config.mk: config.mk.dist + if test -f $@ ; then \ + touch $@ ; \ + else \ + cp $< $@ ; \ + fi + +# ------------------------------------------------------------------------ +# local dependencies for main rules + +.PHONY: lcl-clean lcl-distclean + +clean: lcl-clean +lcl-clean: + -rm -f *~ */*~ + -rm -f cscope.files cscope.out tags + +distclean: lcl-distclean +lcl-distclean: clean + -rm -f config.mk + +.PHONY: + +install: install-variable-check + +install-user: install-user-variable-check + +# ------------------------------------------------------------------------ +# tags and cscope + +.PHONY: cscope tags + +cscope.files:: + find . -name '*.[ch]' -o -name '*.lua' | grep -v -e CVS -e SCCS > cscope.files + +cscope: cscope.out +cscope.out: cscope.files + -cscope -P`pwd` -b + +tags: cscope.out + rm -f tags + xargs -n 50 ctags -a < cscope.files + diff --git a/Makefile.check b/Makefile.check new file mode 100644 index 0000000..2bdaa22 --- /dev/null +++ b/Makefile.check @@ -0,0 +1,20 @@ +.PHONY: install-variable-check install-user-variable-check + +install-variable-check: + $(if ${ALL_INSTALL_DIRS},,$(error ALL_INSTALL_DIRS variable is empty; check config.mk)) + $(if ${CORE_LUA_DIR},, $(error CORE_LUA_DIR variable is empty; check config.mk)) + $(if ${PLUGIN_LUA_DIR},, $(error PLUGIN_LUA_DIR variable is empty; check config.mk)) + $(if ${RC_DIR},, $(error RC_DIR variable is empty; check config.mk)) + $(if ${XS_DIR},, $(error XS_DIR variable is empty; check config.mk)) + $(if ${MAN_DIR},, $(error MAN_DIR variable is empty; check config.mk)) + $(if ${BIN_DIR},, $(error BIN_DIR variable is empty; check config.mk)) + @echo Config vars OK. + +install-user-variable-check: + $(if ${ALL_HOME_DIRS},,$(error ALL_HOME_DIRS variable is empty; check config.mk)) + $(if ${HOME_WMII},, $(error HOME_WMII variable is empty; check config.mk)) + $(if ${HOME_CORE},, $(error HOME_CORE variable is empty; check config.mk)) + $(if ${HOME_PLUGINS},, $(error HOME_PLUGINS variable is empty; check config.mk)) + $(if ${HOME_WMII},, $(error HOME_WMII variable is empty; check config.mk)) + $(if ${HOME_BIN_DIR},, $(error HOME_BIN_DIR variable is empty; check config.mk)) + @echo Config vars OK. diff --git a/Makefile b/src/Makefile similarity index 60% copy from Makefile copy to src/Makefile index 64ea18d..7d9d149 100644 --- a/Makefile +++ b/src/Makefile @@ -1,12 +1,14 @@ -include config.mk +TOP = .. +CONFIG_MK = ${TOP}/config.mk -MAN = wmii.3lua +include ${CONFIG_MK} +MAN = wmii.3lua # ------------------------------------------------------------------------ # main target -.PHONY: all help deb debi libs luaixp luaeventloop docs man clean distclean tags install install-user install-variable-check install-user-variable-check +.PHONY: all help libs luaixp luaeventloop docs man clean distclean install install-user all: libs man help: @@ -24,23 +26,6 @@ help: @echo " development targets" @echo " tags - build ctags index" @echo " cscope - build cscope index" - @echo - @echo " Debian targets" - @echo " deb - build the .deb" - @echo " debi - install the deb" - -deb: - debuild - -debi: deb - sudo debi - -config.mk: config.mk.dist - if test -f $@ ; then \ - touch $@ ; \ - else \ - cp $< $@ ; \ - fi # ------------------------------------------------------------------------ # building @@ -70,7 +55,6 @@ clean: -${MAKE} -C luaeventloop clean distclean: clean - -rm -f config.mk # ------------------------------------------------------------------------ # installing @@ -101,16 +85,6 @@ install: ${MAN} install-variable-check ${INSTALL} -m 0755 -t ${BIN_DIR} install-wmiirc-lua ${INSTALL} -m 0755 -t ${BIN_DIR} wmii-lua -install-variable-check: - $(if ${ALL_INSTALL_DIRS},,$(error ALL_INSTALL_DIRS variable is empty; check config.mk)) - $(if ${CORE_LUA_DIR},, $(error CORE_LUA_DIR variable is empty; check config.mk)) - $(if ${PLUGIN_LUA_DIR},, $(error PLUGIN_LUA_DIR variable is empty; check config.mk)) - $(if ${RC_DIR},, $(error RC_DIR variable is empty; check config.mk)) - $(if ${XS_DIR},, $(error XS_DIR variable is empty; check config.mk)) - $(if ${MAN_DIR},, $(error MAN_DIR variable is empty; check config.mk)) - $(if ${BIN_DIR},, $(error BIN_DIR variable is empty; check config.mk)) - @echo Config vars OK. - # # install in user directory # @@ -136,31 +110,15 @@ else install-user: ${MAN} endif -install-user-variable-check: - $(if ${ALL_HOME_DIRS},,$(error ALL_HOME_DIRS variable is empty; check config.mk)) - $(if ${HOME_WMII},, $(error HOME_WMII variable is empty; check config.mk)) - $(if ${HOME_CORE},, $(error HOME_CORE variable is empty; check config.mk)) - $(if ${HOME_PLUGINS},, $(error HOME_PLUGINS variable is empty; check config.mk)) - $(if ${HOME_WMII},, $(error HOME_WMII variable is empty; check config.mk)) - $(if ${HOME_BIN_DIR},, $(error HOME_BIN_DIR variable is empty; check config.mk)) - @echo Config vars OK. - -.PHONY: xxx -xxx: - ${MAKE} all - sudo ${MAKE} install PREFIX=/usr - # ------------------------------------------------------------------------ -# tags and cscope +# helpers from ${TOP} dir -cscope.files:: - find . -name '*.[ch]' -o -name '*.lua' | grep -v -e CVS -e SCCS > cscope.files +.PHONY: install-variable-check install-user-variable-check tags cscope -cscope.out: cscope.files - -cscope -P`pwd` -b +${CONFIG_MK}: + ${MAKE} -C $(dir ${CONFIG_MK}) $(notdir ${CONFIG_MK}) -tags: cscope.out - rm -f tags - xargs -n 50 ctags -a < cscope.files +install-variable-check install-user-variable-check tags cscope: + ${MAKE} -C ${TOP} $@ diff --git a/core/history.lua b/src/core/history.lua similarity index 100% rename from core/history.lua rename to src/core/history.lua diff --git a/core/wmii.lua b/src/core/wmii.lua similarity index 100% rename from core/wmii.lua rename to src/core/wmii.lua diff --git a/install-wmiirc-lua b/src/install-wmiirc-lua similarity index 100% rename from install-wmiirc-lua rename to src/install-wmiirc-lua diff --git a/luaeventloop/.gitignore b/src/luaeventloop/.gitignore similarity index 100% rename from luaeventloop/.gitignore rename to src/luaeventloop/.gitignore diff --git a/luaeventloop/Makefile b/src/luaeventloop/Makefile similarity index 89% rename from luaeventloop/Makefile rename to src/luaeventloop/Makefile index c1f4031..5aa59cf 100644 --- a/luaeventloop/Makefile +++ b/src/luaeventloop/Makefile @@ -1,4 +1,6 @@ -include ../config.mk +TOP = ../.. +CONFIG_MK = ${TOP}/config.mk +include ${CONFIG_MK} SRCS = lel_main.c lel_debug.c lel_util.c lel_instance.c OBJS = $(SRCS:.c=.o) diff --git a/luaeventloop/lel_debug.c b/src/luaeventloop/lel_debug.c similarity index 100% rename from luaeventloop/lel_debug.c rename to src/luaeventloop/lel_debug.c diff --git a/luaeventloop/lel_debug.h b/src/luaeventloop/lel_debug.h similarity index 100% rename from luaeventloop/lel_debug.h rename to src/luaeventloop/lel_debug.h diff --git a/luaeventloop/lel_instance.c b/src/luaeventloop/lel_instance.c similarity index 100% rename from luaeventloop/lel_instance.c rename to src/luaeventloop/lel_instance.c diff --git a/luaeventloop/lel_instance.h b/src/luaeventloop/lel_instance.h similarity index 100% rename from luaeventloop/lel_instance.h rename to src/luaeventloop/lel_instance.h diff --git a/luaeventloop/lel_main.c b/src/luaeventloop/lel_main.c similarity index 100% rename from luaeventloop/lel_main.c rename to src/luaeventloop/lel_main.c diff --git a/luaeventloop/lel_util.c b/src/luaeventloop/lel_util.c similarity index 100% rename from luaeventloop/lel_util.c rename to src/luaeventloop/lel_util.c diff --git a/luaeventloop/lel_util.h b/src/luaeventloop/lel_util.h similarity index 100% rename from luaeventloop/lel_util.h rename to src/luaeventloop/lel_util.h diff --git a/luaeventloop/test.lua b/src/luaeventloop/test.lua similarity index 100% rename from luaeventloop/test.lua rename to src/luaeventloop/test.lua diff --git a/luaixp/.gitignore b/src/luaixp/.gitignore similarity index 100% rename from luaixp/.gitignore rename to src/luaixp/.gitignore diff --git a/luaixp/Makefile b/src/luaixp/Makefile similarity index 89% rename from luaixp/Makefile rename to src/luaixp/Makefile index 1438090..9004fd5 100644 --- a/luaixp/Makefile +++ b/src/luaixp/Makefile @@ -1,4 +1,6 @@ -include ../config.mk +TOP = ../.. +CONFIG_MK = ${TOP}/config.mk +include ${CONFIG_MK} SRCS = lixp_main.c lixp_debug.c lixp_util.c lixp_instance.c OBJS = $(SRCS:.c=.o) diff --git a/luaixp/lixp_debug.c b/src/luaixp/lixp_debug.c similarity index 100% rename from luaixp/lixp_debug.c rename to src/luaixp/lixp_debug.c diff --git a/luaixp/lixp_debug.h b/src/luaixp/lixp_debug.h similarity index 100% rename from luaixp/lixp_debug.h rename to src/luaixp/lixp_debug.h diff --git a/luaixp/lixp_instance.c b/src/luaixp/lixp_instance.c similarity index 100% rename from luaixp/lixp_instance.c rename to src/luaixp/lixp_instance.c diff --git a/luaixp/lixp_instance.h b/src/luaixp/lixp_instance.h similarity index 100% rename from luaixp/lixp_instance.h rename to src/luaixp/lixp_instance.h diff --git a/luaixp/lixp_main.c b/src/luaixp/lixp_main.c similarity index 100% rename from luaixp/lixp_main.c rename to src/luaixp/lixp_main.c diff --git a/luaixp/lixp_util.c b/src/luaixp/lixp_util.c similarity index 100% rename from luaixp/lixp_util.c rename to src/luaixp/lixp_util.c diff --git a/luaixp/lixp_util.h b/src/luaixp/lixp_util.h similarity index 100% rename from luaixp/lixp_util.h rename to src/luaixp/lixp_util.h diff --git a/luaixp/test.lua b/src/luaixp/test.lua similarity index 100% rename from luaixp/test.lua rename to src/luaixp/test.lua diff --git a/plugins/battery.lua b/src/plugins/battery.lua similarity index 100% rename from plugins/battery.lua rename to src/plugins/battery.lua diff --git a/plugins/browser.lua b/src/plugins/browser.lua similarity index 100% rename from plugins/browser.lua rename to src/plugins/browser.lua diff --git a/plugins/clock.lua b/src/plugins/clock.lua similarity index 100% rename from plugins/clock.lua rename to src/plugins/clock.lua diff --git a/plugins/cpu.lua b/src/plugins/cpu.lua similarity index 100% rename from plugins/cpu.lua rename to src/plugins/cpu.lua diff --git a/plugins/loadavg.lua b/src/plugins/loadavg.lua similarity index 100% rename from plugins/loadavg.lua rename to src/plugins/loadavg.lua diff --git a/plugins/messages.lua b/src/plugins/messages.lua similarity index 100% rename from plugins/messages.lua rename to src/plugins/messages.lua diff --git a/plugins/mpd.lua b/src/plugins/mpd.lua similarity index 100% rename from plugins/mpd.lua rename to src/plugins/mpd.lua diff --git a/plugins/network.lua b/src/plugins/network.lua similarity index 100% rename from plugins/network.lua rename to src/plugins/network.lua diff --git a/plugins/ssh.lua b/src/plugins/ssh.lua similarity index 100% rename from plugins/ssh.lua rename to src/plugins/ssh.lua diff --git a/plugins/volume.lua b/src/plugins/volume.lua similarity index 100% rename from plugins/volume.lua rename to src/plugins/volume.lua diff --git a/wmii-lua b/src/wmii-lua similarity index 100% rename from wmii-lua rename to src/wmii-lua diff --git a/wmii-lua.desktop b/src/wmii-lua.desktop similarity index 100% rename from wmii-lua.desktop rename to src/wmii-lua.desktop diff --git a/wmiirc.lua b/src/wmiirc.lua similarity index 100% rename from wmiirc.lua rename to src/wmiirc.lua diff --git a/test.lua b/test.lua deleted file mode 100755 index 8ab3a8f..0000000 --- a/test.lua +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env lua - -require "wmii" - -wmii.write ("/lbar/1", '#FF0000 #00FF00 #0000FF xxx') - -foo = wmii.read ("/lbar/1") -print ("read /lbar/1 ::\n" .. foo .. "\n") - -print ("ls / ::") -for foo in wmii.ls ("/") do - print (" ", foo) -end -print ("") - -print ("ls -l /lbar ::") -for foo in wmii.ls ("/lbar", "-l") do - print (" ", foo) -end -print ("") - -print ("switch view left...") -wmii.setview(1) -posix.sleep(1) -print ("switch view right...") -wmii.setview(-1) -posix.sleep(1) -print ("") - -print ("toggle view...") -wmii.toggleview() -posix.sleep(1) -print ("toggle view...") -wmii.toggleview() -print ("") - ---[[ -print ("read some events...\n") -for x in wmii.iread("/event") do - print ("ev: " .. x .. "\n") -end -for x,y in wmii.ievents() do - print ("ev: " .. x .. " - " .. y) -end -]]-- - -- 2.11.4.GIT