mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-12 11:04:10 +00:00
Add an above-all overlay mode for own_window_type
, utility
(#1402)
* Add libXdamage to flake.nix * Add TYPE_UTILITY as above-all alternative to TYPE_OVERRIDE * Click-through for TYPE_UTILITY * Added libxfixes to MacOS CI workflow * Disable building of XFIXES on MacOS * Fix build for xinerama/xfixes on macos. * Update Lua version check. * Tidy this up. * Fix BUILD_XFIXES on Linux * Sigh, fix this. --------- Co-authored-by: tranquillity-codes <dev@itycodes.org> Co-authored-by: Brenden Matthews <brenden@brndn.io>
This commit is contained in:
parent
e05de075af
commit
4b8d5eb34a
15
.github/workflows/build-and-test-macos.yaml
vendored
15
.github/workflows/build-and-test-macos.yaml
vendored
@ -30,20 +30,19 @@ jobs:
|
||||
librsvg \
|
||||
libxft \
|
||||
libxinerama \
|
||||
libxfixes \
|
||||
lua \
|
||||
ninja \
|
||||
pkg-config
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- run: mkdir build
|
||||
- name: Configure with CMake
|
||||
run: |
|
||||
set -x
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja \
|
||||
-DMAINTAINER_MODE=ON \
|
||||
-DBUILD_WAYLAND=OFF \
|
||||
-DBUILD_TESTS=ON
|
||||
working-directory: build
|
||||
run: cmake .. -G Ninja \
|
||||
-DMAINTAINER_MODE=ON \
|
||||
-DBUILD_WAYLAND=OFF \
|
||||
-DBUILD_TESTS=ON
|
||||
- name: Compile
|
||||
run: cmake --build build
|
||||
- name: Test
|
||||
|
@ -160,8 +160,10 @@ if(BUILD_X11)
|
||||
# Mac Fix
|
||||
if(OS_DARWIN)
|
||||
option(BUILD_XDAMAGE "Build Xdamage support" false)
|
||||
option(BUILD_XFIXES "Build Xfixes support" false)
|
||||
else(OS_DARWIN)
|
||||
option(BUILD_XDAMAGE "Build Xdamage support" true)
|
||||
option(BUILD_XFIXES "Build Xfixes support" true)
|
||||
endif(OS_DARWIN)
|
||||
|
||||
option(BUILD_XINERAMA "Build Xinerama support" true)
|
||||
@ -173,6 +175,7 @@ if(BUILD_X11)
|
||||
else(BUILD_X11)
|
||||
set(OWN_WINDOW false CACHE BOOL "Enable own_window support" FORCE)
|
||||
set(BUILD_XDAMAGE false CACHE BOOL "Build Xdamage support" FORCE)
|
||||
set(BUILD_XFIXES false CACHE BOOL "Build Xfixes support" FORCE)
|
||||
set(BUILD_XINERAMA false CACHE BOOL "Build Xinerama support" FORCE)
|
||||
set(BUILD_XDBE false CACHE BOOL "Build Xdbe (double-buffer) support" FORCE)
|
||||
set(BUILD_XFT false CACHE BOOL "Build Xft (freetype fonts) support" FORCE)
|
||||
|
@ -42,6 +42,7 @@ else(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
|
||||
ac_search_libs(clock_gettime "time.h" CLOCK_GETTIME_LIB "rt")
|
||||
|
||||
if(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
message(FATAL_ERROR "clock_gettime not found.")
|
||||
@ -49,6 +50,7 @@ if(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||
else(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||
set(HAVE_CLOCK_GETTIME 1)
|
||||
endif(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||
|
||||
set(conky_libs ${conky_libs} ${CLOCK_GETTIME_LIB})
|
||||
|
||||
# standard path to search for includes
|
||||
@ -62,6 +64,7 @@ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set(OS_FREEBSD true)
|
||||
set(conky_libs ${conky_libs} -lkvm -ldevstat -lintl -linotify)
|
||||
|
||||
if(BUILD_IRC)
|
||||
set(conky_libs ${conky_libs} -lssl -lcrypto)
|
||||
endif(BUILD_IRC)
|
||||
@ -95,36 +98,36 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
|
||||
if(NOT OS_LINUX
|
||||
AND NOT OS_FREEBSD
|
||||
AND NOT OS_OPENBSD
|
||||
AND NOT OS_DRAGONFLY
|
||||
AND NOT OS_SOLARIS
|
||||
AND NOT OS_HAIKU
|
||||
AND NOT OS_DARWIN)
|
||||
AND NOT OS_FREEBSD
|
||||
AND NOT OS_OPENBSD
|
||||
AND NOT OS_DRAGONFLY
|
||||
AND NOT OS_SOLARIS
|
||||
AND NOT OS_HAIKU
|
||||
AND NOT OS_DARWIN)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Your platform, '${CMAKE_SYSTEM_NAME}', is not currently supported. Patches are welcome."
|
||||
)
|
||||
"Your platform, '${CMAKE_SYSTEM_NAME}', is not currently supported. Patches are welcome."
|
||||
)
|
||||
endif(NOT
|
||||
OS_LINUX
|
||||
AND
|
||||
NOT
|
||||
OS_FREEBSD
|
||||
AND
|
||||
NOT
|
||||
OS_OPENBSD
|
||||
AND
|
||||
NOT
|
||||
OS_DRAGONFLY
|
||||
AND
|
||||
NOT
|
||||
OS_SOLARIS
|
||||
AND
|
||||
NOT
|
||||
OS_HAIKU
|
||||
AND
|
||||
NOT
|
||||
OS_DARWIN)
|
||||
OS_LINUX
|
||||
AND
|
||||
NOT
|
||||
OS_FREEBSD
|
||||
AND
|
||||
NOT
|
||||
OS_OPENBSD
|
||||
AND
|
||||
NOT
|
||||
OS_DRAGONFLY
|
||||
AND
|
||||
NOT
|
||||
OS_SOLARIS
|
||||
AND
|
||||
NOT
|
||||
OS_HAIKU
|
||||
AND
|
||||
NOT
|
||||
OS_DARWIN)
|
||||
|
||||
# Check for soundcard header
|
||||
if(OS_LINUX)
|
||||
@ -143,21 +146,23 @@ endif(BUILD_I18N AND OS_DRAGONFLY)
|
||||
|
||||
if(BUILD_I18N AND OS_DARWIN)
|
||||
find_path(LIBINTL_H_N libintl.h
|
||||
PATHS /usr/local/opt/gettext/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/local/opt/include)
|
||||
PATHS /usr/local/opt/gettext/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/local/opt/include)
|
||||
|
||||
if(LIBINTL_H_N)
|
||||
include_directories(${LIBINTL_H_N})
|
||||
else(LIBINTL_H_N)
|
||||
message(FATAL_ERROR "Unable to find libintl.h (try `brew install gettext`)")
|
||||
endif(LIBINTL_H_N)
|
||||
|
||||
find_library(INTL_LIB
|
||||
NAMES intl
|
||||
PATHS /usr/local/opt/gettext/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/local/opt/lib)
|
||||
NAMES intl
|
||||
PATHS /usr/local/opt/gettext/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/local/opt/lib)
|
||||
set(conky_libs ${conky_libs} ${INTL_LIB})
|
||||
endif(BUILD_I18N AND OS_DARWIN)
|
||||
|
||||
@ -183,28 +188,34 @@ endif(BUILD_MATH)
|
||||
|
||||
if(BUILD_ICAL)
|
||||
check_include_files(libical/ical.h ICAL_H_)
|
||||
|
||||
if(NOT ICAL_H_)
|
||||
message(FATAL_ERROR "Unable to find libical")
|
||||
endif(NOT ICAL_H_)
|
||||
|
||||
set(conky_libs ${conky_libs} -lical)
|
||||
endif(BUILD_ICAL)
|
||||
|
||||
if(BUILD_IRC)
|
||||
find_path(IRC_H_N libircclient.h PATHS /usr/include/libircclient)
|
||||
find_path(IRC_H_S libircclient.h PATHS /usr/include)
|
||||
|
||||
if(IRC_H_N)
|
||||
include_directories(${IRC_H_N})
|
||||
endif(IRC_H_N)
|
||||
|
||||
if(IRC_H_N OR IRC_H_S)
|
||||
set(IRC_H_ true)
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to find libircclient")
|
||||
endif(IRC_H_N OR IRC_H_S)
|
||||
|
||||
set(conky_libs ${conky_libs} -lircclient)
|
||||
endif(BUILD_IRC)
|
||||
|
||||
if(BUILD_IPV6)
|
||||
find_file(IF_INET6 if_inet6 PATHS /proc/net)
|
||||
|
||||
if(NOT IF_INET6)
|
||||
message(WARNING "/proc/net/if_inet6 unavailable")
|
||||
endif(NOT IF_INET6)
|
||||
@ -219,61 +230,74 @@ endif(BUILD_HTTP)
|
||||
if(BUILD_NCURSES)
|
||||
set(CURSES_NEED_NCURSES TRUE)
|
||||
include(FindCurses)
|
||||
|
||||
if(NOT CURSES_FOUND)
|
||||
message(FATAL_ERROR "Unable to find ncurses library")
|
||||
endif(NOT CURSES_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${CURSES_LIBRARIES})
|
||||
set(conky_includes ${conky_includes} ${CURSES_INCLUDE_DIR})
|
||||
endif(BUILD_NCURSES)
|
||||
|
||||
if(BUILD_MYSQL)
|
||||
find_path(mysql_INCLUDE_PATH
|
||||
mysql.h
|
||||
${INCLUDE_SEARCH_PATH}
|
||||
/usr/include/mysql
|
||||
/usr/local/include/mysql)
|
||||
mysql.h
|
||||
${INCLUDE_SEARCH_PATH}
|
||||
/usr/include/mysql
|
||||
/usr/local/include/mysql)
|
||||
|
||||
if(NOT mysql_INCLUDE_PATH)
|
||||
message(FATAL_ERROR "Unable to find mysql.h")
|
||||
endif(NOT mysql_INCLUDE_PATH)
|
||||
|
||||
set(conky_includes ${conky_includes} ${mysql_INCLUDE_PATH})
|
||||
find_library(MYSQLCLIENT_LIB
|
||||
NAMES mysqlclient
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/mysql
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib/mysql
|
||||
/usr/local/lib64/mysql)
|
||||
NAMES mysqlclient
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/mysql
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib/mysql
|
||||
/usr/local/lib64/mysql)
|
||||
|
||||
if(NOT MYSQLCLIENT_LIB)
|
||||
message(FATAL_ERROR "Unable to find mysqlclient library")
|
||||
endif(NOT MYSQLCLIENT_LIB)
|
||||
|
||||
set(conky_libs ${conky_libs} ${MYSQLCLIENT_LIB})
|
||||
endif(BUILD_MYSQL)
|
||||
|
||||
if(BUILD_WLAN AND OS_LINUX)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
|
||||
check_include_files(iwlib.h IWLIB_H)
|
||||
|
||||
if(NOT IWLIB_H)
|
||||
message(FATAL_ERROR "Unable to find iwlib.h")
|
||||
endif(NOT IWLIB_H)
|
||||
|
||||
find_library(IWLIB_LIB NAMES iw)
|
||||
|
||||
if(NOT IWLIB_LIB)
|
||||
message(FATAL_ERROR "Unable to find libiw.so")
|
||||
endif(NOT IWLIB_LIB)
|
||||
|
||||
set(conky_libs ${conky_libs} ${IWLIB_LIB})
|
||||
check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC)
|
||||
endif(BUILD_WLAN AND OS_LINUX)
|
||||
|
||||
if(BUILD_PORT_MONITORS)
|
||||
check_function_exists(getnameinfo HAVE_GETNAMEINFO)
|
||||
|
||||
if(NOT HAVE_GETNAMEINFO)
|
||||
message(FATAL_ERROR "could not find getnameinfo()")
|
||||
endif(NOT HAVE_GETNAMEINFO)
|
||||
|
||||
check_include_files(
|
||||
"netdb.h;netinet/in.h;netinet/tcp.h;sys/socket.h;arpa/inet.h"
|
||||
HAVE_PORTMON_HEADERS)
|
||||
|
||||
if(NOT HAVE_PORTMON_HEADERS)
|
||||
message(FATAL_ERROR "missing needed network header(s) for port monitoring")
|
||||
endif(NOT HAVE_PORTMON_HEADERS)
|
||||
@ -283,15 +307,18 @@ endif(BUILD_PORT_MONITORS)
|
||||
if(BUILD_ICONV)
|
||||
check_include_files(iconv.h HAVE_ICONV_H)
|
||||
find_library(ICONV_LIBRARY NAMES iconv)
|
||||
|
||||
if(NOT ICONV_LIBRARY)
|
||||
# maybe iconv() is provided by libc
|
||||
set(ICONV_LIBRARY ""
|
||||
CACHE FILEPATH
|
||||
"Path to the iconv library, if iconv is not provided by libc"
|
||||
FORCE)
|
||||
CACHE FILEPATH
|
||||
"Path to the iconv library, if iconv is not provided by libc"
|
||||
FORCE)
|
||||
endif(NOT ICONV_LIBRARY)
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||
check_function_exists(iconv ICONV_FUNC)
|
||||
|
||||
if(HAVE_ICONV_H AND ICONV_FUNC)
|
||||
set(conky_includes ${conky_includes} ${ICONV_INCLUDE_DIR})
|
||||
set(conky_libs ${conky_libs} ${ICONV_LIBRARY})
|
||||
@ -304,6 +331,7 @@ endif(BUILD_ICONV)
|
||||
if(BUILD_X11)
|
||||
include(FindX11)
|
||||
find_package(X11)
|
||||
|
||||
if(X11_FOUND)
|
||||
set(conky_includes ${conky_includes} ${X11_INCLUDE_DIR})
|
||||
set(conky_libs ${conky_libs} ${X11_LIBRARIES})
|
||||
@ -313,9 +341,11 @@ if(BUILD_X11)
|
||||
if(NOT X11_Xdamage_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xdamage library")
|
||||
endif(NOT X11_Xdamage_FOUND)
|
||||
|
||||
if(NOT X11_Xfixes_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xfixes library")
|
||||
endif(NOT X11_Xfixes_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${X11_Xdamage_LIB} ${X11_Xfixes_LIB})
|
||||
endif(BUILD_XDAMAGE)
|
||||
|
||||
@ -323,6 +353,7 @@ if(BUILD_X11)
|
||||
if(NOT X11_Xshape_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xshape library")
|
||||
endif(NOT X11_Xshape_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${X11_Xshape_LIB})
|
||||
endif(BUILD_XSHAPE)
|
||||
|
||||
@ -334,9 +365,11 @@ if(BUILD_X11)
|
||||
else(FREETYPE_INCLUDE_DIR_freetype2)
|
||||
message(FATAL_ERROR "Unable to find freetype library")
|
||||
endif(FREETYPE_INCLUDE_DIR_freetype2)
|
||||
|
||||
if(NOT X11_Xft_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xft library")
|
||||
endif(NOT X11_Xft_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${X11_Xft_LIB})
|
||||
endif(BUILD_XFT)
|
||||
|
||||
@ -345,8 +378,27 @@ if(BUILD_X11)
|
||||
if(NOT X11_Xext_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xext library (needed for Xdbe)")
|
||||
endif(NOT X11_Xext_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${X11_Xext_LIB})
|
||||
endif(BUILD_XDBE)
|
||||
|
||||
# check for Xinerama
|
||||
if(BUILD_XINERAMA)
|
||||
if(NOT X11_Xinerama_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xinerama library")
|
||||
endif(NOT X11_Xinerama_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${X11_Xinerama_LIB})
|
||||
endif(BUILD_XINERAMA)
|
||||
|
||||
# check for Xfixes
|
||||
if(BUILD_XFIXES)
|
||||
if(NOT X11_Xfixes_FOUND)
|
||||
message(FATAL_ERROR "Unable to find Xfixes library")
|
||||
endif(NOT X11_Xfixes_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${X11_Xfixes_LIB})
|
||||
endif(BUILD_XFIXES)
|
||||
else(X11_FOUND)
|
||||
message(FATAL_ERROR "Unable to find X11 library")
|
||||
endif(X11_FOUND)
|
||||
@ -360,6 +412,7 @@ if(BUILD_WAYLAND)
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(wayland-protocols QUIET wayland-protocols>=1.13)
|
||||
|
||||
if(Wayland_FOUND AND wayland-protocols_FOUND)
|
||||
# find Wayland protocols
|
||||
pkg_get_variable(Wayland_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
@ -402,10 +455,12 @@ if(BUILD_X11)
|
||||
set(luacairo_libs ${CAIRO_LIBRARIES} ${LUA_LIBRARIES})
|
||||
set(luacairo_includes ${CAIRO_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
||||
find_program(APP_PATCH patch)
|
||||
|
||||
if(NOT APP_PATCH)
|
||||
message(FATAL_ERROR "Unable to find program 'patch'")
|
||||
endif(NOT APP_PATCH)
|
||||
endif(BUILD_LUA_CAIRO)
|
||||
|
||||
if(BUILD_LUA_IMLIB2)
|
||||
pkg_search_module(IMLIB2 REQUIRED imlib2 Imlib2)
|
||||
set(luaimlib2_libs ${IMLIB2_LIBS} ${IMLIB2_LDFLAGS} ${LUA_LIBRARIES})
|
||||
@ -414,6 +469,7 @@ if(BUILD_X11)
|
||||
${LUA_INCLUDE_DIR}
|
||||
${X11_INCLUDE_DIR})
|
||||
endif(BUILD_LUA_IMLIB2)
|
||||
|
||||
if(BUILD_LUA_RSVG)
|
||||
pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.52)
|
||||
set(luarsvg_libs ${RSVG_LIBRARIES} ${LUA_LIBRARIES})
|
||||
@ -424,17 +480,19 @@ endif(BUILD_X11)
|
||||
if(BUILD_AUDACIOUS)
|
||||
set(WANT_GLIB true)
|
||||
pkg_check_modules(NEW_AUDACIOUS audacious>=1.4.0)
|
||||
|
||||
if(NEW_AUDACIOUS_FOUND)
|
||||
pkg_check_modules(AUDACIOUS REQUIRED audclient>=1.4.0)
|
||||
pkg_check_modules(DBUS_GLIB REQUIRED dbus-glib-1)
|
||||
else(NEW_AUDACIOUS_FOUND)
|
||||
pkg_check_modules(AUDACIOUS REQUIRED audacious<1.4.0)
|
||||
endif(NEW_AUDACIOUS_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES} ${DBUS_GLIB_LIBRARIES})
|
||||
set(conky_includes
|
||||
${conky_includes}
|
||||
${AUDACIOUS_INCLUDE_DIRS}
|
||||
${DBUS_GLIB_INCLUDE_DIRS})
|
||||
${conky_includes}
|
||||
${AUDACIOUS_INCLUDE_DIRS}
|
||||
${DBUS_GLIB_INCLUDE_DIRS})
|
||||
endif(BUILD_AUDACIOUS)
|
||||
|
||||
if(BUILD_XMMS2)
|
||||
@ -455,6 +513,7 @@ endif(BUILD_RSS)
|
||||
if(BUILD_NVIDIA)
|
||||
find_path(XNVCtrl_INCLUDE_PATH NVCtrl/NVCtrl.h ${INCLUDE_SEARCH_PATH})
|
||||
find_library(XNVCtrl_LIB NAMES XNVCtrl)
|
||||
|
||||
if(XNVCtrl_INCLUDE_PATH AND XNVCtrl_LIB)
|
||||
set(XNVCtrl_FOUND true)
|
||||
set(conky_libs ${conky_libs} ${XNVCtrl_LIB})
|
||||
@ -503,9 +562,11 @@ endif(WANT_CURL)
|
||||
|
||||
if(WANT_LIBXML2)
|
||||
include(FindLibXml2)
|
||||
|
||||
if(NOT LIBXML2_FOUND)
|
||||
message(FATAL_ERROR "Unable to find libxml2 library")
|
||||
endif(NOT LIBXML2_FOUND)
|
||||
|
||||
set(conky_libs ${conky_libs} ${LIBXML2_LIBRARIES})
|
||||
set(conky_includes ${conky_includes} ${LIBXML2_INCLUDE_DIR})
|
||||
endif(WANT_LIBXML2)
|
||||
@ -518,10 +579,10 @@ if(BUILD_DOCS)
|
||||
if(NOT APP_PANDOC)
|
||||
message(FATAL_ERROR "Unable to find program 'pandoc'")
|
||||
endif(NOT APP_PANDOC)
|
||||
|
||||
mark_as_advanced(APP_PANDOC)
|
||||
endif(BUILD_DOCS)
|
||||
|
||||
|
||||
if(BUILD_DOCS OR BUILD_EXTRAS)
|
||||
# Python3 with Jinja2 and PyYaml required for manpage generation.
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
@ -560,11 +621,11 @@ endif(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
# since start of month
|
||||
if(DEBUG)
|
||||
execute_process(COMMAND ${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git
|
||||
log --since=${VERSION_MAJOR}-${VERSION_MINOR}-01
|
||||
--pretty=oneline
|
||||
COMMAND ${APP_WC} -l
|
||||
COMMAND ${APP_AWK} "{print $1}"
|
||||
RESULT_VARIABLE RETVAL
|
||||
OUTPUT_VARIABLE COMMIT_COUNT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
log --since=${VERSION_MAJOR}-${VERSION_MINOR}-01
|
||||
--pretty=oneline
|
||||
COMMAND ${APP_WC} -l
|
||||
COMMAND ${APP_AWK} "{print $1}"
|
||||
RESULT_VARIABLE RETVAL
|
||||
OUTPUT_VARIABLE COMMIT_COUNT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif(DEBUG)
|
||||
|
@ -1,41 +0,0 @@
|
||||
# * Find the Xinerama include file and library
|
||||
#
|
||||
|
||||
set(Xinerama_INC_SEARCH_PATH
|
||||
/usr/X11R6/include
|
||||
/usr/local/include
|
||||
/usr/include/X11
|
||||
/usr/openwin/include
|
||||
/usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/usr/include)
|
||||
|
||||
set(Xinerama_LIB_SEARCH_PATH
|
||||
/usr/X11R6/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/lib)
|
||||
|
||||
find_path(Xinerama_INCLUDE_DIR X11/extensions/Xinerama.h
|
||||
${Xinerama_INC_SEARCH_PATH})
|
||||
|
||||
find_library(Xinerama_LIBRARIES NAMES Xinerama PATH ${Xinerama_LIB_SEARCH_PATH})
|
||||
|
||||
if(Xinerama_INCLUDE_DIR AND Xinerama_LIBRARIES)
|
||||
set(Xinerama_FOUND TRUE)
|
||||
endif(Xinerama_INCLUDE_DIR AND Xinerama_LIBRARIES)
|
||||
|
||||
if(Xinerama_FOUND)
|
||||
include(CheckLibraryExists)
|
||||
|
||||
check_library_exists(${Xinerama_LIBRARIES}
|
||||
"XineramaQueryScreens"
|
||||
${Xinerama_LIBRARIES}
|
||||
Xinerama_HAS_QUERY)
|
||||
|
||||
if(NOT Xinerama_HAS_QUERY AND Xinerama_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find Xinerama")
|
||||
endif(NOT Xinerama_HAS_QUERY AND Xinerama_FIND_REQUIRED)
|
||||
endif(Xinerama_FOUND)
|
||||
|
||||
mark_as_advanced(Xinerama_INCLUDE_DIR Xinerama_LIBRARIES)
|
@ -58,6 +58,8 @@
|
||||
|
||||
#cmakedefine BUILD_XSHAPE 1
|
||||
|
||||
#cmakedefine BUILD_XFIXES 1
|
||||
|
||||
#cmakedefine BUILD_ARGB 1
|
||||
|
||||
#cmakedefine BUILD_XDBE 1
|
||||
|
@ -414,10 +414,12 @@ values:
|
||||
- name: own_window_type
|
||||
desc: |-
|
||||
if own_window is yes, you may specify type normal, desktop,
|
||||
dock, panel or override. Desktop windows are special
|
||||
dock, panel, utility or override. Desktop windows are special
|
||||
windows that have no window decorations; are always visible on your
|
||||
desktop; do not appear in your pager or taskbar; and are sticky across
|
||||
all workspaces. Panel windows reserve space along a desktop edge, just
|
||||
all workspaces. Utility windows are like desktop windows,
|
||||
except they appear above everything else rather than below.
|
||||
Panel windows reserve space along a desktop edge, just
|
||||
like panels and taskbars, preventing maximized windows from
|
||||
overlapping them. The edge is chosen based on the alignment option.
|
||||
Override windows are not under the control of the window manager.
|
||||
|
@ -53,6 +53,8 @@
|
||||
xorg.libXext
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
xorg.libXdamage
|
||||
xorg.libXfixes
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -19,6 +19,7 @@
|
||||
#
|
||||
|
||||
include_directories(${conky_includes})
|
||||
|
||||
if(BUILD_BUILTIN_CONFIG OR BUILD_OLD_CONFIG)
|
||||
# include config output dir
|
||||
include_directories(${CMAKE_BINARY_DIR}/data)
|
||||
@ -28,115 +29,117 @@ endif(BUILD_BUILTIN_CONFIG OR BUILD_OLD_CONFIG)
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/config.h' in order to build with CMake."
|
||||
)
|
||||
"You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/config.h' in order to build with CMake."
|
||||
)
|
||||
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/build.h' in order to build with CMake."
|
||||
)
|
||||
"You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/build.h' in order to build with CMake."
|
||||
)
|
||||
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h' in order to build with CMake."
|
||||
)
|
||||
"You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h' in order to build with CMake."
|
||||
)
|
||||
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h)
|
||||
|
||||
set(conky_sources
|
||||
${conky_sources}
|
||||
c++wrap.cc
|
||||
c++wrap.hh
|
||||
colour-settings.cc
|
||||
colour-settings.h
|
||||
colours.cc
|
||||
colours.h
|
||||
combine.cc
|
||||
combine.h
|
||||
common.cc
|
||||
common.h
|
||||
conky.cc
|
||||
conky.h
|
||||
core.cc
|
||||
core.h
|
||||
cpu.cc
|
||||
cpu.h
|
||||
diskio.cc
|
||||
diskio.h
|
||||
entropy.cc
|
||||
entropy.h
|
||||
exec.cc
|
||||
exec.h
|
||||
fs.cc
|
||||
fs.h
|
||||
gradient.cc
|
||||
gradient.h
|
||||
mail.cc
|
||||
mail.h
|
||||
misc.cc
|
||||
misc.h
|
||||
net_stat.cc
|
||||
net_stat.h
|
||||
template.cc
|
||||
template.h
|
||||
mboxscan.cc
|
||||
mboxscan.h
|
||||
read_tcpip.cc
|
||||
read_tcpip.h
|
||||
scroll.cc
|
||||
scroll.h
|
||||
specials.cc
|
||||
specials.h
|
||||
tailhead.cc
|
||||
tailhead.h
|
||||
temphelper.cc
|
||||
temphelper.h
|
||||
text_object.cc
|
||||
text_object.h
|
||||
timeinfo.cc
|
||||
timeinfo.h
|
||||
top.cc
|
||||
top.h
|
||||
algebra.cc
|
||||
algebra.h
|
||||
prioqueue.cc
|
||||
prioqueue.h
|
||||
proc.cc
|
||||
proc.h
|
||||
user.cc
|
||||
user.h
|
||||
luamm.cc
|
||||
luamm.hh
|
||||
data-source.cc
|
||||
data-source.hh
|
||||
display-output.cc
|
||||
display-output.hh
|
||||
display-console.cc
|
||||
display-console.hh
|
||||
display-file.cc
|
||||
display-file.hh
|
||||
display-ncurses.cc
|
||||
display-ncurses.hh
|
||||
display-http.cc
|
||||
display-http.hh
|
||||
display-x11.cc
|
||||
display-x11.hh
|
||||
display-wayland.cc
|
||||
display-wayland.hh
|
||||
lua-config.cc
|
||||
lua-config.hh
|
||||
setting.cc
|
||||
setting.hh
|
||||
llua.cc
|
||||
llua.h
|
||||
update-cb.cc
|
||||
update-cb.hh
|
||||
logging.h
|
||||
semaphore.hh
|
||||
x11-color.cc
|
||||
x11-color.h
|
||||
)
|
||||
${conky_sources}
|
||||
c++wrap.cc
|
||||
c++wrap.hh
|
||||
colour-settings.cc
|
||||
colour-settings.h
|
||||
colours.cc
|
||||
colours.h
|
||||
combine.cc
|
||||
combine.h
|
||||
common.cc
|
||||
common.h
|
||||
conky.cc
|
||||
conky.h
|
||||
core.cc
|
||||
core.h
|
||||
cpu.cc
|
||||
cpu.h
|
||||
diskio.cc
|
||||
diskio.h
|
||||
entropy.cc
|
||||
entropy.h
|
||||
exec.cc
|
||||
exec.h
|
||||
fs.cc
|
||||
fs.h
|
||||
gradient.cc
|
||||
gradient.h
|
||||
mail.cc
|
||||
mail.h
|
||||
misc.cc
|
||||
misc.h
|
||||
net_stat.cc
|
||||
net_stat.h
|
||||
template.cc
|
||||
template.h
|
||||
mboxscan.cc
|
||||
mboxscan.h
|
||||
read_tcpip.cc
|
||||
read_tcpip.h
|
||||
scroll.cc
|
||||
scroll.h
|
||||
specials.cc
|
||||
specials.h
|
||||
tailhead.cc
|
||||
tailhead.h
|
||||
temphelper.cc
|
||||
temphelper.h
|
||||
text_object.cc
|
||||
text_object.h
|
||||
timeinfo.cc
|
||||
timeinfo.h
|
||||
top.cc
|
||||
top.h
|
||||
algebra.cc
|
||||
algebra.h
|
||||
prioqueue.cc
|
||||
prioqueue.h
|
||||
proc.cc
|
||||
proc.h
|
||||
user.cc
|
||||
user.h
|
||||
luamm.cc
|
||||
luamm.hh
|
||||
data-source.cc
|
||||
data-source.hh
|
||||
display-output.cc
|
||||
display-output.hh
|
||||
display-console.cc
|
||||
display-console.hh
|
||||
display-file.cc
|
||||
display-file.hh
|
||||
display-ncurses.cc
|
||||
display-ncurses.hh
|
||||
display-http.cc
|
||||
display-http.hh
|
||||
display-x11.cc
|
||||
display-x11.hh
|
||||
display-wayland.cc
|
||||
display-wayland.hh
|
||||
lua-config.cc
|
||||
lua-config.hh
|
||||
setting.cc
|
||||
setting.hh
|
||||
llua.cc
|
||||
llua.h
|
||||
update-cb.cc
|
||||
update-cb.hh
|
||||
logging.h
|
||||
semaphore.hh
|
||||
x11-color.cc
|
||||
x11-color.h
|
||||
)
|
||||
|
||||
# Platform specific sources
|
||||
if(OS_LINUX)
|
||||
@ -237,11 +240,6 @@ if(BUILD_X11)
|
||||
set(x11 x11.cc x11.h)
|
||||
set(optional_sources ${optional_sources} ${x11})
|
||||
|
||||
if(BUILD_XINERAMA)
|
||||
find_package(Xinerama REQUIRED)
|
||||
set(conky_libs ${conky_libs} ${Xinerama_LIBRARIES})
|
||||
endif(BUILD_XINERAMA)
|
||||
|
||||
if(BUILD_MOUSE_EVENTS)
|
||||
set(mouse_events mouse-events.cc mouse-events.h)
|
||||
set(optional_sources ${optional_sources} ${mouse_events})
|
||||
@ -256,6 +254,7 @@ endif(BUILD_GUI)
|
||||
if(BUILD_WAYLAND)
|
||||
set(wl_srcs wl.cc wl.h xdg-shell-protocol.c wlr-layer-shell-protocol.c)
|
||||
set(optional_sources ${optional_sources} ${wl_srcs})
|
||||
|
||||
# generate protocol implementations
|
||||
set(XDG_PROT_DEF "${Wayland_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
|
||||
add_custom_command(
|
||||
@ -348,9 +347,9 @@ if(BUILD_TESTS)
|
||||
add_dependencies(conky generated_hdr_files)
|
||||
target_link_libraries(conky conky_core ${conky_libs})
|
||||
install(TARGETS conky_core
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
else()
|
||||
add_executable(conky main.cc ${conky_sources} ${optional_sources})
|
||||
add_dependencies(conky generated_hdr_files)
|
||||
@ -358,15 +357,15 @@ else()
|
||||
endif()
|
||||
|
||||
install(TARGETS conky
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
|
||||
if(BUILD_PORT_MONITORS)
|
||||
install(TARGETS tcp-portmon
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
endif(BUILD_PORT_MONITORS)
|
||||
|
||||
print_target_properties(conky)
|
||||
|
11
src/gui.cc
11
src/gui.cc
@ -132,11 +132,9 @@ conky::lua_traits<alignment>::Map conky::lua_traits<alignment>::map = {
|
||||
#ifdef OWN_WINDOW
|
||||
template <>
|
||||
conky::lua_traits<window_type>::Map conky::lua_traits<window_type>::map = {
|
||||
{"normal", TYPE_NORMAL},
|
||||
{"dock", TYPE_DOCK},
|
||||
{"panel", TYPE_PANEL},
|
||||
{"desktop", TYPE_DESKTOP},
|
||||
{"override", TYPE_OVERRIDE}};
|
||||
{"normal", TYPE_NORMAL}, {"dock", TYPE_DOCK},
|
||||
{"panel", TYPE_PANEL}, {"desktop", TYPE_DESKTOP},
|
||||
{"utility", TYPE_UTILITY}, {"override", TYPE_OVERRIDE}};
|
||||
|
||||
template <>
|
||||
conky::lua_traits<window_hints>::Map conky::lua_traits<window_hints>::map = {
|
||||
@ -197,7 +195,8 @@ conky::simple_config_setting<alignment> text_alignment("alignment", BOTTOM_LEFT,
|
||||
false);
|
||||
|
||||
priv::colour_setting default_shade_color("default_shade_color", black_argb32);
|
||||
priv::colour_setting default_outline_color("default_outline_color", black_argb32);
|
||||
priv::colour_setting default_outline_color("default_outline_color",
|
||||
black_argb32);
|
||||
|
||||
conky::range_config_setting<int> border_inner_margin(
|
||||
"border_inner_margin", 0, std::numeric_limits<int>::max(), 3, true);
|
||||
|
56
src/x11.cc
56
src/x11.cc
@ -58,6 +58,9 @@
|
||||
#ifdef BUILD_XSHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
#endif /* BUILD_XSHAPE */
|
||||
#ifdef BUILD_XFIXES
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#endif /* BUILD_XFIXES */
|
||||
|
||||
/* some basic X11 stuff */
|
||||
Display *display = nullptr;
|
||||
@ -573,22 +576,24 @@ void x11_init_window(lua::state &l __attribute__((unused)), bool own) {
|
||||
|
||||
/* A window managed by the window manager.
|
||||
* Process hints and buttons. */
|
||||
XSetWindowAttributes attrs = {ParentRelative,
|
||||
0L,
|
||||
0,
|
||||
0L,
|
||||
0,
|
||||
0,
|
||||
Always,
|
||||
0L,
|
||||
0L,
|
||||
False,
|
||||
StructureNotifyMask | ExposureMask |
|
||||
ButtonPressMask | ButtonReleaseMask,
|
||||
0L,
|
||||
False,
|
||||
0,
|
||||
0};
|
||||
XSetWindowAttributes attrs = {
|
||||
ParentRelative,
|
||||
0L,
|
||||
0,
|
||||
0L,
|
||||
0,
|
||||
0,
|
||||
Always,
|
||||
0L,
|
||||
0L,
|
||||
False,
|
||||
StructureNotifyMask | ExposureMask | ButtonPressMask |
|
||||
ButtonReleaseMask,
|
||||
0L,
|
||||
own_window_type.get(l) == TYPE_UTILITY ? True : False,
|
||||
0,
|
||||
0};
|
||||
|
||||
|
||||
XWMHints wmHint;
|
||||
Atom xa;
|
||||
@ -616,6 +621,14 @@ void x11_init_window(lua::state &l __attribute__((unused)), bool own) {
|
||||
/* allow decorated windows to be given input focus by WM */
|
||||
wmHint.input = TEST_HINT(hints, HINT_UNDECORATED) ? False : True;
|
||||
#ifdef BUILD_XSHAPE
|
||||
#ifdef BUILD_XFIXES
|
||||
if (own_window_type.get(l) == TYPE_UTILITY) {
|
||||
XRectangle rect;
|
||||
XserverRegion region = XFixesCreateRegion(display, &rect, 1);
|
||||
XFixesSetWindowShapeRegion(display, window.window, ShapeInput, 0, 0, region);
|
||||
XFixesDestroyRegion(display, region);
|
||||
}
|
||||
#endif /* BUILD_XFIXES */
|
||||
if (!wmHint.input) {
|
||||
/* allow only decorated windows to be given mouse input */
|
||||
int major_version;
|
||||
@ -667,6 +680,11 @@ void x11_init_window(lua::state &l __attribute__((unused)), bool own) {
|
||||
fprintf(stderr, PACKAGE_NAME ": window type - panel\n");
|
||||
fflush(stderr);
|
||||
break;
|
||||
case TYPE_UTILITY:
|
||||
prop = ATOM(_NET_WM_WINDOW_TYPE_UTILITY);
|
||||
fprintf(stderr, PACKAGE_NAME ": window type - utility\n");
|
||||
fflush(stderr);
|
||||
break;
|
||||
case TYPE_NORMAL:
|
||||
default:
|
||||
prop = ATOM(_NET_WM_WINDOW_TYPE_NORMAL);
|
||||
@ -839,9 +857,11 @@ void x11_init_window(lua::state &l __attribute__((unused)), bool own) {
|
||||
}
|
||||
#endif /* OWN_WINDOW */
|
||||
#ifdef BUILD_MOUSE_EVENTS
|
||||
/* it's not recommended to add event masks to special windows in X; causes a crash */
|
||||
/* it's not recommended to add event masks to special windows in X; causes a
|
||||
* crash */
|
||||
if (own_window_type.get(l) != TYPE_DESKTOP) {
|
||||
input_mask |= ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask;
|
||||
input_mask |= ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
||||
EnterWindowMask | LeaveWindowMask;
|
||||
}
|
||||
#endif /* BUILD_MOUSE_EVENTS */
|
||||
XSelectInput(display, window.window, input_mask);
|
||||
|
Loading…
Reference in New Issue
Block a user