Last active
December 22, 2015 23:09
-
-
Save NuckChorris/6544879 to your computer and use it in GitHub Desktop.
Adds true transparency to AwesomeWM's wibox, so you can use fancy compositor features like blurs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: PKGBUILD 97098 2013-09-12 18:19:17Z seblu $ | |
# Maintainer: Sébastien Luttringer | |
# Contributor: xduugu | |
# Contributor: Ronald van Haren <ronald.archlinux.org> | |
# Contributor: Vesa Kaihlavirta | |
pkgname=awesome | |
pkgver=3.5.1 | |
pkgrel=2 | |
pkgdesc='Highly configurable framework window manager' | |
arch=('i686' 'x86_64') | |
url='http://awesome.naquadah.org/' | |
license=('GPL2') | |
depends=( | |
'cairo' | |
'dbus' | |
'gdk-pixbuf2' | |
'imlib2' | |
'libxcursor' | |
'libxdg-basedir' | |
'lua' | |
'lua-lgi' | |
'pango' | |
'startup-notification' | |
'xcb-util-image' | |
'xcb-util-keysyms' | |
'xcb-util-wm' | |
'xorg-xmessage' | |
) | |
makedepends=( | |
'asciidoc' | |
'cmake' | |
'docbook-xsl' | |
'doxygen' | |
'imagemagick' | |
'ldoc' | |
'xmlto' | |
) | |
optdepends=( | |
'rlwrap: readline support for awesome-client' | |
'dex: autostart your desktop files' | |
'vicious: widgets for the Awesome window manager' | |
) | |
provides=('notification-daemon') | |
source=("$url/download/$pkgname-$pkgver.tar.xz" | |
"true-transparency.patch") | |
md5sums=('f528f66ddcdb07f24e6f494837371702' | |
'dd8d3734c516a4ac25137121e975e46a') | |
prepare() { | |
cd $pkgname-$pkgver | |
patch -p1 -i "$srcdir/true-transparency.patch" | |
} | |
build() { | |
cd $pkgname-$pkgver | |
cmake \ | |
-DCMAKE_BUILD_TYPE=RELEASE \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DSYSCONFDIR=/etc \ | |
-DLUA_LIBRARY=/usr/lib/liblua.so.5.2 | |
make | |
} | |
package() { | |
cd $pkgname-$pkgver | |
make DESTDIR="$pkgdir" install | |
# install desktop file so you can start awesome from your login manager | |
install -Dm644 awesome.desktop "$pkgdir/usr/share/xsessions/awesome.desktop" | |
} | |
# vim:set ts=2 sw=2 et: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 1f48339f863609f89293e83b75ec25f2fea028ed Mon Sep 17 00:00:00 2001 | |
From: Peter Lejeck <[email protected]> | |
Date: Thu, 12 Sep 2013 15:51:44 -0700 | |
Subject: [PATCH] Add true transparency, instead of pseudotransparency | |
--- | |
lib/wibox/drawable.lua.in | 18 +++--------------- | |
1 file changed, 3 insertions(+), 15 deletions(-) | |
diff --git a/lib/wibox/drawable.lua.in b/lib/wibox/drawable.lua.in | |
index a31e618..c27f7dc 100644 | |
--- a/lib/wibox/drawable.lua.in | |
+++ b/lib/wibox/drawable.lua.in | |
@@ -28,13 +28,9 @@ local function do_redraw(self) | |
-- Draw the background | |
cr:save() | |
- -- This is pseudo-transparency: We draw the wallpaper in the background | |
- local wallpaper = surface(capi.root.wallpaper()) | |
- if wallpaper then | |
- cr.operator = cairo.Operator.SOURCE | |
- cr:set_source_surface(wallpaper, -x, -y) | |
- cr:paint() | |
- end | |
+ -- This is real transparency: clear the canvas | |
+ cr.operator = cairo.Operator.CLEAR | |
+ cr:paint() | |
cr.operator = cairo.Operator.OVER | |
cr:set_source(self.background_color) | |
@@ -261,14 +257,6 @@ function drawable.new(d, widget_arg) | |
return ret | |
end | |
--- Redraw all drawables when the wallpaper changes | |
-capi.awesome.connect_signal("wallpaper_changed", function() | |
- local k | |
- for k in pairs(drawables) do | |
- k() | |
- end | |
-end) | |
- | |
--- Handling of drawables. A drawable is something that can be drawn to. | |
-- @class table | |
-- @name drawable | |
-- | |
1.8.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment