-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Basic macOS support #480
Basic macOS support #480
Conversation
…IN_C_FULL so remove -D_POSIX_C_SOURCE=200809L). What is more, -D_LARGEFILE64_SOURCE is used by default so not needed on macOS
…caused it to crash immediately upon initialisation
…n't cloned the repo and thus it showed 3166 commits behind
…nd not in 100% or 200% as it did before! Yeah
On macOS there can be used MANY swapfiles ( NOT swap partitions,,, the installation disk is the partition for storing swap memory data ) Thus conky code must be updated for Darwin to support multi-swapfile usage stats. For now, we default to showing stats for swapfile0
…orage so removed the swapmode( int swapfd, unsigned long * retvail, unsigned long * retfree )
when sem initialisation fails just like in sem() for linux… darwin.cc: partially implemented update_cpu_usage() and update_total_processes()
( Now it finds the correct number of tasks ) the changes in cmake file don’t change the functionality… It is only comments. In upcoming updates lua support may be enabled and the comments are related to lua support.
…le ( we use hw.logicalcpumax instead of hw.ncpus ) --> The new implementation of get_cpu_count() finds the the max value of logical cores the mac could use on a boot. update_total_processes() was patched to allow initialising only ONCE when conky runs the machHost and processorSet ( this could probably be implemented in a better way I guess though... )
compile ( This way we are compatible to GPLv3, i think ) Include GPLv3 header in darwin.cc, darwin.h and darwin_soundcard.h Add more beautiful and explanatory comments to ease the work of other contributors… ( Mostly on things that don’t work! )
…lementation but still it doesn't work as expected, plus, there are more memory related problems that will be fixed in newer release! NOTE: It will be really good to see how functions are implemented on linux.cc for more complete implementation
…... ( only keeps mach stuff ) Needs some more work though to print accurate percentage! :)
Revert to original conky readme Move all macOS related information to the Wiki: https://github.com/Conky-for-macOS/conky-for-macOS/wiki
For now, I have only tested up / down bytes count on en0, and it works. This is for #14
- Fix License headers in darwin* files - Remove ConkyX entry from .gitignore which slipped into from the "forConkyX" branch which was used for another project ... ConkyX. - Cleanup top.h (I will request the changes in a pull request finally)
Wow, this is really cool. It's going to take some time to review this, but I'll get back to you on it. |
Thats awesome thanks. If you need to build this i have wriiten a simple guide here: link Apart from installing the required libraries it is pretty much normal conky compilation! |
@npyl can you address the build error? At this point I think I'll just merge this, and go in and clean stuff up later. I'd rather get this merged and get a release out so we can find bugs. I want to add some tools like clang-format into the build system so we can standardize on formatting and include some static analysis. |
@brndnmtthws Yep, i will check it out EDIT: I also think I have messed up a bit the documentation of |
Hey btw, I should also tell you that I am really stressed with school right now, so after i finish it (approx 2 months) i will be able to dedicate alot time. Until then I am not sure how much i will be able to dedicate thanks for the understanding |
@npyl not to worry. Conky has been around for more than 12 years, and I think it'll still be around in another 12 :) |
Improve checks for headers in ConkyPlatformChecks.cmake to amend the problem; I mistakenly thought that statfs64 wasn't available in sys/statfs.h in macOS thus I tried to add platform specific code. Though, I add the checks in the wrong place and also messed up linux-specific code by replacing checks_include sys/statfs with check_symbol_exists statfs64
Hi!! I found some time and solved the problem. Thank you for your patience! :) I have also almost finished documenting of UPDATE: Hmm... Ok the problem for linux is fixed, but there is a problem for the mac now, let me see it again! |
@npyl as a follow-up to this, could you take a stab at adding a macOS Travis CI build? That would be super valuable! |
@brndnmtthws Yeah! I will do it as soon as I can! thats cool! |
This commit fixes documentation of a macOS specific variable (sip_status) as promised in brndnmtthws#480. Also, fix some identation problems in darwin.cc
This commit fixes documentation of a macOS specific variable (sip_status) as promised in #480. Also, fix some identation problems in darwin.cc
Hi everyone,
This is my work for getting conky to run on macOS and load the entire default config.
Preview
At the moment everything that is needed for the default conky config to be shown, is supported. (There are other things working too: e.g.
if_mounted
,if_existing
etc)CHANGES
ConkyPlatformChecks.cmake
,Conky.cmake
andsrc/CMakeLists.txt
introduce support for Darwindarwin.cc
,darwin.h
anddarwin_sip.h
ConkyPlatformChecks.cmake
force cmake to search forstatfs64
insys/mount.h
instead ofsys/statfs.h
as it doesn't exist in the latter..gitignore
add.DS_Store
which are spotlight-generated files that offer directory-related attributes; unnecessary for conky development on macOS.luamm.cc
I encountered the error:No member named '__cxa_exception_type' in ‘std::exception_ptr’
and couldn’t find a solution so I disabled the code for macOSsemaphore.hh
I had to introduce a variation ofsemaphore
class because macOS does not support named-unix semaphores (although available) . Also, I didn't want to bloat the code with too much preprocessor-codecore.cc
enable the conky-variablesrunning_processes
,threads
,running_threads
for macOSprevious_total_cpu_time
as member variable intop.h
I introduced the member variableprevious_total_cpu_time
in an attempt to optimise to the finestget_top_info()
and specifically for getting %CPU usage foreach process. I have implemented a slightly different approach than the one used in linux.cc:My approach is based on the concept that total-CPU-time-delta should be process-specific instead of iteration-specific as implemented in
linux.cc
.For the sake of keeping this PR compacked I will add a link to the issue in conky-for-macOS repo: link
sip_status
. This variable is Only available for macOS and offers information about the security measure 'System Integrity Protection' or SIPcore.cc
introducesip_status
extras/vim/syntax/conkyrc.vim
,extras/nano/conky.nanorc
anddoc/variables.xml
addsip_status
variable and provide documentation for it in the latterHAVE_CLOCK_GETTIME
cmakedefine to provide backwards compatibility with versions of macOS that don't provideclock_gettime()
TESTED WITH
top
- For memory statsMY QUESTIONS
darwin.cc
,darwin.h
anddarwin_sip.h
. Is this a necessary requirement for merging?I apologise for giving you a pull request 130-commits-long but lots of work had to be done to bring conky to a usable state first. :)