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:

committed by
GitHub

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 \
|
librsvg \
|
||||||
libxft \
|
libxft \
|
||||||
libxinerama \
|
libxinerama \
|
||||||
|
libxfixes \
|
||||||
lua \
|
lua \
|
||||||
ninja \
|
ninja \
|
||||||
pkg-config
|
pkg-config
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
- run: mkdir build
|
||||||
- name: Configure with CMake
|
- name: Configure with CMake
|
||||||
run: |
|
working-directory: build
|
||||||
set -x
|
run: cmake .. -G Ninja \
|
||||||
mkdir build
|
-DMAINTAINER_MODE=ON \
|
||||||
cd build
|
-DBUILD_WAYLAND=OFF \
|
||||||
cmake .. -G Ninja \
|
-DBUILD_TESTS=ON
|
||||||
-DMAINTAINER_MODE=ON \
|
|
||||||
-DBUILD_WAYLAND=OFF \
|
|
||||||
-DBUILD_TESTS=ON
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
- name: Test
|
- name: Test
|
||||||
|
@@ -160,8 +160,10 @@ if(BUILD_X11)
|
|||||||
# Mac Fix
|
# Mac Fix
|
||||||
if(OS_DARWIN)
|
if(OS_DARWIN)
|
||||||
option(BUILD_XDAMAGE "Build Xdamage support" false)
|
option(BUILD_XDAMAGE "Build Xdamage support" false)
|
||||||
|
option(BUILD_XFIXES "Build Xfixes support" false)
|
||||||
else(OS_DARWIN)
|
else(OS_DARWIN)
|
||||||
option(BUILD_XDAMAGE "Build Xdamage support" true)
|
option(BUILD_XDAMAGE "Build Xdamage support" true)
|
||||||
|
option(BUILD_XFIXES "Build Xfixes support" true)
|
||||||
endif(OS_DARWIN)
|
endif(OS_DARWIN)
|
||||||
|
|
||||||
option(BUILD_XINERAMA "Build Xinerama support" true)
|
option(BUILD_XINERAMA "Build Xinerama support" true)
|
||||||
@@ -173,6 +175,7 @@ if(BUILD_X11)
|
|||||||
else(BUILD_X11)
|
else(BUILD_X11)
|
||||||
set(OWN_WINDOW false CACHE BOOL "Enable own_window support" FORCE)
|
set(OWN_WINDOW false CACHE BOOL "Enable own_window support" FORCE)
|
||||||
set(BUILD_XDAMAGE false CACHE BOOL "Build Xdamage 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_XINERAMA false CACHE BOOL "Build Xinerama support" FORCE)
|
||||||
set(BUILD_XDBE false CACHE BOOL "Build Xdbe (double-buffer) 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)
|
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")
|
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
|
||||||
ac_search_libs(clock_gettime "time.h" CLOCK_GETTIME_LIB "rt")
|
ac_search_libs(clock_gettime "time.h" CLOCK_GETTIME_LIB "rt")
|
||||||
|
|
||||||
if(NOT DEFINED CLOCK_GETTIME_LIB)
|
if(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
message(FATAL_ERROR "clock_gettime not found.")
|
message(FATAL_ERROR "clock_gettime not found.")
|
||||||
@@ -49,6 +50,7 @@ if(NOT DEFINED CLOCK_GETTIME_LIB)
|
|||||||
else(NOT DEFINED CLOCK_GETTIME_LIB)
|
else(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||||
set(HAVE_CLOCK_GETTIME 1)
|
set(HAVE_CLOCK_GETTIME 1)
|
||||||
endif(NOT DEFINED CLOCK_GETTIME_LIB)
|
endif(NOT DEFINED CLOCK_GETTIME_LIB)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${CLOCK_GETTIME_LIB})
|
set(conky_libs ${conky_libs} ${CLOCK_GETTIME_LIB})
|
||||||
|
|
||||||
# standard path to search for includes
|
# standard path to search for includes
|
||||||
@@ -62,6 +64,7 @@ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|||||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||||
set(OS_FREEBSD true)
|
set(OS_FREEBSD true)
|
||||||
set(conky_libs ${conky_libs} -lkvm -ldevstat -lintl -linotify)
|
set(conky_libs ${conky_libs} -lkvm -ldevstat -lintl -linotify)
|
||||||
|
|
||||||
if(BUILD_IRC)
|
if(BUILD_IRC)
|
||||||
set(conky_libs ${conky_libs} -lssl -lcrypto)
|
set(conky_libs ${conky_libs} -lssl -lcrypto)
|
||||||
endif(BUILD_IRC)
|
endif(BUILD_IRC)
|
||||||
@@ -95,36 +98,36 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|||||||
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
|
||||||
if(NOT OS_LINUX
|
if(NOT OS_LINUX
|
||||||
AND NOT OS_FREEBSD
|
AND NOT OS_FREEBSD
|
||||||
AND NOT OS_OPENBSD
|
AND NOT OS_OPENBSD
|
||||||
AND NOT OS_DRAGONFLY
|
AND NOT OS_DRAGONFLY
|
||||||
AND NOT OS_SOLARIS
|
AND NOT OS_SOLARIS
|
||||||
AND NOT OS_HAIKU
|
AND NOT OS_HAIKU
|
||||||
AND NOT OS_DARWIN)
|
AND NOT OS_DARWIN)
|
||||||
message(
|
message(
|
||||||
FATAL_ERROR
|
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
|
endif(NOT
|
||||||
OS_LINUX
|
OS_LINUX
|
||||||
AND
|
AND
|
||||||
NOT
|
NOT
|
||||||
OS_FREEBSD
|
OS_FREEBSD
|
||||||
AND
|
AND
|
||||||
NOT
|
NOT
|
||||||
OS_OPENBSD
|
OS_OPENBSD
|
||||||
AND
|
AND
|
||||||
NOT
|
NOT
|
||||||
OS_DRAGONFLY
|
OS_DRAGONFLY
|
||||||
AND
|
AND
|
||||||
NOT
|
NOT
|
||||||
OS_SOLARIS
|
OS_SOLARIS
|
||||||
AND
|
AND
|
||||||
NOT
|
NOT
|
||||||
OS_HAIKU
|
OS_HAIKU
|
||||||
AND
|
AND
|
||||||
NOT
|
NOT
|
||||||
OS_DARWIN)
|
OS_DARWIN)
|
||||||
|
|
||||||
# Check for soundcard header
|
# Check for soundcard header
|
||||||
if(OS_LINUX)
|
if(OS_LINUX)
|
||||||
@@ -143,21 +146,23 @@ endif(BUILD_I18N AND OS_DRAGONFLY)
|
|||||||
|
|
||||||
if(BUILD_I18N AND OS_DARWIN)
|
if(BUILD_I18N AND OS_DARWIN)
|
||||||
find_path(LIBINTL_H_N libintl.h
|
find_path(LIBINTL_H_N libintl.h
|
||||||
PATHS /usr/local/opt/gettext/include
|
PATHS /usr/local/opt/gettext/include
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/local/opt/include)
|
/usr/local/opt/include)
|
||||||
|
|
||||||
if(LIBINTL_H_N)
|
if(LIBINTL_H_N)
|
||||||
include_directories(${LIBINTL_H_N})
|
include_directories(${LIBINTL_H_N})
|
||||||
else(LIBINTL_H_N)
|
else(LIBINTL_H_N)
|
||||||
message(FATAL_ERROR "Unable to find libintl.h (try `brew install gettext`)")
|
message(FATAL_ERROR "Unable to find libintl.h (try `brew install gettext`)")
|
||||||
endif(LIBINTL_H_N)
|
endif(LIBINTL_H_N)
|
||||||
|
|
||||||
find_library(INTL_LIB
|
find_library(INTL_LIB
|
||||||
NAMES intl
|
NAMES intl
|
||||||
PATHS /usr/local/opt/gettext/lib
|
PATHS /usr/local/opt/gettext/lib
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/local/opt/lib)
|
/usr/local/opt/lib)
|
||||||
set(conky_libs ${conky_libs} ${INTL_LIB})
|
set(conky_libs ${conky_libs} ${INTL_LIB})
|
||||||
endif(BUILD_I18N AND OS_DARWIN)
|
endif(BUILD_I18N AND OS_DARWIN)
|
||||||
|
|
||||||
@@ -183,28 +188,34 @@ endif(BUILD_MATH)
|
|||||||
|
|
||||||
if(BUILD_ICAL)
|
if(BUILD_ICAL)
|
||||||
check_include_files(libical/ical.h ICAL_H_)
|
check_include_files(libical/ical.h ICAL_H_)
|
||||||
|
|
||||||
if(NOT ICAL_H_)
|
if(NOT ICAL_H_)
|
||||||
message(FATAL_ERROR "Unable to find libical")
|
message(FATAL_ERROR "Unable to find libical")
|
||||||
endif(NOT ICAL_H_)
|
endif(NOT ICAL_H_)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} -lical)
|
set(conky_libs ${conky_libs} -lical)
|
||||||
endif(BUILD_ICAL)
|
endif(BUILD_ICAL)
|
||||||
|
|
||||||
if(BUILD_IRC)
|
if(BUILD_IRC)
|
||||||
find_path(IRC_H_N libircclient.h PATHS /usr/include/libircclient)
|
find_path(IRC_H_N libircclient.h PATHS /usr/include/libircclient)
|
||||||
find_path(IRC_H_S libircclient.h PATHS /usr/include)
|
find_path(IRC_H_S libircclient.h PATHS /usr/include)
|
||||||
|
|
||||||
if(IRC_H_N)
|
if(IRC_H_N)
|
||||||
include_directories(${IRC_H_N})
|
include_directories(${IRC_H_N})
|
||||||
endif(IRC_H_N)
|
endif(IRC_H_N)
|
||||||
|
|
||||||
if(IRC_H_N OR IRC_H_S)
|
if(IRC_H_N OR IRC_H_S)
|
||||||
set(IRC_H_ true)
|
set(IRC_H_ true)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unable to find libircclient")
|
message(FATAL_ERROR "Unable to find libircclient")
|
||||||
endif(IRC_H_N OR IRC_H_S)
|
endif(IRC_H_N OR IRC_H_S)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} -lircclient)
|
set(conky_libs ${conky_libs} -lircclient)
|
||||||
endif(BUILD_IRC)
|
endif(BUILD_IRC)
|
||||||
|
|
||||||
if(BUILD_IPV6)
|
if(BUILD_IPV6)
|
||||||
find_file(IF_INET6 if_inet6 PATHS /proc/net)
|
find_file(IF_INET6 if_inet6 PATHS /proc/net)
|
||||||
|
|
||||||
if(NOT IF_INET6)
|
if(NOT IF_INET6)
|
||||||
message(WARNING "/proc/net/if_inet6 unavailable")
|
message(WARNING "/proc/net/if_inet6 unavailable")
|
||||||
endif(NOT IF_INET6)
|
endif(NOT IF_INET6)
|
||||||
@@ -219,61 +230,74 @@ endif(BUILD_HTTP)
|
|||||||
if(BUILD_NCURSES)
|
if(BUILD_NCURSES)
|
||||||
set(CURSES_NEED_NCURSES TRUE)
|
set(CURSES_NEED_NCURSES TRUE)
|
||||||
include(FindCurses)
|
include(FindCurses)
|
||||||
|
|
||||||
if(NOT CURSES_FOUND)
|
if(NOT CURSES_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find ncurses library")
|
message(FATAL_ERROR "Unable to find ncurses library")
|
||||||
endif(NOT CURSES_FOUND)
|
endif(NOT CURSES_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${CURSES_LIBRARIES})
|
set(conky_libs ${conky_libs} ${CURSES_LIBRARIES})
|
||||||
set(conky_includes ${conky_includes} ${CURSES_INCLUDE_DIR})
|
set(conky_includes ${conky_includes} ${CURSES_INCLUDE_DIR})
|
||||||
endif(BUILD_NCURSES)
|
endif(BUILD_NCURSES)
|
||||||
|
|
||||||
if(BUILD_MYSQL)
|
if(BUILD_MYSQL)
|
||||||
find_path(mysql_INCLUDE_PATH
|
find_path(mysql_INCLUDE_PATH
|
||||||
mysql.h
|
mysql.h
|
||||||
${INCLUDE_SEARCH_PATH}
|
${INCLUDE_SEARCH_PATH}
|
||||||
/usr/include/mysql
|
/usr/include/mysql
|
||||||
/usr/local/include/mysql)
|
/usr/local/include/mysql)
|
||||||
|
|
||||||
if(NOT mysql_INCLUDE_PATH)
|
if(NOT mysql_INCLUDE_PATH)
|
||||||
message(FATAL_ERROR "Unable to find mysql.h")
|
message(FATAL_ERROR "Unable to find mysql.h")
|
||||||
endif(NOT mysql_INCLUDE_PATH)
|
endif(NOT mysql_INCLUDE_PATH)
|
||||||
|
|
||||||
set(conky_includes ${conky_includes} ${mysql_INCLUDE_PATH})
|
set(conky_includes ${conky_includes} ${mysql_INCLUDE_PATH})
|
||||||
find_library(MYSQLCLIENT_LIB
|
find_library(MYSQLCLIENT_LIB
|
||||||
NAMES mysqlclient
|
NAMES mysqlclient
|
||||||
PATHS /usr/lib
|
PATHS /usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
/usr/lib/mysql
|
/usr/lib/mysql
|
||||||
/usr/lib64/mysql
|
/usr/lib64/mysql
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/local/lib64
|
/usr/local/lib64
|
||||||
/usr/local/lib/mysql
|
/usr/local/lib/mysql
|
||||||
/usr/local/lib64/mysql)
|
/usr/local/lib64/mysql)
|
||||||
|
|
||||||
if(NOT MYSQLCLIENT_LIB)
|
if(NOT MYSQLCLIENT_LIB)
|
||||||
message(FATAL_ERROR "Unable to find mysqlclient library")
|
message(FATAL_ERROR "Unable to find mysqlclient library")
|
||||||
endif(NOT MYSQLCLIENT_LIB)
|
endif(NOT MYSQLCLIENT_LIB)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${MYSQLCLIENT_LIB})
|
set(conky_libs ${conky_libs} ${MYSQLCLIENT_LIB})
|
||||||
endif(BUILD_MYSQL)
|
endif(BUILD_MYSQL)
|
||||||
|
|
||||||
if(BUILD_WLAN AND OS_LINUX)
|
if(BUILD_WLAN AND OS_LINUX)
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
|
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
|
||||||
check_include_files(iwlib.h IWLIB_H)
|
check_include_files(iwlib.h IWLIB_H)
|
||||||
|
|
||||||
if(NOT IWLIB_H)
|
if(NOT IWLIB_H)
|
||||||
message(FATAL_ERROR "Unable to find iwlib.h")
|
message(FATAL_ERROR "Unable to find iwlib.h")
|
||||||
endif(NOT IWLIB_H)
|
endif(NOT IWLIB_H)
|
||||||
|
|
||||||
find_library(IWLIB_LIB NAMES iw)
|
find_library(IWLIB_LIB NAMES iw)
|
||||||
|
|
||||||
if(NOT IWLIB_LIB)
|
if(NOT IWLIB_LIB)
|
||||||
message(FATAL_ERROR "Unable to find libiw.so")
|
message(FATAL_ERROR "Unable to find libiw.so")
|
||||||
endif(NOT IWLIB_LIB)
|
endif(NOT IWLIB_LIB)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${IWLIB_LIB})
|
set(conky_libs ${conky_libs} ${IWLIB_LIB})
|
||||||
check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC)
|
check_function_exists(iw_sockets_open IWLIB_SOCKETS_OPEN_FUNC)
|
||||||
endif(BUILD_WLAN AND OS_LINUX)
|
endif(BUILD_WLAN AND OS_LINUX)
|
||||||
|
|
||||||
if(BUILD_PORT_MONITORS)
|
if(BUILD_PORT_MONITORS)
|
||||||
check_function_exists(getnameinfo HAVE_GETNAMEINFO)
|
check_function_exists(getnameinfo HAVE_GETNAMEINFO)
|
||||||
|
|
||||||
if(NOT HAVE_GETNAMEINFO)
|
if(NOT HAVE_GETNAMEINFO)
|
||||||
message(FATAL_ERROR "could not find getnameinfo()")
|
message(FATAL_ERROR "could not find getnameinfo()")
|
||||||
endif(NOT HAVE_GETNAMEINFO)
|
endif(NOT HAVE_GETNAMEINFO)
|
||||||
|
|
||||||
check_include_files(
|
check_include_files(
|
||||||
"netdb.h;netinet/in.h;netinet/tcp.h;sys/socket.h;arpa/inet.h"
|
"netdb.h;netinet/in.h;netinet/tcp.h;sys/socket.h;arpa/inet.h"
|
||||||
HAVE_PORTMON_HEADERS)
|
HAVE_PORTMON_HEADERS)
|
||||||
|
|
||||||
if(NOT HAVE_PORTMON_HEADERS)
|
if(NOT HAVE_PORTMON_HEADERS)
|
||||||
message(FATAL_ERROR "missing needed network header(s) for port monitoring")
|
message(FATAL_ERROR "missing needed network header(s) for port monitoring")
|
||||||
endif(NOT HAVE_PORTMON_HEADERS)
|
endif(NOT HAVE_PORTMON_HEADERS)
|
||||||
@@ -283,15 +307,18 @@ endif(BUILD_PORT_MONITORS)
|
|||||||
if(BUILD_ICONV)
|
if(BUILD_ICONV)
|
||||||
check_include_files(iconv.h HAVE_ICONV_H)
|
check_include_files(iconv.h HAVE_ICONV_H)
|
||||||
find_library(ICONV_LIBRARY NAMES iconv)
|
find_library(ICONV_LIBRARY NAMES iconv)
|
||||||
|
|
||||||
if(NOT ICONV_LIBRARY)
|
if(NOT ICONV_LIBRARY)
|
||||||
# maybe iconv() is provided by libc
|
# maybe iconv() is provided by libc
|
||||||
set(ICONV_LIBRARY ""
|
set(ICONV_LIBRARY ""
|
||||||
CACHE FILEPATH
|
CACHE FILEPATH
|
||||||
"Path to the iconv library, if iconv is not provided by libc"
|
"Path to the iconv library, if iconv is not provided by libc"
|
||||||
FORCE)
|
FORCE)
|
||||||
endif(NOT ICONV_LIBRARY)
|
endif(NOT ICONV_LIBRARY)
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||||
check_function_exists(iconv ICONV_FUNC)
|
check_function_exists(iconv ICONV_FUNC)
|
||||||
|
|
||||||
if(HAVE_ICONV_H AND ICONV_FUNC)
|
if(HAVE_ICONV_H AND ICONV_FUNC)
|
||||||
set(conky_includes ${conky_includes} ${ICONV_INCLUDE_DIR})
|
set(conky_includes ${conky_includes} ${ICONV_INCLUDE_DIR})
|
||||||
set(conky_libs ${conky_libs} ${ICONV_LIBRARY})
|
set(conky_libs ${conky_libs} ${ICONV_LIBRARY})
|
||||||
@@ -304,6 +331,7 @@ endif(BUILD_ICONV)
|
|||||||
if(BUILD_X11)
|
if(BUILD_X11)
|
||||||
include(FindX11)
|
include(FindX11)
|
||||||
find_package(X11)
|
find_package(X11)
|
||||||
|
|
||||||
if(X11_FOUND)
|
if(X11_FOUND)
|
||||||
set(conky_includes ${conky_includes} ${X11_INCLUDE_DIR})
|
set(conky_includes ${conky_includes} ${X11_INCLUDE_DIR})
|
||||||
set(conky_libs ${conky_libs} ${X11_LIBRARIES})
|
set(conky_libs ${conky_libs} ${X11_LIBRARIES})
|
||||||
@@ -313,9 +341,11 @@ if(BUILD_X11)
|
|||||||
if(NOT X11_Xdamage_FOUND)
|
if(NOT X11_Xdamage_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find Xdamage library")
|
message(FATAL_ERROR "Unable to find Xdamage library")
|
||||||
endif(NOT X11_Xdamage_FOUND)
|
endif(NOT X11_Xdamage_FOUND)
|
||||||
|
|
||||||
if(NOT X11_Xfixes_FOUND)
|
if(NOT X11_Xfixes_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find Xfixes library")
|
message(FATAL_ERROR "Unable to find Xfixes library")
|
||||||
endif(NOT X11_Xfixes_FOUND)
|
endif(NOT X11_Xfixes_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${X11_Xdamage_LIB} ${X11_Xfixes_LIB})
|
set(conky_libs ${conky_libs} ${X11_Xdamage_LIB} ${X11_Xfixes_LIB})
|
||||||
endif(BUILD_XDAMAGE)
|
endif(BUILD_XDAMAGE)
|
||||||
|
|
||||||
@@ -323,6 +353,7 @@ if(BUILD_X11)
|
|||||||
if(NOT X11_Xshape_FOUND)
|
if(NOT X11_Xshape_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find Xshape library")
|
message(FATAL_ERROR "Unable to find Xshape library")
|
||||||
endif(NOT X11_Xshape_FOUND)
|
endif(NOT X11_Xshape_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${X11_Xshape_LIB})
|
set(conky_libs ${conky_libs} ${X11_Xshape_LIB})
|
||||||
endif(BUILD_XSHAPE)
|
endif(BUILD_XSHAPE)
|
||||||
|
|
||||||
@@ -334,9 +365,11 @@ if(BUILD_X11)
|
|||||||
else(FREETYPE_INCLUDE_DIR_freetype2)
|
else(FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
message(FATAL_ERROR "Unable to find freetype library")
|
message(FATAL_ERROR "Unable to find freetype library")
|
||||||
endif(FREETYPE_INCLUDE_DIR_freetype2)
|
endif(FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
|
|
||||||
if(NOT X11_Xft_FOUND)
|
if(NOT X11_Xft_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find Xft library")
|
message(FATAL_ERROR "Unable to find Xft library")
|
||||||
endif(NOT X11_Xft_FOUND)
|
endif(NOT X11_Xft_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${X11_Xft_LIB})
|
set(conky_libs ${conky_libs} ${X11_Xft_LIB})
|
||||||
endif(BUILD_XFT)
|
endif(BUILD_XFT)
|
||||||
|
|
||||||
@@ -345,8 +378,27 @@ if(BUILD_X11)
|
|||||||
if(NOT X11_Xext_FOUND)
|
if(NOT X11_Xext_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find Xext library (needed for Xdbe)")
|
message(FATAL_ERROR "Unable to find Xext library (needed for Xdbe)")
|
||||||
endif(NOT X11_Xext_FOUND)
|
endif(NOT X11_Xext_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${X11_Xext_LIB})
|
set(conky_libs ${conky_libs} ${X11_Xext_LIB})
|
||||||
endif(BUILD_XDBE)
|
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)
|
else(X11_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find X11 library")
|
message(FATAL_ERROR "Unable to find X11 library")
|
||||||
endif(X11_FOUND)
|
endif(X11_FOUND)
|
||||||
@@ -360,6 +412,7 @@ if(BUILD_WAYLAND)
|
|||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
|
|
||||||
pkg_check_modules(wayland-protocols QUIET wayland-protocols>=1.13)
|
pkg_check_modules(wayland-protocols QUIET wayland-protocols>=1.13)
|
||||||
|
|
||||||
if(Wayland_FOUND AND wayland-protocols_FOUND)
|
if(Wayland_FOUND AND wayland-protocols_FOUND)
|
||||||
# find Wayland protocols
|
# find Wayland protocols
|
||||||
pkg_get_variable(Wayland_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
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_libs ${CAIRO_LIBRARIES} ${LUA_LIBRARIES})
|
||||||
set(luacairo_includes ${CAIRO_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
set(luacairo_includes ${CAIRO_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
||||||
find_program(APP_PATCH patch)
|
find_program(APP_PATCH patch)
|
||||||
|
|
||||||
if(NOT APP_PATCH)
|
if(NOT APP_PATCH)
|
||||||
message(FATAL_ERROR "Unable to find program 'patch'")
|
message(FATAL_ERROR "Unable to find program 'patch'")
|
||||||
endif(NOT APP_PATCH)
|
endif(NOT APP_PATCH)
|
||||||
endif(BUILD_LUA_CAIRO)
|
endif(BUILD_LUA_CAIRO)
|
||||||
|
|
||||||
if(BUILD_LUA_IMLIB2)
|
if(BUILD_LUA_IMLIB2)
|
||||||
pkg_search_module(IMLIB2 REQUIRED imlib2 Imlib2)
|
pkg_search_module(IMLIB2 REQUIRED imlib2 Imlib2)
|
||||||
set(luaimlib2_libs ${IMLIB2_LIBS} ${IMLIB2_LDFLAGS} ${LUA_LIBRARIES})
|
set(luaimlib2_libs ${IMLIB2_LIBS} ${IMLIB2_LDFLAGS} ${LUA_LIBRARIES})
|
||||||
@@ -414,6 +469,7 @@ if(BUILD_X11)
|
|||||||
${LUA_INCLUDE_DIR}
|
${LUA_INCLUDE_DIR}
|
||||||
${X11_INCLUDE_DIR})
|
${X11_INCLUDE_DIR})
|
||||||
endif(BUILD_LUA_IMLIB2)
|
endif(BUILD_LUA_IMLIB2)
|
||||||
|
|
||||||
if(BUILD_LUA_RSVG)
|
if(BUILD_LUA_RSVG)
|
||||||
pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.52)
|
pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.52)
|
||||||
set(luarsvg_libs ${RSVG_LIBRARIES} ${LUA_LIBRARIES})
|
set(luarsvg_libs ${RSVG_LIBRARIES} ${LUA_LIBRARIES})
|
||||||
@@ -424,17 +480,19 @@ endif(BUILD_X11)
|
|||||||
if(BUILD_AUDACIOUS)
|
if(BUILD_AUDACIOUS)
|
||||||
set(WANT_GLIB true)
|
set(WANT_GLIB true)
|
||||||
pkg_check_modules(NEW_AUDACIOUS audacious>=1.4.0)
|
pkg_check_modules(NEW_AUDACIOUS audacious>=1.4.0)
|
||||||
|
|
||||||
if(NEW_AUDACIOUS_FOUND)
|
if(NEW_AUDACIOUS_FOUND)
|
||||||
pkg_check_modules(AUDACIOUS REQUIRED audclient>=1.4.0)
|
pkg_check_modules(AUDACIOUS REQUIRED audclient>=1.4.0)
|
||||||
pkg_check_modules(DBUS_GLIB REQUIRED dbus-glib-1)
|
pkg_check_modules(DBUS_GLIB REQUIRED dbus-glib-1)
|
||||||
else(NEW_AUDACIOUS_FOUND)
|
else(NEW_AUDACIOUS_FOUND)
|
||||||
pkg_check_modules(AUDACIOUS REQUIRED audacious<1.4.0)
|
pkg_check_modules(AUDACIOUS REQUIRED audacious<1.4.0)
|
||||||
endif(NEW_AUDACIOUS_FOUND)
|
endif(NEW_AUDACIOUS_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES} ${DBUS_GLIB_LIBRARIES})
|
set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES} ${DBUS_GLIB_LIBRARIES})
|
||||||
set(conky_includes
|
set(conky_includes
|
||||||
${conky_includes}
|
${conky_includes}
|
||||||
${AUDACIOUS_INCLUDE_DIRS}
|
${AUDACIOUS_INCLUDE_DIRS}
|
||||||
${DBUS_GLIB_INCLUDE_DIRS})
|
${DBUS_GLIB_INCLUDE_DIRS})
|
||||||
endif(BUILD_AUDACIOUS)
|
endif(BUILD_AUDACIOUS)
|
||||||
|
|
||||||
if(BUILD_XMMS2)
|
if(BUILD_XMMS2)
|
||||||
@@ -455,6 +513,7 @@ endif(BUILD_RSS)
|
|||||||
if(BUILD_NVIDIA)
|
if(BUILD_NVIDIA)
|
||||||
find_path(XNVCtrl_INCLUDE_PATH NVCtrl/NVCtrl.h ${INCLUDE_SEARCH_PATH})
|
find_path(XNVCtrl_INCLUDE_PATH NVCtrl/NVCtrl.h ${INCLUDE_SEARCH_PATH})
|
||||||
find_library(XNVCtrl_LIB NAMES XNVCtrl)
|
find_library(XNVCtrl_LIB NAMES XNVCtrl)
|
||||||
|
|
||||||
if(XNVCtrl_INCLUDE_PATH AND XNVCtrl_LIB)
|
if(XNVCtrl_INCLUDE_PATH AND XNVCtrl_LIB)
|
||||||
set(XNVCtrl_FOUND true)
|
set(XNVCtrl_FOUND true)
|
||||||
set(conky_libs ${conky_libs} ${XNVCtrl_LIB})
|
set(conky_libs ${conky_libs} ${XNVCtrl_LIB})
|
||||||
@@ -503,9 +562,11 @@ endif(WANT_CURL)
|
|||||||
|
|
||||||
if(WANT_LIBXML2)
|
if(WANT_LIBXML2)
|
||||||
include(FindLibXml2)
|
include(FindLibXml2)
|
||||||
|
|
||||||
if(NOT LIBXML2_FOUND)
|
if(NOT LIBXML2_FOUND)
|
||||||
message(FATAL_ERROR "Unable to find libxml2 library")
|
message(FATAL_ERROR "Unable to find libxml2 library")
|
||||||
endif(NOT LIBXML2_FOUND)
|
endif(NOT LIBXML2_FOUND)
|
||||||
|
|
||||||
set(conky_libs ${conky_libs} ${LIBXML2_LIBRARIES})
|
set(conky_libs ${conky_libs} ${LIBXML2_LIBRARIES})
|
||||||
set(conky_includes ${conky_includes} ${LIBXML2_INCLUDE_DIR})
|
set(conky_includes ${conky_includes} ${LIBXML2_INCLUDE_DIR})
|
||||||
endif(WANT_LIBXML2)
|
endif(WANT_LIBXML2)
|
||||||
@@ -518,10 +579,10 @@ if(BUILD_DOCS)
|
|||||||
if(NOT APP_PANDOC)
|
if(NOT APP_PANDOC)
|
||||||
message(FATAL_ERROR "Unable to find program 'pandoc'")
|
message(FATAL_ERROR "Unable to find program 'pandoc'")
|
||||||
endif(NOT APP_PANDOC)
|
endif(NOT APP_PANDOC)
|
||||||
|
|
||||||
mark_as_advanced(APP_PANDOC)
|
mark_as_advanced(APP_PANDOC)
|
||||||
endif(BUILD_DOCS)
|
endif(BUILD_DOCS)
|
||||||
|
|
||||||
|
|
||||||
if(BUILD_DOCS OR BUILD_EXTRAS)
|
if(BUILD_DOCS OR BUILD_EXTRAS)
|
||||||
# Python3 with Jinja2 and PyYaml required for manpage generation.
|
# Python3 with Jinja2 and PyYaml required for manpage generation.
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||||
@@ -560,11 +621,11 @@ endif(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|||||||
# since start of month
|
# since start of month
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
execute_process(COMMAND ${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git
|
execute_process(COMMAND ${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git
|
||||||
log --since=${VERSION_MAJOR}-${VERSION_MINOR}-01
|
log --since=${VERSION_MAJOR}-${VERSION_MINOR}-01
|
||||||
--pretty=oneline
|
--pretty=oneline
|
||||||
COMMAND ${APP_WC} -l
|
COMMAND ${APP_WC} -l
|
||||||
COMMAND ${APP_AWK} "{print $1}"
|
COMMAND ${APP_AWK} "{print $1}"
|
||||||
RESULT_VARIABLE RETVAL
|
RESULT_VARIABLE RETVAL
|
||||||
OUTPUT_VARIABLE COMMIT_COUNT
|
OUTPUT_VARIABLE COMMIT_COUNT
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
endif(DEBUG)
|
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_XSHAPE 1
|
||||||
|
|
||||||
|
#cmakedefine BUILD_XFIXES 1
|
||||||
|
|
||||||
#cmakedefine BUILD_ARGB 1
|
#cmakedefine BUILD_ARGB 1
|
||||||
|
|
||||||
#cmakedefine BUILD_XDBE 1
|
#cmakedefine BUILD_XDBE 1
|
||||||
|
@@ -414,10 +414,12 @@ values:
|
|||||||
- name: own_window_type
|
- name: own_window_type
|
||||||
desc: |-
|
desc: |-
|
||||||
if own_window is yes, you may specify type normal, desktop,
|
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
|
windows that have no window decorations; are always visible on your
|
||||||
desktop; do not appear in your pager or taskbar; and are sticky across
|
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
|
like panels and taskbars, preventing maximized windows from
|
||||||
overlapping them. The edge is chosen based on the alignment option.
|
overlapping them. The edge is chosen based on the alignment option.
|
||||||
Override windows are not under the control of the window manager.
|
Override windows are not under the control of the window manager.
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
xorg.libXext
|
xorg.libXext
|
||||||
xorg.libXft
|
xorg.libXft
|
||||||
xorg.libXinerama
|
xorg.libXinerama
|
||||||
|
xorg.libXdamage
|
||||||
|
xorg.libXfixes
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include_directories(${conky_includes})
|
include_directories(${conky_includes})
|
||||||
|
|
||||||
if(BUILD_BUILTIN_CONFIG OR BUILD_OLD_CONFIG)
|
if(BUILD_BUILTIN_CONFIG OR BUILD_OLD_CONFIG)
|
||||||
# include config output dir
|
# include config output dir
|
||||||
include_directories(${CMAKE_BINARY_DIR}/data)
|
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)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
||||||
message(
|
message(
|
||||||
FATAL_ERROR
|
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)
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
||||||
|
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
||||||
message(
|
message(
|
||||||
FATAL_ERROR
|
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)
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
||||||
|
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h)
|
||||||
message(
|
message(
|
||||||
FATAL_ERROR
|
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)
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/defconfig.h)
|
||||||
|
|
||||||
set(conky_sources
|
set(conky_sources
|
||||||
${conky_sources}
|
${conky_sources}
|
||||||
c++wrap.cc
|
c++wrap.cc
|
||||||
c++wrap.hh
|
c++wrap.hh
|
||||||
colour-settings.cc
|
colour-settings.cc
|
||||||
colour-settings.h
|
colour-settings.h
|
||||||
colours.cc
|
colours.cc
|
||||||
colours.h
|
colours.h
|
||||||
combine.cc
|
combine.cc
|
||||||
combine.h
|
combine.h
|
||||||
common.cc
|
common.cc
|
||||||
common.h
|
common.h
|
||||||
conky.cc
|
conky.cc
|
||||||
conky.h
|
conky.h
|
||||||
core.cc
|
core.cc
|
||||||
core.h
|
core.h
|
||||||
cpu.cc
|
cpu.cc
|
||||||
cpu.h
|
cpu.h
|
||||||
diskio.cc
|
diskio.cc
|
||||||
diskio.h
|
diskio.h
|
||||||
entropy.cc
|
entropy.cc
|
||||||
entropy.h
|
entropy.h
|
||||||
exec.cc
|
exec.cc
|
||||||
exec.h
|
exec.h
|
||||||
fs.cc
|
fs.cc
|
||||||
fs.h
|
fs.h
|
||||||
gradient.cc
|
gradient.cc
|
||||||
gradient.h
|
gradient.h
|
||||||
mail.cc
|
mail.cc
|
||||||
mail.h
|
mail.h
|
||||||
misc.cc
|
misc.cc
|
||||||
misc.h
|
misc.h
|
||||||
net_stat.cc
|
net_stat.cc
|
||||||
net_stat.h
|
net_stat.h
|
||||||
template.cc
|
template.cc
|
||||||
template.h
|
template.h
|
||||||
mboxscan.cc
|
mboxscan.cc
|
||||||
mboxscan.h
|
mboxscan.h
|
||||||
read_tcpip.cc
|
read_tcpip.cc
|
||||||
read_tcpip.h
|
read_tcpip.h
|
||||||
scroll.cc
|
scroll.cc
|
||||||
scroll.h
|
scroll.h
|
||||||
specials.cc
|
specials.cc
|
||||||
specials.h
|
specials.h
|
||||||
tailhead.cc
|
tailhead.cc
|
||||||
tailhead.h
|
tailhead.h
|
||||||
temphelper.cc
|
temphelper.cc
|
||||||
temphelper.h
|
temphelper.h
|
||||||
text_object.cc
|
text_object.cc
|
||||||
text_object.h
|
text_object.h
|
||||||
timeinfo.cc
|
timeinfo.cc
|
||||||
timeinfo.h
|
timeinfo.h
|
||||||
top.cc
|
top.cc
|
||||||
top.h
|
top.h
|
||||||
algebra.cc
|
algebra.cc
|
||||||
algebra.h
|
algebra.h
|
||||||
prioqueue.cc
|
prioqueue.cc
|
||||||
prioqueue.h
|
prioqueue.h
|
||||||
proc.cc
|
proc.cc
|
||||||
proc.h
|
proc.h
|
||||||
user.cc
|
user.cc
|
||||||
user.h
|
user.h
|
||||||
luamm.cc
|
luamm.cc
|
||||||
luamm.hh
|
luamm.hh
|
||||||
data-source.cc
|
data-source.cc
|
||||||
data-source.hh
|
data-source.hh
|
||||||
display-output.cc
|
display-output.cc
|
||||||
display-output.hh
|
display-output.hh
|
||||||
display-console.cc
|
display-console.cc
|
||||||
display-console.hh
|
display-console.hh
|
||||||
display-file.cc
|
display-file.cc
|
||||||
display-file.hh
|
display-file.hh
|
||||||
display-ncurses.cc
|
display-ncurses.cc
|
||||||
display-ncurses.hh
|
display-ncurses.hh
|
||||||
display-http.cc
|
display-http.cc
|
||||||
display-http.hh
|
display-http.hh
|
||||||
display-x11.cc
|
display-x11.cc
|
||||||
display-x11.hh
|
display-x11.hh
|
||||||
display-wayland.cc
|
display-wayland.cc
|
||||||
display-wayland.hh
|
display-wayland.hh
|
||||||
lua-config.cc
|
lua-config.cc
|
||||||
lua-config.hh
|
lua-config.hh
|
||||||
setting.cc
|
setting.cc
|
||||||
setting.hh
|
setting.hh
|
||||||
llua.cc
|
llua.cc
|
||||||
llua.h
|
llua.h
|
||||||
update-cb.cc
|
update-cb.cc
|
||||||
update-cb.hh
|
update-cb.hh
|
||||||
logging.h
|
logging.h
|
||||||
semaphore.hh
|
semaphore.hh
|
||||||
x11-color.cc
|
x11-color.cc
|
||||||
x11-color.h
|
x11-color.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# Platform specific sources
|
# Platform specific sources
|
||||||
if(OS_LINUX)
|
if(OS_LINUX)
|
||||||
@@ -237,11 +240,6 @@ if(BUILD_X11)
|
|||||||
set(x11 x11.cc x11.h)
|
set(x11 x11.cc x11.h)
|
||||||
set(optional_sources ${optional_sources} ${x11})
|
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)
|
if(BUILD_MOUSE_EVENTS)
|
||||||
set(mouse_events mouse-events.cc mouse-events.h)
|
set(mouse_events mouse-events.cc mouse-events.h)
|
||||||
set(optional_sources ${optional_sources} ${mouse_events})
|
set(optional_sources ${optional_sources} ${mouse_events})
|
||||||
@@ -256,6 +254,7 @@ endif(BUILD_GUI)
|
|||||||
if(BUILD_WAYLAND)
|
if(BUILD_WAYLAND)
|
||||||
set(wl_srcs wl.cc wl.h xdg-shell-protocol.c wlr-layer-shell-protocol.c)
|
set(wl_srcs wl.cc wl.h xdg-shell-protocol.c wlr-layer-shell-protocol.c)
|
||||||
set(optional_sources ${optional_sources} ${wl_srcs})
|
set(optional_sources ${optional_sources} ${wl_srcs})
|
||||||
|
|
||||||
# generate protocol implementations
|
# generate protocol implementations
|
||||||
set(XDG_PROT_DEF "${Wayland_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
|
set(XDG_PROT_DEF "${Wayland_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
@@ -348,9 +347,9 @@ if(BUILD_TESTS)
|
|||||||
add_dependencies(conky generated_hdr_files)
|
add_dependencies(conky generated_hdr_files)
|
||||||
target_link_libraries(conky conky_core ${conky_libs})
|
target_link_libraries(conky conky_core ${conky_libs})
|
||||||
install(TARGETS conky_core
|
install(TARGETS conky_core
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||||
else()
|
else()
|
||||||
add_executable(conky main.cc ${conky_sources} ${optional_sources})
|
add_executable(conky main.cc ${conky_sources} ${optional_sources})
|
||||||
add_dependencies(conky generated_hdr_files)
|
add_dependencies(conky generated_hdr_files)
|
||||||
@@ -358,15 +357,15 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS conky
|
install(TARGETS conky
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||||
|
|
||||||
if(BUILD_PORT_MONITORS)
|
if(BUILD_PORT_MONITORS)
|
||||||
install(TARGETS tcp-portmon
|
install(TARGETS tcp-portmon
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||||
endif(BUILD_PORT_MONITORS)
|
endif(BUILD_PORT_MONITORS)
|
||||||
|
|
||||||
print_target_properties(conky)
|
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
|
#ifdef OWN_WINDOW
|
||||||
template <>
|
template <>
|
||||||
conky::lua_traits<window_type>::Map conky::lua_traits<window_type>::map = {
|
conky::lua_traits<window_type>::Map conky::lua_traits<window_type>::map = {
|
||||||
{"normal", TYPE_NORMAL},
|
{"normal", TYPE_NORMAL}, {"dock", TYPE_DOCK},
|
||||||
{"dock", TYPE_DOCK},
|
{"panel", TYPE_PANEL}, {"desktop", TYPE_DESKTOP},
|
||||||
{"panel", TYPE_PANEL},
|
{"utility", TYPE_UTILITY}, {"override", TYPE_OVERRIDE}};
|
||||||
{"desktop", TYPE_DESKTOP},
|
|
||||||
{"override", TYPE_OVERRIDE}};
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
conky::lua_traits<window_hints>::Map conky::lua_traits<window_hints>::map = {
|
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);
|
false);
|
||||||
|
|
||||||
priv::colour_setting default_shade_color("default_shade_color", black_argb32);
|
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(
|
conky::range_config_setting<int> border_inner_margin(
|
||||||
"border_inner_margin", 0, std::numeric_limits<int>::max(), 3, true);
|
"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
|
#ifdef BUILD_XSHAPE
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
#endif /* BUILD_XSHAPE */
|
#endif /* BUILD_XSHAPE */
|
||||||
|
#ifdef BUILD_XFIXES
|
||||||
|
#include <X11/extensions/Xfixes.h>
|
||||||
|
#endif /* BUILD_XFIXES */
|
||||||
|
|
||||||
/* some basic X11 stuff */
|
/* some basic X11 stuff */
|
||||||
Display *display = nullptr;
|
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.
|
/* A window managed by the window manager.
|
||||||
* Process hints and buttons. */
|
* Process hints and buttons. */
|
||||||
XSetWindowAttributes attrs = {ParentRelative,
|
XSetWindowAttributes attrs = {
|
||||||
0L,
|
ParentRelative,
|
||||||
0,
|
0L,
|
||||||
0L,
|
0,
|
||||||
0,
|
0L,
|
||||||
0,
|
0,
|
||||||
Always,
|
0,
|
||||||
0L,
|
Always,
|
||||||
0L,
|
0L,
|
||||||
False,
|
0L,
|
||||||
StructureNotifyMask | ExposureMask |
|
False,
|
||||||
ButtonPressMask | ButtonReleaseMask,
|
StructureNotifyMask | ExposureMask | ButtonPressMask |
|
||||||
0L,
|
ButtonReleaseMask,
|
||||||
False,
|
0L,
|
||||||
0,
|
own_window_type.get(l) == TYPE_UTILITY ? True : False,
|
||||||
0};
|
0,
|
||||||
|
0};
|
||||||
|
|
||||||
|
|
||||||
XWMHints wmHint;
|
XWMHints wmHint;
|
||||||
Atom xa;
|
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 */
|
/* allow decorated windows to be given input focus by WM */
|
||||||
wmHint.input = TEST_HINT(hints, HINT_UNDECORATED) ? False : True;
|
wmHint.input = TEST_HINT(hints, HINT_UNDECORATED) ? False : True;
|
||||||
#ifdef BUILD_XSHAPE
|
#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) {
|
if (!wmHint.input) {
|
||||||
/* allow only decorated windows to be given mouse input */
|
/* allow only decorated windows to be given mouse input */
|
||||||
int major_version;
|
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");
|
fprintf(stderr, PACKAGE_NAME ": window type - panel\n");
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
break;
|
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:
|
case TYPE_NORMAL:
|
||||||
default:
|
default:
|
||||||
prop = ATOM(_NET_WM_WINDOW_TYPE_NORMAL);
|
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 */
|
#endif /* OWN_WINDOW */
|
||||||
#ifdef BUILD_MOUSE_EVENTS
|
#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) {
|
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 */
|
#endif /* BUILD_MOUSE_EVENTS */
|
||||||
XSelectInput(display, window.window, input_mask);
|
XSelectInput(display, window.window, input_mask);
|
||||||
|
Reference in New Issue
Block a user