Commit graph

100 commits

Author SHA1 Message Date
Tobias Blass 8976a47f62 [swaybar] fix non-dbus build
Swaybar's CMakeLists.txt uses the enable-tray option directly to decide whether to build the tray. This leads to a compilation error if dbus is not installed.
This patch uses the ENABLE_TRAY variable instead, which is only true if the user enabled the tray *and* dbus is available.
2017-07-20 23:03:16 +02:00
Hummer12007 c8370c9699 Disable -Wunused-result diagnostic
It caused unpredictable build failures with different build environments
2017-07-03 23:30:39 +03:00
Andrew Conrad edaa7e7119
Install wallpapers in DATADIR/backgrounds/sway 2017-06-14 22:30:42 -05:00
Calvin Lee 843ad38b3c Implement Tray Icons
This commit implements the StatusNotifierItem protocol, and enables
swaybar to show tray icons. It also uses `xembedsniproxy` in order to
communicate with xembed applications.
The tray is completely optional, and can be disabled on compile time
with the `enable-tray` option. Or on runtime with the bar config option
`tray_output none`.

Overview of changes:
In swaybar very little is changed outside the tray subfolder except
that all events are now polled in `event_loop.c`, this creates no
functional difference.

Six bar configuration options were added, these are detailed in
sway-bar(5)

The tray subfolder is where all protocol implementation takes place and
is organised as follows:

tray/sni_watcher.c:
	This file contains the StatusNotifierWatcher. It keeps track of
	items and hosts and reports when they come or go.
tray/tray.c
	This file contains the StatusNotifierHost. It keeps track of
	sway's version of the items and represents the tray itself.
tray/sni.c
	This file contains the StatusNotifierItem struct and all
	communication with individual items.
tray/icon.c
	This file implements the icon theme protocol. It allows for
	finding icons by name, rather than by pixmap.
tray/dbus.c
	This file allows for asynchronous DBus communication.

See #986 #343
2017-06-07 17:49:16 -07:00
johalun 7fef283044 FreeBSD fixes
Increase _POSIX_SOURCE value where needed.
Increase _XOPEN_SOURCE value where needed.
Conditionally link to libcap (only on Linux).
Possibly some trailing whitespace fixes (automatic).
2017-06-06 09:45:50 +02:00
Drew DeVault 5ed533a943 Revert "Drop epoll dependency"
This reverts commit 91f2bf81bf.
2017-05-17 13:11:49 -04:00
Drew DeVault 91f2bf81bf Drop epoll dependency 2017-05-17 13:10:33 -04:00
Sebastian Noack 173b338567 Add -DVERSION flag for release version numbers 2017-04-26 15:56:46 +02:00
JerziKaminsky aa6bd85da1 Add libcap check to CMake
- Moved ``<sys/capability.h>`` include inside `__linux__` guard,
  because all uses are similarly guarded.
- <sys/capability.h> is part of an optional devel package, at least
  in fedora. CMake now explicitly checks that libcap devel files
  are available.
- Added libcap to the list of install packages in .travis.yml, to
  make the dependency explicit. travis-ci installs the package by
  default, which is why this hasn't surfaced previously.
2017-04-07 03:14:16 +03:00
Drew DeVault 9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
Fabio Alessandro Locati c51e83f834
Make it work for all compilers 2017-02-25 23:39:04 +00:00
Fabio Alessandro Locati 6800c60d4b
Ignore Wimplicit-fallthrough 2017-02-25 18:21:55 +00:00
Mykyta Holubakha 138bcd0cfa Unset LD_LIBRARY_PATH, unless specified 2017-01-16 01:05:05 +02:00
Drew DeVault 6a1df17fb7 Fix user-set LD_LIBRARY_PATH 2016-12-27 19:39:37 -05:00
Wouter van Kesteren 09b9106550 Use CMAKE_INSTALL_FULL_DATA{,ROOT}DIR
Exherbo installs architecture dependent data in a different place than architecture
independent data. More concretely: binaries go in /usr/$chost/{bin,lib},
data goes in /usr/share and configs in /etc, /etc is already configurable
through CMAKE_INSTALL_FULL_SYSCONFDIR but the datadir was not. This
patch fixes it so that things can be pushed in the right places.
2016-12-17 01:00:39 +01:00
Greg V da26d69cb1 Fix build on FreeBSD
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf
- Add forgotten json-c include path to swaymsg/CMakeLists.txt
- Disable -Werror because of assert warnings
- Add correct /proc/pid/file path for FreeBSD
- Use libepoll-shim on FreeBSD
- Only use Linux capabilities on, well, Linux
2016-12-09 19:32:07 +03:00
Drew DeVault cb0ca3c301 Change name of ld-library-path cmake variable 2016-12-04 10:20:15 -05:00
Drew DeVault 0a1b211e09 Drop -Denable-binding-event 2016-12-02 16:01:33 -05:00
Drew DeVault a4e92ad272 Deal with LD_LIBRARY_PATH 2016-12-02 10:23:30 -05:00
Hummer12007 8fc9f503f9 Enable using non-annotated tags in git-describe
This fixes the version string
2016-07-12 13:44:19 +00:00
Drew DeVault 2c9553a6fd Set Cairo and Pango as required dependencies 2016-05-14 15:19:09 -04:00
Drew DeVault d541a02461 Turn off ZSH completions by default 2016-05-14 15:17:30 -04:00
Drew DeVault 3fa8df7b05 Add -Werror to C flags 2016-04-29 10:38:03 -04:00
Tomáš Čech 1124e78dda Respect supplied CMAKE_C_FLAGS 2016-04-28 20:19:40 +02:00
Drew DeVault a8e1ca75d0 New default wallpaper! 2016-03-18 18:23:30 -04:00
Mikkel Oscar Lyderik 4cbb09d566 cmake: fix libinput include dirs 2016-01-22 05:17:33 +01:00
Drew DeVault a6b19988c5 Merge pull request #440 from SethBarberee/zsh-completions
Basic Zsh auto-completion for --options
2016-01-19 18:50:12 -05:00
Cole Mickens 28081b7689 libinput 2016-01-19 06:51:36 -08:00
Seth Barberee fcd0071555 added basic zsh shell completion for sway, swaybg, and swaygrab 2016-01-17 22:06:26 -06:00
Mikkel Oscar Lyderik 93c93dd0f7 Make enable-binding-event option have an affect.
The option was added to late so it was never set in the build.
2016-01-09 20:25:45 +01:00
Drew DeVault b4ea9d492c Make wallpaper optional (cmake flag) 2016-01-08 18:49:42 -05:00
Mikkel Oscar Lyderik 15cbc53a77 Make IPC binding event support a compile time opt. 2016-01-08 15:03:25 +01:00
Mikkel Oscar Lyderik 18f8185011 Fix whitespaces in cmake config 2016-01-05 23:53:37 +01:00
Drew DeVault 5060c72a54 Add default wallpaper
Closes #238
2015-12-28 21:32:22 -05:00
Yacine Hmito 284720cf5f Added include(GNUInstallDirs)
Fixes configuration not properly installed since f02cf75
2015-12-23 16:40:28 +01:00
Yacine Hmito f02cf75ff3 Use SYSCONFDIR as recommended
- swaylock config path not hardcoded anymore
- the unusual and weird FALLBACK_CONFIG_DIR is no more
2015-12-23 12:22:48 +01:00
robotanarchy 470e59b291 fix backtrace detection in CMake
works on arch (glibc) and void linux (tested with musl libc) now
2015-12-22 00:32:41 +01:00
robotanarchy 03c041dd30 add -fPIC flag (position independent code) like in wlc
Linking fails otherwise:

Linking C executable ../bin/sway
/usr/bin/ld: CMakeFiles/sway.dir/commands.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
CMakeFiles/sway.dir/commands.c.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
sway/CMakeFiles/sway.dir/build.make:442: recipe for target 'bin/sway' failed
2015-12-21 19:10:49 +01:00
robotanarchy 94cac7a014 use CMake's FindBacktrace for backtrace feature detection 2015-12-21 19:01:17 +01:00
progandy 21014e606b make gdk-pixbuf dependency really optional 2015-12-20 17:37:52 +01:00
Drew DeVault 05e48835f7 Make some dependencies optional
Closes #368
2015-12-20 09:14:30 -05:00
Drew DeVault f62502e78d Drop sway-xorg.desktop 2015-12-18 18:21:55 -05:00
Drew DeVault 9c141f0bf1 Implement PAM password verification in swaylock 2015-12-17 08:44:30 -05:00
Drew DeVault f80481a37d Add swaylock subproject 2015-12-10 07:52:24 -05:00
Drew DeVault 7ed204eb02 Merge pull request #296 from progandy/pixbuf
Support for more image formats for wallpapers with gdk-pixbuf (#282)
2015-12-08 07:09:21 -05:00
progandy 3fdf4f811f swaybg: load more image formats with gdk-pixbuf2
travis: added gdk-pixbuf2 dependency
2015-12-07 23:31:44 +01:00
Christoph Gysin 99af7e7c9c move manpages to subfolders 2015-12-02 12:49:01 +02:00
Christoph Gysin cce9c338c0 cmake: build common code only once
This creates (static) libraries for protocols/, common/, and wayland/.
2015-12-02 12:15:57 +02:00
Christoph Gysin 38d4ee9f50 cmake: remove extra space 2015-12-01 22:47:22 +02:00
Christoph Gysin 92a3538381 cmake: extract sway 2015-12-01 22:47:22 +02:00