Skip to content

Commit

Permalink
Improve functionality of JWM in Saluki
Browse files Browse the repository at this point in the history
  • Loading branch information
mavrothal committed Feb 26, 2012
1 parent 13cee31 commit cfafc8c
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 0 deletions.
41 changes: 41 additions & 0 deletions XO/XO_sfs_patches/etc_jwmrc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--- a/etc/xdg/templates/_root_.jwmrc 2012-02-22 19:40:59.000000000 +0200
+++ b/etc/xdg/templates/_root_.jwmrc 2012-02-24 19:18:58.000000000 +0200
@@ -58,6 +58,7 @@
<!-- Additional tray attributes: autohide, width, border, layer, layout -->
<!-- Tray definition moved to separate file: .jwmrc-tray -->
<Include>/root/.jwmrc-tray</Include>
+ <Include>/root/.jwmrc-tray2</Include>

<!-- Visual Styles -->

@@ -120,6 +121,8 @@
<IconPath>/usr/local/lib/X11/pixmaps</IconPath>
<IconPath>/usr/share/pixmaps</IconPath>
<IconPath>/usr/local/share/pixmaps</IconPath>
+ <IconPath>/usr/share/icons/gnome/48x48/apps/</IconPath>
+ <IconPath>/usr/share/icons/hicolor/48x48/apps/</IconPath>
<!-- </Icons> -->

<StartupCommand>
@@ -127,7 +130,20 @@

<!-- Virtual Desktops -->
<!-- Name tags can be contained within Desktops for desktop names. BK: syntax change with jwm 500... -->
- <Desktops width="3" height="1"/>
+ <Desktops width="2" height="1">
+ <Desktop Name="One">
+ <Background type="tile">/usr/share/backgrounds/default.jpg</Background>
+ </Desktop>
+
+ <Desktop Name="Two">
+ <Background type="tile">/usr/share/backgrounds/default.jpg</Background>
+ </Desktop>
+
+ <Desktop Name="Three">
+ <Background type="tile">/usr/share/backgrounds/default.jpg</Background>
+ </Desktop>
+
+ </Desktops>

<!-- Double click speed (in milliseconds) -->
<DoubleClickSpeed>400</DoubleClickSpeed>
14 changes: 14 additions & 0 deletions XO/XO_sfs_patches/jwmrc-tray.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/root/.jwmrc-tray 2010-05-24 09:41:41.000000000 +0300
+++ b/root/.jwmrc-tray 2012-02-24 19:09:01.000000000 +0200
@@ -34,9 +36,9 @@
freememappletshell
</Swallow> -->

- <Swallow name="xload" width="32">
+ <!-- <Swallow name="xload" width="32">
xload -nolabel -bg "#888888" -fg red -hl white
- </Swallow>
+ </Swallow> -->

<Clock format="%H:%M">minixcal</Clock>
</Tray>
14 changes: 14 additions & 0 deletions XO/XO_sfs_patches/jwmrc-tray_luki.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/root/.jwmrc-tray 2010-05-24 09:41:41.000000000 +0300
+++ b/root/.jwmrc-tray 2012-02-26 09:06:16.146554246 +0200
@@ -14,8 +14,10 @@
<!-- Additional TaskList attribute: maxwidth -->
<TaskList/>

+ <TrayButton popup="Mount devices" icon="/usr/share/icons/gnome/24x24/devices/gnome-dev-removable.png">exec:pmount</TrayButton>
+
<Dock/>
-
+
<!-- Additional Swallow attribute: height -->

<!-- <Swallow name="blinky">
41 changes: 41 additions & 0 deletions XO/XO_sfs_patches/jwmrc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--- a/root/.jwmrc 2012-02-22 19:40:59.000000000 +0200
+++ b/root/.jwmrc 2012-02-25 01:10:39.730000380 +0200
@@ -77,6 +90,7 @@
<!-- Additional tray attributes: autohide, width, border, layer, layout -->
<!-- Tray definition moved to separate file: .jwmrc-tray -->
<Include>/root/.jwmrc-tray</Include>
+<Include>/root/.jwmrc-tray2</Include>

<!-- Visual Styles -->

@@ -139,6 +153,8 @@
<IconPath>/usr/local/lib/X11/pixmaps</IconPath>
<IconPath>/usr/share/pixmaps</IconPath>
<IconPath>/usr/local/share/pixmaps</IconPath>
+<IconPath>/usr/share/icons/gnome/48x48/apps/</IconPath>
+<IconPath>/usr/share/icons/hicolor/48x48/apps/</IconPath>
<!-- </Icons> -->

<StartupCommand>
@@ -146,7 +162,20 @@

<!-- Virtual Desktops -->
<!-- Name tags can be contained within Desktops for desktop names. BK: syntax change with jwm 500... -->
-<Desktops width="3" height="1"/>
+<Desktops width="2" height="1">
+<Desktop Name="One">
+<Background type="tile">/usr/share/backgrounds/default.jpg</Background>
+</Desktop>
+
+<Desktop Name="Two">
+<Background type="tile">/usr/share/backgrounds/default.jpg</Background>
+</Desktop>
+
+<Desktop Name="Three">
+<Background type="tile">/usr/share/backgrounds/default.jpg</Background>
+</Desktop>
+
+</Desktops>

<!-- Double click speed (in milliseconds) -->
<DoubleClickSpeed>400</DoubleClickSpeed>
22 changes: 22 additions & 0 deletions XO/XO_sfs_patches/xwin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- /initrd/pup_ro2/usr/bin/xwin 2011-11-18 09:58:04.000000000 +0200
+++ /usr/bin/xwin 2012-02-26 09:52:53.263079397 +0200
@@ -55,6 +55,19 @@
if [ $1 ];then
echo -n "$1" > /etc/windowmanager
#note, /root/.xinitrc uses this file.
+ case "$1" in
+ jwm)
+ cp -a /root/.gtkrc-2.0 /root/.gtkrc-2.0.bak
+ cat << EOF >> /root/.gtkrc-2.0
+gtk-theme-name="Raleigh"
+gtk-icon-theme-name="gnome"
+EOF
+ ;;
+ startxfce4)
+ rm -f /root/.gtkrc-2.0
+ mv /root/.gtkrc-2.0.bak /root/.gtkrc-2.0
+ ;;
+ esac
fi

#v1.0.7
88 changes: 88 additions & 0 deletions create_xo_puppy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,19 @@ wary|racy|luki)
else
echo "The synaptics.pet was in the extra_pets folder. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi
if [ "$DISTRO_FILE_PREFIX" = "luki" ] ; then
if [ ! -f $extra_pets/jwm-578-deco-luki-1-i486.pet ] ; then
wget -c -P $extra_pets\
http://ftp.cc.uoc.gr/mirrors/linux/XOpup/XOpets/jwm-578-deco-luki-1-i486.pet
if [ $? -ne 0 ]; then
echo "Failed to download jwm-578-deco-luki-1-i486.pet. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
else
echo "The jwm-578-deco-luki-1-i486.pet was added in the extra_pets folder. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi
else
echo "The jwm-578-deco-luki-1-i486.pet was in the extra_pets folder. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi
fi
;;
*)
echo "Not a T2-based puppy"
Expand Down Expand Up @@ -551,13 +564,24 @@ else
echo "Patched rc.shutdown. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi

# Remove xload from tray. Wastes CPU cycles
echo "removing xload from tray"
patch -p1 < $patches/jwmrc-tray.patch
if [ $? -ne 0 ]; then
echo "Failed to patch jwmrc-tray. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
rm -f root/.jwmrc-tray.{orig,rej}
else
echo "Patched jwmrc-tray. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi

#Add support for the XO internal drives in fstab
echo "Adjusting /etc/fstab for XO internal drives..."
cat << EOF >> $SFSROOT/etc/fstab
/dev/mtdblock0 /.xo-nand jffs2 defaults,noauto 0 0
/dev/mmcblk1p2 /.intSD ext4 defaults,noauto 0 0
EOF


# Fix menu font size, in Seamonkey/Firefox
sed -i 's/font-size: 12px !important;/font-size: 16px !important;/' \
$SFSROOT/root/.mozilla/{seamonkey,firefox}/*.default/chrome/userChrome.css
Expand All @@ -576,6 +600,9 @@ for i in $SFSROOT/root/.jwm/themes/*-jwmrc
# Fix driver spacing to fit SDcard long name
sed -i 's/ICON_PLACE_SPACING=[0-9][0-9]/ICON_PLACE_SPACING=108/' $SFSROOT/etc/eventmanager

# Saluki specific fixes
case "$DISTRO_FILE_PREFIX" in
luki)
# Fix font size for XFCE4 (Saluki 006+)
sed -i 's/<property name="DPI" type="empty"\/>/<property name="DPI" type="int" value="140"\/>/' $SFSROOT/root/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
sed -i 's/<\/channel>//' $SFSROOT/root/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
Expand All @@ -590,6 +617,67 @@ EOF
sed -i 's/\/etc\/acpi\/hibernate\.sh/powerd-config =gotosleep/' $SFSROOT/usr/bin/shutdown-gui
sed -i 's/\/etc\/acpi\/sleep\.sh/powerd-config =dark-suspend/' $SFSROOT/usr/bin/shutdown-gui

#Add support for the XO internal drives in fstab
cat << EOF >> $SFSROOT/etc/fstab.d/static_entries
/dev/mtdblock0 /.xo-nand jffs2 defaults,noauto 0 0
/dev/mmcblk1p2 /.intSD ext4 defaults,noauto 0 0
EOF

#Fix JWM
echo "patching jwmrc"
patch -p1 < $patches/jwmrc.patch
if [ $? -ne 0 ]; then
echo "Failed to patch jwmrc. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
rm -f root/.jwmrc.{orig,rej}
else
echo "Patched jwmrc. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi
patch -p1 < $patches/etc_jwmrc.patch
if [ $? -ne 0 ]; then
echo "Failed to patch _root_.jwmrc. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
rm -f etc/xdg/templates/_root_.jwmrc.{orig,rej}
else
echo "Patched _root_.jwmrc. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi

# Further increase font size
sed -i 's/108/130/' $SFSROOT/root/.Xresources

# Show file/folder icons in Thunar when in JWM
echo "patching xwin"
patch -p1 < $patches/xwin.patch
if [ $? -ne 0 ]; then
echo "Failed to patch xwin. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
rm -f usr/bin/xwin.{orig,rej}
else
echo "Patched xwin. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
fi

#Add a second JWM tary on top
cat << EOF > $SFSROOT/root/.jwmrc-tray2
<JWM>
<Tray autohide="true" insert="right" halign="center" x="-1" y="0" border="2" height="54" layout="horizontal" >
<!-- Additional TrayButton attribute: label -->
<TrayButton popup="File browser" icon="home48.png">exec:Thunar</TrayButton>
<TrayButton popup="Web Browser" icon="www48.png">exec:defaultbrowser</TrayButton>
<TrayButton popup="Terminal" icon="xfce-terminal.png">exec:Terminal</TrayButton>
<TrayButton popup="Geany text editor" icon="edit48.png">exec:geany</TrayButton>
<!--TrayButton popup="PDF viewer" icon="evince.png">exec:evince</TrayButton-->
<Program label="mtPaint image editor" icon="paint48.png">exec:mtpaint</Program>
<TrayButton popup="XArchive archiver" icon="pupzip.png">exec:xarchive</TrayButton>
<TrayButton popup="Puppy Package Manager" icon="pet.png">exec:/usr/local/petget/pkg_chooser.sh</TrayButton>
<TrayButton popup="SFS-Load on-the-fly" icon="squashfs-image.png">exec:sfs_load</TrayButton>
<TrayButton popup="Control Panel" icon="configuration24.png">exec:wizardwizard</TrayButton>
<!--TrayButton popup="Frisbee connect to internet" icon="frisbee.png">exec:Frisbee</TrayButton-->
<TrayButton popup="Shutdown" icon="shutdown.png">exec:shutdown-gui</TrayButton>
</Tray>
</JWM>
EOF
;;
*) echo "Not Saluki" ;;
esac


statusfunc 0

echo "The following buildin packages have been removed from the build. $(date "+%Y-%m-%d %H:%M")" >> $CWD/build.log
Expand Down

0 comments on commit cfafc8c

Please sign in to comment.