diff --git a/Slax/debian/modules/chromium b/Slax/debian/modules/chromium new file mode 100644 index 0000000..9c17559 --- /dev/null +++ b/Slax/debian/modules/chromium @@ -0,0 +1,9 @@ + +apt-get update +apt-get install --yes --no-install-recommends chromium + +. ../cleanup + +rm -Rf /usr/share/icons/gnome/256x256 + +savechanges /04-chromium.sb diff --git a/Slax/debian/modules/fluxbox b/Slax/debian/modules/fluxbox index cc0add8..ce76368 100644 --- a/Slax/debian/modules/fluxbox +++ b/Slax/debian/modules/fluxbox @@ -1,5 +1,13 @@ #!/bin/bash +# first install stock version +apt-get install --no-install-recommends --yes fluxbox +. ../cleanup +savechanges /fluxbox-stock.sb + +# then, we want to patch it to implement window resizing! +# so we will recompile whole package + NAME=fluxbox VERSION=1.3.5 @@ -16,8 +24,8 @@ apt-get source $NAME cd $NAME-$VERSION -cat $CWD/patches/fluxbox-border-resize.diff > debian/patches/fluxbox-border-resize.diff -echo fluxbox-border-resize.diff >> debian/patches/series +cat $CWD/patches/fluxbox-slax.diff > debian/patches/fluxbox-slax.diff +echo fluxbox-slax.diff >> debian/patches/series dpkg-buildpackage -us -uc @@ -25,4 +33,7 @@ rm -Rf debian/$NAME/DEBIAN rm -Rf debian/$NAME/usr/share/doc rm -Rf debian/$NAME/usr/share/images -savechanges /03-fluxbox.sb debian/$NAME +. ../cleanup +savechanges /fluxbox-mods.sb debian/$NAME + +# combine them together, todo diff --git a/Slax/debian/modules/patches/fluxbox-slax.diff b/Slax/debian/modules/patches/fluxbox-slax.diff new file mode 100644 index 0000000..57412a0 --- /dev/null +++ b/Slax/debian/modules/patches/fluxbox-slax.diff @@ -0,0 +1,79 @@ +--- a/src/Window.cc 2017-10-18 05:50:16.540916094 -0400 ++++ b/src/Window.cc 2017-10-18 05:50:35.381110991 -0400 +@@ -2744,6 +2744,14 @@ + m_button_grab_x = x - frame().x() - frame().window().borderWidth(); + m_button_grab_y = y - frame().y() - frame().window().borderWidth(); + ++ // If mouse clicked on the border, start window resize instead of move ++ if (m_button_grab_x <= 0 || m_button_grab_y <= 0 || m_button_grab_x >= frame().window().width() ++ || m_button_grab_y >= frame().window().height() ) { ++ ReferenceCorner dir = getResizeDirection(m_button_grab_x,m_button_grab_y,EDGEORCORNERRESIZE,frame().window().borderWidth(),frame().window().borderWidth()); ++ startResizing(m_button_grab_x, m_button_grab_y, dir); ++ return; ++ } ++ + moving = true; + + Fluxbox *fluxbox = Fluxbox::instance(); +--- a/src/FbTk/FbDrawable.hh ++++ b/src/FbTk/FbDrawable.hh +@@ -52,7 +52,8 @@ public: + LEFT, + RIGHT, + UP, +- DOWN ++ DOWN, ++ MENU + }; + + // x, y, width and height define a space within which we're drawing a triangle +--- a/src/ToolFactory.cc ++++ b/src/ToolFactory.cc +@@ -110,6 +142,9 @@ ToolbarItem *ToolFactory::create(const s + if (name.find("prev") != std::string::npos) + arrow_type = FbTk::FbDrawable::LEFT; + ++ if (name.find("menu") != std::string::npos) ++ arrow_type = FbTk::FbDrawable::MENU; ++ + ArrowButton *win = new ArrowButton(arrow_type, parent, + 0, 0, + button_size, button_size); +--- a/src/FbTk/FbDrawable.cc 2017-10-19 06:06:08.000000000 -0400 ++++ a/src/FbTk/FbDrawable.cc 2017-10-19 06:06:57.013131070 -0400 +@@ -96,7 +96,7 @@ + if (drawable() == 0 || gc == 0 || width == 0 || height == 0) + return; + +- XPoint pts[3]; ++ XPoint pts[4]; + + if (scale < 100) scale = 100; // not bigger than the space allowed + else if (scale > 10000) scale = 10000; // not too small... +@@ -115,6 +115,26 @@ + } + + switch (type) { ++ case FbTk::FbDrawable::MENU: ++ { ++ int s=7; int m=2; int d=2; int sh=-1; //size margin distance ++ pts[0].x=m+sh; pts[0].y=m+sh; pts[1].x=m+s+sh; pts[1].y=m+sh; ++ pts[2].x=m+s+sh; pts[2].y=m+s+sh; pts[3].x=m+sh; pts[3].y=m+s+sh; ++ fillPolygon(gc, pts, 4, Convex, CoordModeOrigin); ++ ++ pts[0].x=m+s+d+sh; pts[0].y=m+sh; pts[1].x=m+s+d+s+sh; pts[1].y=m+sh; ++ pts[2].x=m+s+d+s+sh; pts[2].y=m+s+sh; pts[3].x=m+s+d+sh; pts[3].y=m+s+sh; ++ fillPolygon(gc, pts, 4, Convex, CoordModeOrigin); ++ ++ pts[0].x=m+sh; pts[0].y=m+s+d+sh; pts[1].x=m+s+sh; pts[1].y=m+s+d+sh; ++ pts[2].x=m+s+sh; pts[2].y=m+s+d+s+sh; pts[3].x=m+sh; pts[3].y=m+s+d+s+sh; ++ fillPolygon(gc, pts, 4, Convex, CoordModeOrigin); ++ ++ pts[0].x=m+s+d+sh; pts[0].y=m+s+d+sh; pts[1].x=m+s+d+s+sh; pts[1].y=m+s+d+sh; ++ pts[2].x=m+s+d+s+sh; pts[2].y=m+s+d+s+sh; pts[3].x=m+s+d+sh; pts[3].y=m+s+d+s+sh; ++ fillPolygon(gc, pts, 4, Convex, CoordModeOrigin); ++ return; ++ } + case FbTk::FbDrawable::LEFT: + // start at the tip + pts[0].x = (width / 2) - (ax / 2); pts[0].y = height / 2; diff --git a/Slax/debian/modules/xorg b/Slax/debian/modules/xorg index d84ca43..c38e7a5 100644 --- a/Slax/debian/modules/xorg +++ b/Slax/debian/modules/xorg @@ -5,7 +5,7 @@ apt-get install --yes --no-install-recommends xserver-xorg xinit xterm blackbox # default cursor is white ln -sf /etc/X11/cursors/Breeze_Snow.theme /etc/alternatives/x-cursor-theme -cp cleanup /tmp +cp ../cleanup /tmp # install x11 server utils, apt-get would add cpp dependency, bullshit! cd /tmp apt-get download x11-xserver-utils