You are not logged in.
Hey, first time XFCE user here. I'm loving it! As you can see from the screenshot below, the date plugin on xfce-panel is centered. The window title is centered too, but comparing eachother they're misaligned, why is that? I want to align the window title in the same way the panel does it, would that be possible? Thanks
EDIT: Not sure if I worded the title correctly, english isn't my native language, sorry
Last edited by guixxx (2017-04-09 16:26:19)
Offline
Hi guixxx
It's centralising between objects. Try for instance : Menu, settings, window manager, style ... and drag/drop a menu, shade and/or shade to the start of the Title ... and that will shift the centre of the Terminal title over a little. Or add something to the right hand side of the panel.
Offline
Thanks for your suggestions, rufwoof. I've tried adding the three remaining buttons to the left side to compensate, but for some reason their size are different from the minimize/maximize/close buttons, so the title isn't still 100% centered. I've also tested all custom xfce themes to see if some of them would actually centralize the window title the way I wanted (completely ignoring buttons, just like Mac OS does it), but unfortunately none of them did.
Last edited by guixxx (2017-04-09 05:29:09)
Offline
Good news! I've patched xfwm4 to behave the way I think looks better. I've made a PKGBUILD for Arch users:
# $Id$
# -------------
# Warning: This package was (poorly) patched to centralize window titles, ignoring any
# other object that a window may or may not have on the left or right side.
# BUGS? Hopefully none :D
# -------------
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: tobias <tobias funnychar archlinux.org>
pkgname=xfwm4-patch
_pkgname=xfwm4
pkgver=4.12.4
pkgrel=1
pkgdesc="Xfce window manager"
arch=('i686' 'x86_64')
url="http://www.xfce.org/"
license=('GPL2')
groups=('xfce4')
depends=('libxfce4ui' 'libwnck' 'libdrm' 'hicolor-icon-theme')
makedepends=('intltool')
provides=('xfwm4')
conflicts=('xfwm4')
source=(http://archive.xfce.org/src/xfce/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2
'centralize.patch')
sha256sums=('fa74048a75649a6e92df763a3cfb706d3fed1e1a6adf567f6693325a5a6efb36'
'SKIP')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
patch -p0 -i "$srcdir/centralize.patch"
}
build() {
cd "$srcdir/$_pkgname-$pkgver"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--localstatedir=/var \
--disable-static \
--enable-startup-notification \
--enable-randr \
--enable-compositor \
--enable-xsync \
--disable-debug
make
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
make DESTDIR="$pkgdir" install
}
# vim:set ts=2 sw=2 et:
Create a file named centralize.patch in the same directory you have the PKGBUILD file and paste this:
--- src/frame.c 2016-02-24 07:42:32.000000000 -0300
+++ src/frame.c 2017-04-09 12:36:51.100556257 -0300
@@ -496,6 +496,8 @@
hoffset = w3 - logical_rect.width - screen_info->params->title_horizontal_offset;
break;
case ALIGN_CENTER:
+ w5 += right;
+ w1 = (w5 / 2) - (w3 / 2) - w2;
hoffset = (w3 / 2) - (logical_rect.width / 2);
break;
}
@@ -525,7 +527,7 @@
w1 = right - w2 - w3 - w4 - screen_info->params->title_horizontal_offset;
break;
case ALIGN_CENTER:
- w1 = left + ((right - left) / 2) - (w3 / 2) - w2;
+ w1 = (w5 / 2) - (w3 / 2) - w2;
break;
}
if (w1 < left)
To install, just run makepkg -si. To actually test it, you have to restart xfwm4. Press Alt-F2, type in xfwm4 --replace and press Enter. Your window titles will now be centralized ignoring any action button (like OSx does):
Last edited by guixxx (2017-04-09 16:39:54)
Offline
Good news! I've patched xfwm4 to behave the way I think looks better. I've made a PKGBUILD for Arch users
That's awesome! I think you should open a pull request with this patch
Offline
guixxx wrote:Good news! I've patched xfwm4 to behave the way I think looks better. I've made a PKGBUILD for Arch users
That's awesome! I think you should open a pull request with this patch
Thanks! To be honest I don't know how to do that. Also, maybe the development team have a reason for not doing that? But you (or anyone else) can send them this patch on your name if you want, I don't care about credits.
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 556 KiB (Peak: 556.63 KiB) ]