Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup build flags, global namespace and includes #1841

Merged
merged 14 commits into from
Apr 23, 2024
Merged
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ doc/*.html
Makefile
CMakeCache.txt
CMakeFiles
cmake_install.cmake
cmake_uninstall.cmake
CPackConfig.cmake
CPackSourceConfig.cmake

data/convertconf.h
data/defconfig.h
lua/libcairo-orig.c
Expand All @@ -19,6 +24,7 @@ lua/libimlib2.c
*.so
*.a
/config.h
/build.h

# Compiler cache
.cache
Expand Down
3 changes: 3 additions & 0 deletions 3rdparty/toluapp/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build/

# ignore generated Makefile; keep stub
Makefile
14 changes: 8 additions & 6 deletions cmake/ConkyBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ dependent_option(BUILD_XSHAPE "Enable Xshape support" true
"BUILD_X11" false
"Xshape support requires X11")
dependent_option(BUILD_XINPUT "Build Xinput 2 support" true
"BUILD_X11;BUILD_MOUSE_EVENTS" false
"Xinput 2 support requires X11 and BUILD_MOUSE_EVENTS enabled")
"BUILD_X11" false
"Xinput 2 support requires X11")

# if we build with any GUI support
if(BUILD_X11)
Expand All @@ -206,8 +206,8 @@ if(BUILD_WAYLAND)
endif(BUILD_WAYLAND)

dependent_option(BUILD_MOUSE_EVENTS "Enable mouse event support" true
"BUILD_WAYLAND OR OWN_WINDOW" false
"Mouse event support requires Wayland or OWN_WINDOW enabled")
"BUILD_WAYLAND OR BUILD_X11" false
"Mouse event support requires Wayland or X11 enabled")

# Lua library options
option(BUILD_LUA_CAIRO "Build cairo bindings for Lua" false)
Expand Down Expand Up @@ -240,9 +240,11 @@ option(BUILD_IRC "Enable if you want IRC support" false)

option(BUILD_HTTP "Enable if you want HTTP support" false)

if(BUILD_HTTP)
if(NOT BUILD_HTTP)
set(HTTPPORT "10080" CACHE STRING "Port to use for out_to_http")
endif(BUILD_HTTP)
else(NOT BUILD_HTTP)
set(HTTPPORT "10080")
endif(NOT BUILD_HTTP)

option(BUILD_ICONV "Enable iconv support" false)

Expand Down
7 changes: 6 additions & 1 deletion data/conky-dfly-smp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html
--
-- Conky Lua API: https://conky.cc/lua

-- Configuration settings: https://conky.cc/config_settings
conky.config = {
alignment = 'bottom_left',
background = false,
Expand All @@ -36,7 +39,8 @@ conky.config = {
extra_newline = false,
own_window = false,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_type = 'normal',
own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
Comment on lines -39 to +43
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to normal because it's the type that most commonly works, on WMs/DEs that are most commonly used (with desktops).

stippled_borders = 0,
update_interval = 3.0,
uppercase = false,
Expand All @@ -45,6 +49,7 @@ conky.config = {
show_graph_range = false
}

-- Variables: https://conky.cc/variables
conky.text = [[
$sysname $version on $machine
$hr
Expand Down
7 changes: 6 additions & 1 deletion data/conky.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html
--
-- Conky Lua API: https://conky.cc/lua

-- Configuration settings: https://conky.cc/config_settings
conky.config = {
alignment = 'top_left',
background = false,
Expand Down Expand Up @@ -39,7 +42,8 @@ conky.config = {
out_to_x = true,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_type = 'normal',
own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
show_graph_range = false,
show_graph_scale = false,
stippled_borders = 0,
Expand All @@ -49,6 +53,7 @@ conky.config = {
use_xft = true,
}

-- Variables: https://conky.cc/variables
conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
$hr
Expand Down
4 changes: 4 additions & 0 deletions data/conky_no_x11.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html
--
-- Conky Lua API: https://conky.cc/lua

-- Configuration settings: https://conky.cc/config_settings
conky.config = {
background = false,
cpu_avg_samples = 2,
Expand All @@ -22,6 +25,7 @@ conky.config = {
use_spacer = 'none',
};

-- Variables: https://conky.cc/variables
conky.text =
[[${scroll 16 $nodename - $sysname $kernel on $machine | }
Uptime: $uptime
Expand Down
46 changes: 33 additions & 13 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@ set(conky_sources
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
Expand Down Expand Up @@ -236,23 +228,46 @@ if(BUILD_PORT_MONITORS)
set(optional_sources ${optional_sources} ${port_monitors})
endif(BUILD_PORT_MONITORS)

if(BUILD_HTTP)
set(http
display-http.cc
display-http.hh
)
set(optional_sources ${optional_sources} ${http})
endif(BUILD_HTTP)

if(BUILD_X11)
set(x11 x11.cc x11.h)
set(x11
display-x11.cc
display-x11.hh
x11-settings.cc
x11-settings.h
x11.cc
x11.h
)
set(optional_sources ${optional_sources} ${x11})
endif(BUILD_X11)

if(BUILD_GUI)
set(gui fonts.cc fonts.h gui.cc gui.h)
set(optional_sources ${optional_sources} ${gui})

if(BUILD_MOUSE_EVENTS)
if(BUILD_MOUSE_EVENTS OR BUILD_XINPUT)
set(mouse_events mouse-events.cc mouse-events.h)
set(optional_sources ${optional_sources} ${mouse_events})
endif(BUILD_MOUSE_EVENTS)
endif(BUILD_MOUSE_EVENTS OR BUILD_XINPUT)
endif(BUILD_GUI)


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
display-wayland.cc
display-wayland.hh
xdg-shell-protocol.c
wlr-layer-shell-protocol.c
)
set(optional_sources ${optional_sources} ${wl_srcs})

# generate protocol implementations
Expand Down Expand Up @@ -324,7 +339,12 @@ if(BUILD_ICONV)
endif(BUILD_ICONV)

if(BUILD_NCURSES)
set(ncurses_srcs nc.cc nc.h)
set(ncurses_srcs
nc.cc
nc.h
display-ncurses.cc
display-ncurses.hh
)
set(optional_sources ${optional_sources} ${ncurses_srcs})
endif(BUILD_NCURSES)

Expand Down
Loading