Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
shdown committed Jan 15, 2021
2 parents f7251ba + be8197a commit cf24e4d
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 34 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ include (GNUInstallDirs)

set (BARLIBS_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/luastatus/barlibs")
set (PLUGINS_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/luastatus/plugins")
set (LUA_PLUGINS_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/luastatus/plugins")

function (luastatus_add_barlib_or_plugin destdir name)
set (sources ${ARGV})
Expand Down
2 changes: 1 addition & 1 deletion barlibs/dwm/dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static bool redraw(LuastatusBarlibData *bd)
)
);
if (err) {
LS_FATALF(bd, "XCB error %d occured", err->error_code);
LS_FATALF(bd, "XCB error %d occurred", err->error_code);
free(err);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9
10
16 changes: 1 addition & 15 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ Source: luastatus
Section: misc
Priority: optional
Maintainer: Viktor Krapivensky <shdownnine@gmail.com>
Standards-Version: 3.9.3
Standards-Version: 4.5.1
Build-Depends:
cmake (>= 3.1.3),
build-essential,
debhelper (>= 7),
valgrind,
liblua5.2-dev,
Expand Down Expand Up @@ -41,7 +40,6 @@ Description: Universal status bar content generator
This package contains the main binary and the following plugins: timer, fs,
inotify, udev, backlight-linux, battery-linux, cpu-usage-linux,
file-contents-linux, mem-usage-linux, pipe.
Homepage: https://github.com/shdown/luastatus

Package: luastatus-barlib-i3
Architecture: any
Expand All @@ -54,7 +52,6 @@ Description: i3 barlib for luastatus
the protocol level. This package also provides luastatus-i3-wrapper script.
.
For more information, see "man 7 luastatus-barlib-i3".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-barlib-dwm
Architecture: any
Expand All @@ -67,7 +64,6 @@ Description: dwm barlib for luastatus
outputs the root window name somewhere.
.
For more information, see "man 7 luastatus-barlib-dwm".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-barlib-lemonbar
Architecture: any
Expand All @@ -79,7 +75,6 @@ Description: lemonbar barlib for luastatus
provides luastatus-lemonbar-launcher script.
.
For more information, see "man 7 luastatus-barlib-lemonbar".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-barlib-stdout
Architecture: any
Expand All @@ -92,7 +87,6 @@ Description: stdout barlib for luastatus
This package also provides luastatus-stdout-wrapper script.
.
For more information, see "man 7 luastatus-barlib-stdout".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-alsa
Architecture: any
Expand All @@ -104,7 +98,6 @@ Description: ALSA plugin for luastatus
mute state of an ALSA channel.
.
For more information, see "man 7 luastatus-plugin-alsa".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-dbus
Architecture: any
Expand All @@ -116,7 +109,6 @@ Description: D-Bus plugin for luastatus
reports D-Bus signals.
.
For more information, see "man 7 luastatus-plugin-dbus".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-mpd
Architecture: any
Expand All @@ -128,7 +120,6 @@ Description: MPD plugin for luastatus
an MPD server.
.
For more information, see "man 7 luastatus-plugin-mpd".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-network-linux
Architecture: any
Expand All @@ -142,7 +133,6 @@ Description: network-linux plugin for luastatus
wireless connection, and speed of an ethernet connection.
.
For more information, see "man 7 luastatus-plugin-network-linux".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-pulse
Architecture: any
Expand All @@ -154,7 +144,6 @@ Description: PulseAudio plugin for luastatus
volume and mute status of a PulseAudio sink.
.
For more information, see "man 7 luastatus-plugin-pulse".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-xkb
Architecture: any
Expand All @@ -167,7 +156,6 @@ Description: XKB plugin for luastatus
Caps Lock and Num Lock.
.
For more information, see "man 7 luastatus-plugin-xkb".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-xtitle
Architecture: any
Expand All @@ -179,7 +167,6 @@ Description: xtitle plugin for luastatus
active window title.
.
For more information, see "man 7 luastatus-plugin-xtitle".
Homepage: https://github.com/shdown/luastatus

Package: luastatus-plugin-imap
Architecture: all
Expand All @@ -193,4 +180,3 @@ Description: IMAP plugin for luastatus
of unread mails in an IMAP mailbox.
.
For more information, see "man 7 luastatus-plugin-imap".
Homepage: https://github.com/shdown/luastatus
6 changes: 5 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ override_dh_auto_configure:
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_LUA_LIBRARY=lua5.2 \
-DBUILD_PLUGIN_PULSE=on \
-DBUILD_PLUGIN_UNIXSOCK=on \
-S .. -B .

override_dh_auto_build:
Expand All @@ -45,7 +46,8 @@ override_dh_auto_install:
cpu-usage-linux \
file-contents-linux \
mem-usage-linux \
pipe; \
pipe \
unixsock; \
do \
$(MAKE) -C $(BUILD_DIR)/plugins/$$x install \
DESTDIR=../../../debian/luastatus; \
Expand All @@ -60,8 +62,10 @@ override_dh_auto_install:
done

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
./tests/misc.sh $(BUILD_DIR)
./tests/torture.sh $(BUILD_DIR)
endif

%:
exec dh $@
7 changes: 4 additions & 3 deletions luastatus/config.in.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ifndef config_h_
#define config_h_

#define LUASTATUS_PLUGINS_DIR "@PLUGINS_DIR@"
#define LUASTATUS_BARLIBS_DIR "@BARLIBS_DIR@"
#define LUASTATUS_VERSION "@luastatus_VERSION@"
#define LUASTATUS_PLUGINS_DIR "@PLUGINS_DIR@"
#define LUASTATUS_LUA_PLUGINS_DIR "@LUA_PLUGINS_DIR@"
#define LUASTATUS_BARLIBS_DIR "@BARLIBS_DIR@"
#define LUASTATUS_VERSION "@luastatus_VERSION@"

#endif
2 changes: 1 addition & 1 deletion luastatus/luastatus.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static int l_require_plugin(lua_State *L)
}
lua_pop(L, 1); // L: ? table

LSString filename = ls_string_newz_from_f("%s/%s.lua", LUASTATUS_PLUGINS_DIR, arg);
LSString filename = ls_string_newz_from_f("%s/%s.lua", LUASTATUS_LUA_PLUGINS_DIR, arg);
int r = luaL_loadfile(L, filename.data);
ls_string_free(filename);
if (r != 0) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/backlight-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES backlight-linux.lua DESTINATION ${PLUGINS_DIR})
install (FILES backlight-linux.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-backlight-linux 7)
2 changes: 1 addition & 1 deletion plugins/battery-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES battery-linux.lua DESTINATION ${PLUGINS_DIR})
install (FILES battery-linux.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-battery-linux 7)
2 changes: 1 addition & 1 deletion plugins/cpu-usage-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES cpu-usage-linux.lua DESTINATION ${PLUGINS_DIR})
install (FILES cpu-usage-linux.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-cpu-usage-linux 7)
2 changes: 1 addition & 1 deletion plugins/file-contents-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES file-contents-linux.lua DESTINATION ${PLUGINS_DIR})
install (FILES file-contents-linux.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-file-contents-linux 7)
2 changes: 1 addition & 1 deletion plugins/imap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES imap.lua DESTINATION ${PLUGINS_DIR})
install (FILES imap.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-imap 7)
2 changes: 1 addition & 1 deletion plugins/inotify/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Options
* ``timeout``: number

If specified and not negative, this plugin calls ``cb`` with ``what="timeout"`` if no event has
occured in ``timeout`` seconds.
occurred in ``timeout`` seconds.

``cb`` argument
===============
Expand Down
2 changes: 1 addition & 1 deletion plugins/mem-usage-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES mem-usage-linux.lua DESTINATION ${PLUGINS_DIR})
install (FILES mem-usage-linux.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-mem-usage-linux 7)
2 changes: 1 addition & 1 deletion plugins/pipe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install (FILES pipe.lua DESTINATION ${PLUGINS_DIR})
install (FILES pipe.lua DESTINATION ${LUA_PLUGINS_DIR})

luastatus_add_man_page (README.rst luastatus-plugin-pipe 7)
2 changes: 1 addition & 1 deletion plugins/timer/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The following options are supported:

``cb`` argument
===============
A string decribing why the function is called:
A string describing why the function is called:

* if it is ``"hello"``, the function is called for the first time;

Expand Down
4 changes: 2 additions & 2 deletions plugins/udev/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following options are supported:
* ``timeout``: number

If specified and not negative, this plugin calls ``cb`` with ``what="timeout"`` if no event has
occured in ``timeout`` seconds.
occurred in ``timeout`` seconds.

``cb`` argument
===============
Expand All @@ -52,7 +52,7 @@ A table with ``what`` entry:
* if it is ``"timeout"``, the function has not been called for the number of seconds specified as
the ``timeout`` option;

* if it is ``"event"``, a udev event has occured; in this case, the table has the following
* if it is ``"event"``, a udev event has occurred; in this case, the table has the following
additional entries (all are optional strings):

- ``syspath``;
Expand Down
2 changes: 1 addition & 1 deletion plugins/unixsock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ configure_file ("probes.in.h" "probes.generated.h")

target_compile_definitions (plugin-unixsock PUBLIC -D_POSIX_C_SOURCE=200809L)
luastatus_target_compile_with (plugin-unixsock LUA)
target_include_directories (plugin-unixsock PUBLIC "${PROJECT_SOURCE_DIR}")
target_include_directories (plugin-unixsock PUBLIC "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")

luastatus_add_man_page (README.rst luastatus-plugin-unixsock 7)

0 comments on commit cf24e4d

Please sign in to comment.