Comments (15)
hi, i am trying to port this to compile with autotools, later today i can send you a pull request
from candybar.
Thanks, that sounds great!
from candybar.
@ricardo-vieira Do you know if it's possible/easy to implement a way to pass DISABLE_[widget] flags to gcc and make this configurable by the user? E.g. running ./configure --without-widget_weather
passes -DDISABLE_WEATHER
to gcc to disable the entire weather widget.
from candybar.
yes that was the next thing i was adding to the build system. autotools has a system you set a default (enable/disable) and it defines a symbol in config.h (not your config.h witch you should think in removing) and then you just do an #ifdef of that symbol. and you can disable it in configure with --disable-widget_weather or --enable-widget_weather.
but i can't do it now it will have to wait until the weekend :|
from candybar.
Allright, no rush, I'll see if I can get it to work in the meantime.
The plan is to remove config.h soon, but I'm not sure if I want to use a JSON config file or command-line arguments. I'm thinking about going for a JSON config file in e.g. $XDG_CONFIG_HOME/wkline/config.json
. With a JSON config file we could possible reuse the config loading functionality for reloading the configuration when drag/dropping a theme from a website.
from candybar.
Do you realize the dnd function is already implemented? you can try it right now. I don't think you need to reload the config you just need to open a popup asking "Set as default? " and if yes just save it. you only need a function to load the config file, just make it reusable an use dynamic memory
from candybar.
I tried dropping an URI onto the statusline, but it didn't do anything, what do you do to make it work?
from candybar.
It does not work as well as i thought it would. I think the widgets crash in the process. Are you selecting the text and dragging? just drag the url http://lokaltog.github.io/wkline-theme-default/
from candybar.
Yep, I tried dragging it from chrome and from a text box, still doesn't work for me unfortunately. Maybe dropping is handled differently in various WMs. I'm guessing the WebView provides a signal for dropping that can be used to handle this properly.
from candybar.
btw, found this, trying to implement it now.
from candybar.
Yes that's what i was talking about.
from candybar.
Man this is frustrating. I've managed to register the command-line argument, but it fails to build if a library is missing, because it still tries to build all the files in the source array in Makefile.am. Here's what I've got so far:
diff --git a/configure.ac b/configure.ac
index 5fc0839..ee26f33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,6 +3,17 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
+AC_ARG_WITH([mpd], AS_HELP_STRING([--without-mpd], [compile without libmpdclient support]))
+
+AS_IF([test "x$with_mpd" != "xno"],
+ [PKG_CHECK_MODULES([MPD], [libmpdclient], [have_libmpdclient=yes], [have_libmpdclient=no])],
+ [have_libmpdclient=no])
+
+AS_IF([test "x$have_libmpdclient" = "xyes"], [], [
+ AC_DEFINE([DISABLE_WIDGET_NOW_PLAYING_MPD], [], [disable libmpdclient])
+ AS_IF([test "x$with_mpd" = "xyes"], [AC_MSG_ERROR([libmpdclient requested but not found])])
+ ])
+
# Remove if you wish to see full compiler command lines
AM_SILENT_RULES([yes])
@@ -14,7 +25,6 @@ PKG_CHECK_MODULES([XCB], [xcb-util xcb-ewmh xcb-icccm])
PKG_CHECK_MODULES([JSON_GLIB], [jansson])
PKG_CHECK_MODULES([CURL], [libcurl])
PKG_CHECK_MODULES([ALSA], [alsa])
-PKG_CHECK_MODULES([MPD], [libmpdclient])
AC_CONFIG_FILES([
Makefile
We only need to find a way to remove src/widgets/now_playing_mpd.c from the sources array in makefile.am for this to work.
Would it be possible to remove the widgets from the source array and do something like this instead in widgets.h?
#ifndef DISABLE_WIDGET_NOW_PLAYING_MPD
#include "now_playing_mpd.c"
#endif
I know you mentioned #including .c files was bad practice, do you have any suggestions to resolve this issue?
from candybar.
Use _SOURCES += file.c add one at a time
from candybar.
Did you get it? Im on the phone i cant see the diff
from candybar.
Yep, I'm on it, almost done with the patch now.
from candybar.
Related Issues (20)
- Netctl Widget
- System monitor (like conky)
- Allow hiding empty desktops on desktops widget
- candybar fails to build with '-Werror' flag HOT 8
- White status line with html text on installation in NixOS
- AUR package not loneger exists
- Does not build with archlinux / latest gcc HOT 3
- pthreads related segfault HOT 12
- Build fail on volume.c HOT 3
- Command widget to spawn processes HOT 2
- Add WebKit web inspector while debugging. HOT 2
- WARNING timed out waiting for widget battery to exit HOT 1
- candybar doesn't seem track the mouse exiting its window vertically HOT 1
- weather: "unit" : "f" returns non integer HOT 2
- now_playing_mpris doesn't display playing song on startup
- desktops_i3 seems flaky HOT 1
- candybar segmentation fault HOT 6
- i3ipc-glib no longer needed HOT 6
- Feature Request: Support openbox also. HOT 3
- Core dump on close
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from candybar.