ion3 added

This commit is contained in:
Kolan Sh 2012-06-24 16:53:32 +04:00
parent bbfa5bfbc0
commit 0579b56dcd
9 changed files with 751 additions and 0 deletions

16
x11-wm/ion3/ChangeLog Normal file
View File

@ -0,0 +1,16 @@
# ChangeLog for x11-wm/ion3
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
18 Apr 2010; Rafael Goncalves Martins <rafael@rafaelmartins.eng.br>
ion3-20090110-r1.ebuild:
Fixed URLs of sources. The official website is offline.
*ion3-20090110-r1 (24 Jan 2010)
24 Jan 2010; Rafael Goncalves Martins <rafael@rafaelmartins.eng.br>
+files/ion-3-20090526.diff, +files/ion-3plus.proportional.patch,
+files/ion3-fix_build_system.patch, +files/ion3.desktop,
+files/pwm3.desktop, +ion3-20090110-r1.ebuild:
Initial import.

24
x11-wm/ion3/Manifest Normal file
View File

@ -0,0 +1,24 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
AUX ion-3-20090526.diff 5498 RMD160 f983bbd6785f3a3527a1cbf2cdb39135aebbfac1 SHA1 cdeba4e57b3d33f0585207cf8cb737a98f9ace9c SHA256 a4b8465aeb5627c29a8d7d35be6ba1013bcda5a0d7cf051300afa744d4315e48
AUX ion-3plus.proportional.patch 11146 RMD160 80b3c31c95f3a3220e14cff3613bc7a99f44561c SHA1 0c53ee6ec69fc4b3b4cfa56e4a7d30883ed1daac SHA256 5744d219b98ca2fb2c6204546032172b76a9de7f3e671c42086f700881eeb878
AUX ion3-fix_build_system.patch 2039 RMD160 24bd3ce9ad4415fb4098f0326099f9f3a5c71e3a SHA1 b865f06baa3f7dc346091a3e53e8c2bce5032940 SHA256 91148708cc116439b1f769bf634121ad9acdf46821bf7aa2b24dac20f860838c
AUX ion3.desktop 217 RMD160 438917d6c0370e7a368598ea611ec7658312627d SHA1 cf5cd1f09faf7530f8cb2f832a17c0cf893541c4 SHA256 4742797e200b956abf3d0b94d860aa7430c9f67a97f3640ef2c28168fa773bb9
AUX pwm3.desktop 170 RMD160 7a33137ccf3857cacd7ff693df2e8952e16e3a84 SHA1 7ff6792b6e61a9a2fbb4f0fa7e3d9dbf856c8d28 SHA256 e068670634d31e58db4f54e703707f7908d30ced7f765e30ab590615b3d5dccd
DIST ion-3-20090110.tar.gz 643971 RMD160 b67f7731b0e86fa41486482aaac3e3476bf9b59c SHA1 01d1574060520abcb16f511fac25e4b9f20137e7 SHA256 daf6c43e67ec477fa274a57d7d20059dd76f66cce2ed3e9db706a59254d173da
DIST ion-doc-3-20090110.tar.gz 931777 RMD160 5ea4f16fbf2749be87a1411efe5f021bf9fb7d4a SHA1 4148ee777fbf7ed14e6e56b32b4fc116251d920a SHA256 52e9aafc545aeb564b73b947268c4a082d8044489ac446e568b69122bc5d7f53
EBUILD ion3-20090110-r1.ebuild 2444 RMD160 d712d9eeea23d7224b56f373b81173748fe6f24a SHA1 8982972db807ba244f0ba2aff444ff9bc13acb97 SHA256 697254111a6ff1b29479f472d231fe89e2f1c53818a94e17b56e0523d46effb9
MISC ChangeLog 565 RMD160 b6403fc2529bf3db30bae4110b78fa7a8675c445 SHA1 fb50fbb7c2083b76468b41951090145bd832ec8a SHA256 10b90b57048e8aef3cab3045d1c6c90725d54925e73d6a8d8b9717cf4dbd22fe
MISC metadata.xml 653 RMD160 ba334c164775604877496f35bdec6195d878a1e2 SHA1 faf4ce1cc50aad7f14abf035a19c2469825ba5c1 SHA256 f4d80290b4eb15f59066cbc3e72801cdd3982838f399a67ee7ef4c19f97e6b38
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
iQEcBAEBAgAGBQJLy5m3AAoJEMmH5mwCk1NvnnsIAI1rk/vx0pguTKOTHCPfzxpn
KuvZSqi3gMTR66rR48SFpJqqn94yk2ZX3nlcSsX+mV7nzhVX1CWbdEhpNW5ItbnS
UrOnrbUnEPhrDdG76zwDvQr7bF4dopphTC1v9U6YorN3mY2rjRFxCnZQucPqZ2tS
iQOC7O2qtE7nK8jz0bYoVdDfD3Ia1K/aRk/U9nbi7g4LVp06v/WWfJPEv7V4ILcR
zaU2fLeDGqQlWkBZmvFGo0EsLuGOpHbiEuUVmAENBvTD3Q2NcRk4sLnV82gsIY7B
uY73T2e3HiLmnt7ig81AUBV1mHDgaUh6m+2ui1NGBNLaHkWXoiNkgGDJ7o0D1f0=
=peFD
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,142 @@
Mon Mar 2 10:30:41 W. Europe Standard Time 2009 Tuomo Valkonen <tuomov@iki.fi>
* Don't symlink look.lua, but rather dopath from within
Mon Mar 2 10:09:36 W. Europe Standard Time 2009 Tuomo Valkonen <tuomov@iki.fi>
* Fix frame_clear_shape
Sun Feb 8 23:37:32 W. Europe Standard Time 2009 Tuomo Valkonen <tuomov@iki.fi>
* WM_TAKE_FOCUS tune
Fri Jan 9 23:19:32 W. Europe Standard Time 2009 Tuomo Valkonen <tuomov@iki.fi>
tagged ion-3-20090110
diff -rN -u old-ion-3/config.h new-ion-3/config.h
--- old-ion-3/config.h 2009-05-26 19:09:08.172555900 +0200
+++ new-ion-3/config.h 2009-05-26 19:09:15.984855900 +0200
@@ -1,4 +1,4 @@
-/*
+/*
* config.h
*
* Copyright (c) Tuomo Valkonen 1999-2009.
diff -rN -u old-ion-3/etc/Makefile new-ion-3/etc/Makefile
--- old-ion-3/etc/Makefile 2009-05-26 19:09:15.359871900 +0200
+++ new-ion-3/etc/Makefile 2009-05-26 19:09:16.344221700 +0200
@@ -11,6 +11,7 @@
ETC = cfg_ion.lua cfg_ioncore.lua cfg_kludges.lua cfg_defaults.lua \
cfg_tiling.lua cfg_query.lua cfg_menu.lua \
cfg_statusbar.lua cfg_dock.lua cfg_layouts.lua \
+ look.lua \
look_brownsteel.lua look_clean.lua look_dusky.lua \
look_greyviolet.lua look_ios.lua look_cleanviolet.lua \
look_simpleblue.lua look_cleanios.lua look_newviolet.lua \
@@ -24,5 +25,3 @@
######################################
_install: etc_install
- rm -f $(ETCDIR)/look.lua
- ln -s look_newviolet.lua $(ETCDIR)/look.lua
diff -rN -u old-ion-3/etc/look.lua new-ion-3/etc/look.lua
--- old-ion-3/etc/look.lua 1970-01-01 01:00:00.000000000 +0100
+++ new-ion-3/etc/look.lua 2009-05-26 19:09:16.484843100 +0200
@@ -0,0 +1 @@
+dopath('look_newviolet')
diff -rN -u old-ion-3/ioncore/clientwin.c new-ion-3/ioncore/clientwin.c
--- old-ion-3/ioncore/clientwin.c 2009-05-26 19:09:15.562991700 +0200
+++ new-ion-3/ioncore/clientwin.c 2009-05-26 19:09:17.125451700 +0200
@@ -1015,10 +1015,11 @@
{
if(cwin->flags&CLIENTWIN_P_WM_TAKE_FOCUS){
Time stmp=ioncore_get_timestamp();
+ region_finalise_focusing((WRegion*)cwin, cwin->win, warp, stmp);
send_clientmsg(cwin->win, ioncore_g.atom_wm_take_focus, stmp);
+ }else{
+ region_finalise_focusing((WRegion*)cwin, cwin->win, warp, CurrentTime);
}
-
- region_finalise_focusing((WRegion*)cwin, cwin->win, warp);
XSync(ioncore_g.dpy, 0);
}
diff -rN -u old-ion-3/ioncore/focus.c new-ion-3/ioncore/focus.c
--- old-ion-3/ioncore/focus.c 2009-05-26 19:09:15.531742500 +0200
+++ new-ion-3/ioncore/focus.c 2009-05-26 19:09:18.219173700 +0200
@@ -347,7 +347,7 @@
/*Time ioncore_focus_time=CurrentTime;*/
-void region_finalise_focusing(WRegion* reg, Window win, bool warp)
+void region_finalise_focusing(WRegion* reg, Window win, bool warp, Time time)
{
if(warp)
region_do_warp(reg);
@@ -356,10 +356,7 @@
return;
region_set_await_focus(reg);
- /*xwindow_do_set_focus(win);*/
- XSetInputFocus(ioncore_g.dpy, win, RevertToParent,
- CurrentTime/*ioncore_focus_time*/);
- /*ioncore_focus_time=CurrentTime;*/
+ XSetInputFocus(ioncore_g.dpy, win, RevertToParent, time);
}
diff -rN -u old-ion-3/ioncore/focus.h new-ion-3/ioncore/focus.h
--- old-ion-3/ioncore/focus.h 2009-05-26 19:09:15.484868700 +0200
+++ new-ion-3/ioncore/focus.h 2009-05-26 19:09:18.250422900 +0200
@@ -23,7 +23,7 @@
extern void region_warp(WRegion *reg); /* maybewarp TRUE */
extern void region_set_focus(WRegion *reg); /* maybewarp FALSE */
-extern void region_finalise_focusing(WRegion* reg, Window win, bool warp);
+extern void region_finalise_focusing(WRegion* reg, Window win, bool warp, Time time);
DYNFUN void region_do_set_focus(WRegion *reg, bool warp);
extern void region_do_warp(WRegion *reg);
diff -rN -u old-ion-3/ioncore/frame-draw.c new-ion-3/ioncore/frame-draw.c
--- old-ion-3/ioncore/frame-draw.c 2009-05-26 19:09:15.422370300 +0200
+++ new-ion-3/ioncore/frame-draw.c 2009-05-26 19:09:18.266047500 +0200
@@ -219,7 +219,8 @@
void frame_clear_shape(WFrame *frame)
{
- grbrush_set_window_shape(frame->brush, TRUE, 0, NULL);
+ if(frame->brush!=NULL)
+ grbrush_set_window_shape(frame->brush, TRUE, 0, NULL);
}
diff -rN -u old-ion-3/ioncore/group.c new-ion-3/ioncore/group.c
--- old-ion-3/ioncore/group.c 2009-05-26 19:09:15.453619500 +0200
+++ new-ion-3/ioncore/group.c 2009-05-26 19:09:18.969154500 +0200
@@ -241,7 +241,7 @@
if(st!=NULL && st->reg!=NULL)
region_do_set_focus(st->reg, warp);
else
- region_finalise_focusing((WRegion*)ws, ws->dummywin, warp);
+ region_finalise_focusing((WRegion*)ws, ws->dummywin, warp, CurrentTime);
}
diff -rN -u old-ion-3/ioncore/window.c new-ion-3/ioncore/window.c
--- old-ion-3/ioncore/window.c 2009-05-26 19:09:15.437994900 +0200
+++ new-ion-3/ioncore/window.c 2009-05-26 19:09:21.562838100 +0200
@@ -182,7 +182,7 @@
void window_do_set_focus(WWindow *wwin, bool warp)
{
- region_finalise_focusing((WRegion*)wwin, wwin->win, warp);
+ region_finalise_focusing((WRegion*)wwin, wwin->win, warp, CurrentTime);
}
diff -rN -u old-ion-3/mod_tiling/tiling.c new-ion-3/mod_tiling/tiling.c
--- old-ion-3/mod_tiling/tiling.c 2009-05-26 19:09:15.437994900 +0200
+++ new-ion-3/mod_tiling/tiling.c 2009-05-26 19:09:24.609635100 +0200
@@ -158,7 +158,7 @@
void tiling_fallback_focus(WTiling *ws, bool warp)
{
- region_finalise_focusing((WRegion*)ws, ws->dummywin, warp);
+ region_finalise_focusing((WRegion*)ws, ws->dummywin, warp, CurrentTime);
}

View File

@ -0,0 +1,350 @@
diff -rN -ubp old-ion-3plus/ioncore/frame.c new-ion-3plus/ioncore/frame.c
--- old-ion-3plus/ioncore/frame.c 2009-03-15 11:57:04.000000000 +0100
+++ new-ion-3plus/ioncore/frame.c 2009-03-15 11:57:04.000000000 +0100
@@ -100,7 +100,8 @@ bool frame_init(WFrame *frame, WWindow *
frame->brush=NULL;
frame->bar_brush=NULL;
frame->mode=mode;
- frame->tab_min_w=0;
+ frame->float_tab_min_w=0;
+ frame->propor_tab_min_w=0;
frame->bar_max_width_q=1.0;
gr_stylespec_init(&frame->baseattr);
@@ -282,29 +283,61 @@ int frame_nth_tab_x(WFrame *frame, int n
}
+void frame_get_max_width_and_elastic(WFrame * frame,int bar_w,int *maxw,int *elastic,int *minw);//FIXME
+
static int frame_nth_tab_w_iw(WFrame *frame, int n, bool inner)
{
WRectangle bg;
GrBorderWidths bdw=GR_BORDER_WIDTHS_INIT;
int m=FRAME_MCOUNT(frame);
+ int maxw,elastic,textw,minw;
uint w;
+ WRegion *sub;
+ const char * p;
- frame_bar_geom(frame, &bg);
+//fprintf(stderr,"HERE\n");
- if(m==0)
- m=1;
+ frame_bar_geom(frame, &bg);
if(frame->bar_brush!=NULL)
grbrush_get_border_widths(frame->bar_brush, &bdw);
+ if(m==0){
+ m=1;
+ w=bg.w-bdw.left-bdw.right;
+ }else{
+ frame_get_max_width_and_elastic(frame, bg.w, &maxw, &elastic, &minw);
+ if ((maxw > 0) && (maxw <= frame->propor_tab_min_w)) {
/* Remove borders */
w=bg.w-bdw.left-bdw.right-(bdw.tb_ileft+bdw.tb_iright+bdw.spacing)*(m-1);
-
+//fprintf(stderr,"HEREmin maxw:%i minw:%i totalw:%i pad:%i w:%i (????)\n",maxw,minw,bg.w,elastic,w);
if(w<=0)
return 0;
-
/* Get n:th tab's portion of free area */
w=(((n+1)*w)/m-(n*w)/m);
+ }else{
+
+ /* Get n:th tab's portion of elastic area */
+ elastic=(((n+1)*elastic)/m-(n*elastic)/m);
+
+ sub = mplex_mx_nth((WMPlex*)frame, n);
+ p=region_displayname(sub);
+ if(p==NULL)
+ textw=0;
+ else
+ textw=grbrush_get_text_width(frame->bar_brush,
+ p, strlen(p));
+ if (textw<minw)
+ textw=minw;
+ if (textw<frame->propor_tab_min_w)
+ textw=frame->propor_tab_min_w;
+
+ if (maxw>0 && (textw>maxw))
+ textw=maxw;
+ w=elastic+textw;
+//fprintf(stderr,"HEREsub %p maxw:%i minw:%i totalw:%i pad:%i w:%i (%s)\n",(void *)sub,maxw,minw,bg.w,elastic,w,p);
+ }
+ }
/* Add n:th tab's borders back */
if(!inner){
@@ -312,6 +345,7 @@ static int frame_nth_tab_w_iw(WFrame *fr
w+=(n==m-1 ? bdw.right : bdw.tb_iright+bdw.spacing);
}
+//fprintf(stderr,"THERE\n");
return w;
}
diff -rN -ubp old-ion-3plus/ioncore/frame-draw.c new-ion-3plus/ioncore/frame-draw.c
--- old-ion-3plus/ioncore/frame-draw.c 2009-03-15 11:57:04.000000000 +0100
+++ new-ion-3plus/ioncore/frame-draw.c 2009-03-15 11:57:04.000000000 +0100
@@ -225,10 +225,11 @@ void frame_clear_shape(WFrame *frame)
#define CF_TAB_MAX_TEXT_X_OFF 10
+void frame_get_max_width_and_elastic(WFrame * frame,int bar_w,int *maxw,int *elastic, int *minw);//FIXME
static void frame_shaped_recalc_bar_size(WFrame *frame, bool complete)
{
- int bar_w=0, textw=0, tmaxw=frame->tab_min_w, tmp=0;
+ int bar_w=0, textw, w, tmaxw, tminw, tmp=0;
WLListIterTmp itmp;
WRegion *sub;
const char *p;
@@ -241,43 +242,41 @@ static void frame_shaped_recalc_bar_size
return;
m=FRAME_MCOUNT(frame);
+ bar_w=frame->bar_max_width_q*REGION_GEOM(frame).w;
if(m>0){
- grbrush_get_border_widths(frame->bar_brush, &bdw);
- bdtotal=((m-1)*(bdw.tb_ileft+bdw.tb_iright+bdw.spacing)
- +bdw.right+bdw.left);
+
+ frame_get_max_width_and_elastic(frame, bar_w, &tmaxw, &tmp, &tminw);
+//fprintf(stderr," * WID total:%i maxw:%i minw:%i elastic:%i m:%i\n",bar_w,tmaxw,tminw,tmp,m);
+ if ((tmaxw < 0) && (tminw == frame->float_tab_min_w)) {
+ /* No label truncation needed, good. See how much can be padded. */
+ w=bar_w-tmp;
FRAME_MX_FOR_ALL(sub, frame, itmp){
p=region_displayname(sub);
if(p==NULL)
continue;
- textw=grbrush_get_text_width(frame->bar_brush,
- p, strlen(p));
- if(textw>tmaxw)
- tmaxw=textw;
+ textw=2*CF_TAB_MAX_TEXT_X_OFF+
+ grbrush_get_text_width(frame->bar_brush,
+ p, strlen(p))-
+ frame->float_tab_min_w;
+//fprintf(stderr," * WID addtextw:%i\n",textw);
+ if (textw>=2*CF_TAB_MAX_TEXT_X_OFF)
+ w+=2*CF_TAB_MAX_TEXT_X_OFF;
+ else if (textw >=0)
+ w+=textw;
}
+ if (bar_w>w)/*Padded to much*/
+ bar_w=w;
- bar_w=frame->bar_max_width_q*REGION_GEOM(frame).w;
- if(bar_w<frame->tab_min_w &&
- REGION_GEOM(frame).w>frame->tab_min_w)
- bar_w=frame->tab_min_w;
-
- tmp=bar_w-bdtotal-m*tmaxw;
-
- if(tmp>0){
- /* No label truncation needed, good. See how much can be padded. */
- tmp/=m*2;
- if(tmp>CF_TAB_MAX_TEXT_X_OFF)
- tmp=CF_TAB_MAX_TEXT_X_OFF;
- bar_w=(tmaxw+tmp*2)*m+bdtotal;
- }else{
+ } else {
/* Some labels must be truncated */
}
+
}else{
- bar_w=frame->tab_min_w;
- if(bar_w>frame->bar_max_width_q*REGION_GEOM(frame).w)
- bar_w=frame->bar_max_width_q*REGION_GEOM(frame).w;
+ if(bar_w>frame->float_tab_min_w)
+ bar_w=frame->float_tab_min_w;
}
if(complete || frame->bar_w!=bar_w){
@@ -302,9 +301,133 @@ static int init_title(WFrame *frame, int
}
+/* Proportional tabs algorithm:
+ * Sort tabs by text sizes.
+ * From smallest to largest do:
+ * Compare current tab width with remaining width (incl. current)
+ divided by no. of remaining tabs (incl. current).
+ * If larger or equal, then set maximum width to the number computed
+ above and set elastic space to zero (resp. to remain after division).
+ (Return.)
+ * If smaller, subctract current width from remaining width and
+ subtract one from no. of remaining tabs. If this is the last
+ tab, then set additional padding to remaining width divided
+ by total number of tabs.
+
+ Do not use w for shaped frames.
+*/
+void frame_get_max_width_and_elastic(WFrame * frame,int bar_w,int *maxw,int *elastic, int *minw){
+ /* Dummy implementation O(n^2), instead of O(n*log(n)) */
+ int textw=0,tmp,tmaxw,tminw=frame->propor_tab_min_w;
+ WLListIterTmp itmp;
+ WRegion *sub;
+ const char *p;
+ GrBorderWidths bdw;
+ //char *title;
+ uint bdtotal,curw,nextw;
+ int i, m, n;
+
+ m=FRAME_MCOUNT(frame);
+ *minw=0;
+
+// if(frame->bar_brush==NULL)
+// *elastic=0;
+// *maxw=-1;
+//fprintf(stderr,"ZERR\n");
+// return;
+ if(m>0){
+ grbrush_get_border_widths(frame->bar_brush, &bdw);
+ bdtotal=((m-1)*(bdw.tb_ileft+bdw.tb_iright+bdw.spacing)
+ +bdw.right+bdw.left);
+ tmp = bar_w - bdtotal;
+//fprintf(stderr,"TMPST:%i barw:%i bdt:%i\n",tmp,bar_w,bdtotal);
+
+ curw=0;
+ n=m;
+
+ while (n>0) {
+ nextw=(uint)-1;/*FIXME: MAXINT*/
+ if ((signed)curw*n >= tmp) {
+ /*Remainig tabs are too large => equal width.*/
+ *maxw=tmp/n;
+ *elastic=tmp-(*maxw)*n;
+//fprintf(stderr,"TRUNC maxw:%i elastic:%i tmp:%i n:%i\n",*maxw,*elastic,tmp,n);
+ return;
+ }
+ FRAME_MX_FOR_ALL(sub, frame, itmp){
+ p=region_displayname(sub);
+ if(p==NULL)
+ continue;
+
+ textw=grbrush_get_text_width(frame->bar_brush,
+ p, strlen(p));
+ if (textw<tminw)
+ textw=tminw;
+ if((unsigned)textw == curw){
+//fprintf(stderr,"TW:%i (%s)\n",textw,p);
+ tmp-=textw;
+ n--;
+ } else if((unsigned)textw>curw){
+ if ((unsigned)textw<nextw)
+ nextw=textw;
+ }
+ }
+ curw = nextw;
+ }
+//fprintf(stderr,"TMP elastic:%i\n",tmp);
+
+ n=0;
+ curw=0;
+ /*We have some padding left. Try to enlarge small tabs*/
+ while (n<m) {
+ nextw=(uint)-1;/*FIXME: MAXINT*/
+ FRAME_MX_FOR_ALL(sub, frame, itmp){
+ p=region_displayname(sub);
+ if(p==NULL)
+ continue;
+
+ textw=grbrush_get_text_width(frame->bar_brush,
+ p, strlen(p));
+ if (textw<tminw)
+ textw=tminw;
+ if((unsigned)textw == curw){
+ n++;
+ } else if((unsigned)textw>curw){
+ if ((unsigned)textw<nextw)
+ nextw=textw;
+ }
+ }
+ if (nextw>(unsigned)frame->float_tab_min_w)
+ nextw=frame->float_tab_min_w;
+//fprintf(stderr,"TMP --- tmp:%i n:%i curw:%i nextw:%i min:%i\n",tmp,n,curw,nextw,*minw);
+ if (n*(nextw-curw)<(unsigned)tmp) {
+ /*we can extend small tabs to 'nextw'*/
+ *minw=nextw;
+ tmp-=n*(nextw-curw);
+//fprintf(stderr,"TMPSUBGO tmp:%i n:%i curw:%i nextw:%i min:%i\n",tmp,n,curw,nextw,*minw);
+ } else {
+ /*we can extend small tabs only to 'curw+tmp/n'*/
+ *minw+=tmp/n;
+ tmp-=(*minw-curw)*n;
+//fprintf(stderr,"TMPSUBBRK tmp:%i n:%i curw:%i nextw:%i min:%i\n",tmp,n,curw,nextw,*minw);
+ break;
+ }
+ if (nextw==(unsigned)frame->float_tab_min_w)
+ break;
+ curw=nextw;
+ }
+
+//fprintf(stderr,"TMP elastic:%i min:%i\n",tmp,*minw);
+ *elastic=tmp;
+ } else {
+ *elastic=0;
+ }
+ *maxw=-1;
+}
+
void frame_recalc_bar(WFrame *frame, bool complete)
{
- int textw, i;
+ int textw, i, maxw, padding;
WLListIterTmp tmp;
WRegion *sub;
char *title;
@@ -357,7 +480,8 @@ void frame_draw_bar(const WFrame *frame,
grbrush_init_attr(frame->bar_brush, &frame->baseattr);
grbrush_draw_textboxes(frame->bar_brush, &geom, frame->titles_n,
- frame->titles, complete);
+ //frame->titles, complete);
+ frame->titles, TRUE);
grbrush_end(frame->bar_brush);
}
@@ -427,14 +551,17 @@ void frame_brushes_updated(WFrame *frame
frame->bar_h=bdw.top+bdw.bottom+fnte.max_height;
}
+ //FIXME
+ frame->propor_tab_min_w=30;
+
/* shaped mode stuff */
- frame->tab_min_w=100;
+ frame->float_tab_min_w=100;
frame->bar_max_width_q=0.95;
if(grbrush_get_extra(frame->brush, "floatframe_tab_min_w",
- 'i', &(frame->tab_min_w))){
- if(frame->tab_min_w<=0)
- frame->tab_min_w=1;
+ 'i', &(frame->float_tab_min_w))){
+ if(frame->float_tab_min_w<=0)
+ frame->float_tab_min_w=1;
}
if(grbrush_get_extra(frame->brush, "floatframe_bar_max_w_q",
diff -rN -ubp old-ion-3plus/ioncore/frame.h new-ion-3plus/ioncore/frame.h
--- old-ion-3plus/ioncore/frame.h 2009-03-15 11:57:04.000000000 +0100
+++ new-ion-3plus/ioncore/frame.h 2009-03-15 11:57:04.000000000 +0100
@@ -76,7 +76,8 @@ DECLCLASS(WFrame){
WFrameBarMode barmode;
int bar_w, bar_h;
double bar_max_width_q;
- int tab_min_w;
+ int float_tab_min_w;
+ int propor_tab_min_w;
};

View File

@ -0,0 +1,69 @@
diff -uNr ion-3-20090110.orig/build/rules.mk ion-3-20090110/build/rules.mk
--- ion-3-20090110.orig/build/rules.mk 2010-01-03 18:25:15.790364065 -0200
+++ ion-3-20090110/build/rules.mk 2010-01-03 18:31:38.746612387 -0200
@@ -267,5 +267,5 @@
# Defaults
######################################
-INSTALL_STRIP ?= -s
+INSTALL_STRIP ?=
INSTALLBIN ?= $(INSTALL) $(INSTALL_STRIP) -m $(BIN_MODE)
diff -uNr ion-3-20090110.orig/system.mk ion-3-20090110/system.mk
--- ion-3-20090110.orig/system.mk 2010-01-03 18:25:15.815367048 -0200
+++ ion-3-20090110/system.mk 2010-01-03 18:29:55.384633453 -0200
@@ -8,7 +8,7 @@
# Installation path prefix. Unless you know what you're doing, the default
# of /usr/local is likely the correct choice.
-PREFIX=/usr/local
+PREFIX=/usr
# Unless you are creating a package conforming to some OS's standards, you
# probably do not want to modify the following directories:
@@ -16,7 +16,7 @@
# Main binaries
BINDIR=$(PREFIX)/bin
# Configuration .lua files
-ETCDIR=$(PREFIX)/etc/ion3
+ETCDIR=/etc/ion3
# Some .lua files and ion-* shell scripts
SHAREDIR=$(PREFIX)/share/ion3
# Manual pages
@@ -62,7 +62,7 @@
# If you have installed Lua 5.1 from the official tarball without changing
# paths, this should do it.
-LUA_DIR=/usr/local
+LUA_DIR=/usr
LUA_LIBS = -L$(LUA_DIR)/lib -llua
LUA_INCLUDES = -I$(LUA_DIR)/include
LUA=$(LUA_DIR)/bin/lua
@@ -81,7 +81,7 @@
##
# Paths
-X11_PREFIX=/usr/X11R6
+X11_PREFIX=/usr
# SunOS/Solaris
#X11_PREFIX=/usr/openwin
@@ -157,8 +157,8 @@
-Wtrigraphs -Wformat -Wchar-subscripts \
-Wparentheses -pedantic -Wuninitialized
-CFLAGS=-Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES)
-LDFLAGS=$(LIBS) $(EXTRA_LIBS)
+CFLAGS += $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES)
+LDFLAGS += $(LIBS) $(EXTRA_LIBS)
EXPORT_DYNAMIC=-Xlinker --export-dynamic
# The following options are mainly for development use and can be used
@@ -208,7 +208,7 @@
##
INSTALL=sh $(TOPDIR)/install-sh -c
-INSTALL_STRIP=-s
+INSTALL_STRIP=
INSTALLDIR=mkdir -p
BIN_MODE=755

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Name=Ion3
Comment=A tiling tabbed window manager designed with keyboard users in mind.
Exec=ion3
TryExec=ion3
# no icon yet, only the top three are currently used
Icon=
Type=Application

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Name=PWM3
Comment=An X11 window manager
Exec=pwm3
TryExec=pwm3
# no icon yet, only the top three are currently used
Icon=
Type=Application

View File

@ -0,0 +1,113 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils
PATCH_VERSION="20090526"
MY_PN="ion-3"
MY_P="${MY_PN}-${PV}"
MY_P_DOC="ion-doc-3-${PV}"
DESCRIPTION="A tiling tabbed window manager designed with keyboard users in mind"
HOMEPAGE="http://modeemi.fi/~tuomov/ion/"
SRC_URI="http://files.rafaelmartins.eng.br/distfiles/${MY_P}.tar.gz
doc? ( http://files.rafaelmartins.eng.br/distfiles/${MY_P_DOC}.tar.gz )"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="proportional-tabs xscreensaver systray wallpaper doc"
DEPEND="dev-lang/lua
x11-libs/libX11
x11-libs/libSM
x11-libs/libXext
x11-libs/libICE"
RDEPEND="x11-apps/xrdb
systray? ( x11-misc/trayion )
xscreensaver? ( x11-misc/xscreensaver )
wallpaper? ( media-gfx/imagemagick )"
S="${WORKDIR}/${MY_P}"
S_DOC="${WORKDIR}/${MY_P_DOC}"
src_prepare(){
epatch "${FILESDIR}/${PN}-fix_build_system.patch"
if [ "${PATCH_VERSION:-}" != "" ]; then
epatch "${FILESDIR}/${MY_PN}-${PATCH_VERSION}.diff"
fi
if use proportional-tabs; then
epatch "${FILESDIR}/${MY_PN}plus.proportional.patch"
fi
if use systray; then
sed -i \
-e 's/max_/--max_/' \
-e 's/min_/--min_/' \
etc/cfg_kludges.lua || die 'sed failed.'
fi
if use xscreensaver; then
sed -i -e 's/xlock/xscreensaver-command -lock/' \
etc/cfg_ioncore.lua || die 'sed failed.'
fi
}
src_compile(){
emake -j1 || die 'emake failed.'
}
src_install(){
emake \
PREFIX="${D}/usr" \
ETCDIR="${D}/etc/${PN}" \
DOCDIR="${D}/usr/share/doc/${PF}" \
install || die 'emake install failed.'
ecompressdir "/usr/share/doc/${PF}"
insinto /usr/share/xsessions
doins "${FILESDIR}"/*.desktop
use doc && cd "${S_DOC}" && dodoc *.pdf
for i in ion3 pwm3; do
mv "${D}/usr/bin/${i}"{,-bin}
echo -e "#!/bin/bash\n\n[ -f ~/.Xresources ] && xrdb ~/.Xresources" \
> ${i}
if use wallpaper; then
echo -n "[ -f ~/.ion3/wallpaper ] && " >> ${i}
echo "display -window root ~/.ion3/wallpaper" >> ${i}
fi
if use systray; then
echo "(trayion&)" >> ${i}
fi
if use xscreensaver; then
echo "(xscreensaver&)" >> ${i}
fi
echo "exec ${i}-bin" >> ${i}
dobin ${i}
done
}
pkg_postinst() {
einfo 'Save your X settings to ~/.Xresources.'
if use wallpaper; then
einfo
einfo 'You have enabled the wallpaper USE flag.'
einfo 'Save your wallpaper at ~/.ion3/ with the name "wallpaper"'
fi
}

19
x11-wm/ion3/metadata.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>rafael@rafaelmartins.eng.br</email>
<name>Rafael Goncalves Martins</name>
</maintainer>
<longdescription lang="en">
Ion is a tiling tabbed window manager designed with keyboard users in
mind.
</longdescription>
<use>
<flag name="proportional-tabs">Adds support to proportionally sized tabs</flag>
<flag name="systray">Adds support to trayion, a systray aplication for Ion3</flag>
<flag name="wallpaper">Adds support to use wallpapers</flag>
</use>
</pkgmetadata>