wok rev 12407
jwm: better integration and use XDG xsession
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Apr 20 18:04:27 2012 +0200 (2012-04-20) |
parents | e666c5086b54 |
children | cb76ed027bff |
files | jwm/receipt jwm/stuff/jwmbgconf jwm/stuff/slitaz.jwmrc jwm/stuff/xsessions/jwm.desktop |
line diff
1.1 --- a/jwm/receipt Fri Apr 20 18:02:26 2012 +0200 1.2 +++ b/jwm/receipt Fri Apr 20 18:04:27 2012 +0200 1.3 @@ -8,11 +8,12 @@ 1.4 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.5 WEB_SITE="http://www.joewing.net/programs/jwm/" 1.6 WGET_URL="http://www.joewing.net/programs/jwm/releases/$TARBALL" 1.7 -CONFIG_FILES="/etc/jwm/system.jwmrc" 1.8 TAGS="wm window-manager" 1.9 1.10 -DEPENDS="xorg slitaz-configs" 1.11 -BUILD_DEPENDS="xorg-dev xorg-libXft-dev jpeg-dev" 1.12 +DEPENDS="xorg-libX11 xorg-libXft xorg-libXrender xorg-libXpm xorg-libXext \ 1.13 +xorg-libXmu xorg-libXinerama xorg-libXau xorg-libXdmcp xorg-libXt libjpeg \ 1.14 +libpng slitaz-configs-base xorg-xload xorg-xclock nano" 1.15 +BUILD_DEPENDS="xorg-dev xorg-libXft-dev jpeg-dev libpng-dev" 1.16 1.17 # Rules to configure and make the package. 1.18 compile_rules() 1.19 @@ -23,7 +24,7 @@ 1.20 ./configure \ 1.21 --prefix=/usr \ 1.22 --mandir=/usr/share/man \ 1.23 - --sysconfdir=/etc/jwm \ 1.24 + --sysconfdir=/etc/xdg/jwm \ 1.25 --disable-fribidi \ 1.26 $CONFIGURE_ARGS && 1.27 make 1.28 @@ -32,15 +33,20 @@ 1.29 # Rules to gen a SliTaz package suitable for Tazpkg. 1.30 genpkg_rules() 1.31 { 1.32 - mkdir -p $fs/usr/bin $fs/etc/jwm 1.33 + mkdir -p $fs/usr/bin $fs/etc/xdg/jwm $fs/usr/share 1.34 cp -a $src/src/jwm $fs/usr/bin 1.35 # Simple and default config file. 1.36 - cp $stuff/simple.jwmrc $fs/etc/jwm/simple.jwmrc 1.37 - cp $stuff/slitaz.jwmrc $fs/etc/jwm/system.jwmrc 1.38 + cp $stuff/simple.jwmrc $fs/etc/xdg/jwm/simple.jwmrc 1.39 + cp $stuff/slitaz.jwmrc $fs/etc/xdg/jwm/system.jwmrc 1.40 + cp -r $stuff/xsessions $fs/usr/share 1.41 } 1.42 1.43 post_install() 1.44 { 1.45 + if [ -d "$1/etc/jwm" ]; then 1.46 + echo "Removing old system wide configs: $1/etc/jwm" 1.47 + rm -rf $1/etc/jwm 1.48 + fi 1.49 res=$(cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//) 1.50 # Adding WM to SLIM available sessions. 1.51 if ! echo "$res" | grep -q $PACKAGE; then
2.1 --- a/jwm/stuff/jwmbgconf Fri Apr 20 18:02:26 2012 +0200 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,79 +0,0 @@ 2.4 -#!/bin/sh 2.5 -# 2.6 -# Gtkdialog box to change JWM backgroud. 2.7 -# - SliTaz GNU/Linux 2008. 2.8 -# 2.9 -VERSION=20080305 2.10 - 2.11 -# Get current image zype and path. 2.12 -LINE=`cat ~/.jwmrc | grep -w '^ <Background type='` 2.13 -TYPE=${LINE#*=\"} 2.14 -TYPE=${TYPE%%\"\>*} 2.15 -BG_PATH=${LINE#*\"$TYPE\">} 2.16 -export BG_PATH=${BG_PATH%</Background>} 2.17 - 2.18 -# We need an actions to be executed by another window dialog 2.19 -# to get values from the main dialog variables. 2.20 -export ACTION=' 2.21 - <vbox> 2.22 - <text use-markup="true" width-chars="28"> 2.23 - <label> 2.24 -" 2.25 -<b>Changing JWM background</b> 2.26 -" 2.27 - </label> 2.28 - </text> 2.29 - <progressbar> 2.30 - <label>Please wait...</label> 2.31 - <action>sed -i s#$BG_PATH#$NEW_PATH# $HOME/.jwmrc</action> 2.32 - <input>echo 50; jwm -restart; echo 100</input> 2.33 - <action type="closewindow">ACTION</action> 2.34 - </progressbar> 2.35 - </vbox> 2.36 -' 2.37 - 2.38 -# Image type, path and reload button. We use \" to be Ash compatible. 2.39 -# 2.40 -export BG_DIALOG=" 2.41 -<window title=\"JWM Background\"> 2.42 - <vbox> 2.43 - 2.44 - <text use-markup=\"true\" width-chars=\"50\"> 2.45 - <label> 2.46 -\" 2.47 -<b>Wallpaper - JWM Background image</b> 2.48 -\" 2.49 -</label> 2.50 - </text> 2.51 - 2.52 - <hbox> 2.53 - <entry> 2.54 - <default>$BG_PATH</default> 2.55 - <variable>NEW_PATH</variable> 2.56 - </entry> 2.57 - <button> 2.58 - <input file icon=\"image\"></input> 2.59 - <action type=\"fileselect\">NEW_PATH</action> 2.60 - </button> 2.61 - </hbox> 2.62 - 2.63 - <hbox> 2.64 - <button> 2.65 - <label>Change Wallpaper</label> 2.66 - <input file icon=\"reload\"></input> 2.67 - <action type=\"launch\">ACTION</action> 2.68 - </button> 2.69 - <button> 2.70 - <input file icon=\"exit\"></input> 2.71 - <action type=\"exit\">Exit</action> 2.72 - </button> 2.73 - </hbox> 2.74 - 2.75 - </vbox> 2.76 -</window> 2.77 -" 2.78 - 2.79 -# Execute main dialog. 2.80 -gtkdialog --program=BG_DIALOG 2.81 - 2.82 -exit 0
3.1 --- a/jwm/stuff/slitaz.jwmrc Fri Apr 20 18:02:26 2012 +0200 3.2 +++ b/jwm/stuff/slitaz.jwmrc Fri Apr 20 18:04:27 2012 +0200 3.3 @@ -2,41 +2,58 @@ 3.4 3.5 <JWM> 3.6 3.7 - <!-- The root menu, if this is undefined you will not get a menu. --> 3.8 - <!-- Additional RootMenu attributes: onroot, labeled, label --> 3.9 - <RootMenu height="26" onroot="123"> 3.10 - <Program icon="xterm.png" label="Terminal">terminal</Program> 3.11 - 3.12 - <Menu icon="" label="Applications"> 3.13 - <Program icon="" label="Nano Text editor">terminal -e nano</Program> 3.14 - <Program icon="" label="Retawq Web browser">terminal -e retawq</Program> 3.15 - </Menu> 3.16 - 3.17 - <Separator/> 3.18 - <Restart label="Restart" icon="restart.png"/> 3.19 - <Exit label="Exit" confirm="true" icon="exit.png"/> 3.20 - </RootMenu> 3.21 + <!-- The root menu, if this is undefined you will not get a menu. --> 3.22 + <!-- Additional RootMenu attributes: onroot, labeled, label --> 3.23 + <RootMenu height="24" onroot="12"> 3.24 + <Menu icon="applications-system.png" label="System Tools"> 3.25 + <Program icon="applications-other.png" label="Xload Monitor"> 3.26 + xload -nolabel -bg black -fg grey -hl orange 3.27 + </Program> 3.28 + <Program icon="utilities-system-monitor.png" label="Top Monitor"> 3.29 + terminal -e top 3.30 + </Program> 3.31 + </Menu> 3.32 + <Menu icon="applications-internet.png" label="Network"> 3.33 + <Program icon="internet-web-browser.png" label="Retawq Web browser"> 3.34 + terminal -e retawq 3.35 + </Program> 3.36 + <Program icon="xterm.png" label="Scan loclhost ports"> 3.37 + terminal -e "(pscan localhost; read i)" 3.38 + </Program> 3.39 + </Menu> 3.40 + <Program icon="tazpkg.png" label="Packages manager">terminal -e tazpkg shell</Program> 3.41 + <Program icon="text-editor.png" label="Nano Text editor">terminal -e nano</Program> 3.42 + <Program icon="xterm.png" label="Terminal">terminal</Program> 3.43 + </RootMenu> 3.44 + 3.45 + <RootMenu height="24" onroot="3"> 3.46 + <Program icon="system-shut-down.png" label="Shut down system">reboot</Program> 3.47 + <Program icon="system-restart.png" label="Reboot system">reboot</Program> 3.48 + <Exit label="Exit JWM" confirm="true" icon="system-suspend.png"/> 3.49 + <Restart label="Restart JWM" icon="system-restart.png"/> 3.50 + </RootMenu> 3.51 3.52 <!-- Additional tray attributes: autohide, width, border, layer, layout --> 3.53 <Tray x="0" y="-1" height="26"> 3.54 3.55 <!-- Additional TrayButton attribute: label --> 3.56 - <TrayButton label="SliTaz">root:1</TrayButton> 3.57 + <TrayButton label="Application">root:1</TrayButton> 3.58 + <TrayButton label="System">root:3</TrayButton> 3.59 3.60 - <TrayButton label="_">showdesktop</TrayButton> 3.61 + <!-- <TrayButton label="_">showdesktop</TrayButton> --> 3.62 3.63 <!-- Additional Pager attributes; width, height --> 3.64 - <Pager labeled="false"/> 3.65 + <Pager labeled="false" /> 3.66 3.67 <!-- Additional TaskList attribute: maxwidth --> 3.68 - <TaskList maxwidth="256"/> 3.69 + <TaskList maxwidth="250"/> 3.70 3.71 - <Dock/> 3.72 + <Dock /> 3.73 3.74 <!-- Additional Swallow attribute: height --> 3.75 - <!-- <Swallow name="xload" width="64"> 3.76 - xload -nolabel -bg black -fg red -hl white 3.77 - </Swallow> --> 3.78 + <Swallow name="xload" width="40"> 3.79 + xload -nolabel -bg black -fg grey -hl orange 3.80 + </Swallow> 3.81 3.82 <Clock>xclock</Clock> 3.83 3.84 @@ -48,7 +65,7 @@ 3.85 3.86 <Font>FreeSans-9:bold</Font> 3.87 <Width>4</Width> 3.88 - <Height>24</Height> 3.89 + <Height>26</Height> 3.90 3.91 <Active> 3.92 <Text>#cfcfcf</Text> 3.93 @@ -68,7 +85,7 @@ 3.94 </WindowStyle> 3.95 3.96 <TaskListStyle> 3.97 - <Font>FreeSans-11:bold</Font> 3.98 + <Font>FreeSans-9:bold</Font> 3.99 <ActiveForeground>black</ActiveForeground> 3.100 <ActiveBackground>gray80:gray90</ActiveBackground> 3.101 <Foreground>black</Foreground> 3.102 @@ -78,7 +95,7 @@ 3.103 <!-- Additional TrayStyle attribute: insert --> 3.104 <TrayStyle> 3.105 <Font>FreeSans-11:bold</Font> 3.106 - <Background>gray90</Background> 3.107 + <Background>#f9f7f3</Background> 3.108 <Foreground>black</Foreground> 3.109 <Opacity>0.75</Opacity> 3.110 </TrayStyle> 3.111 @@ -86,33 +103,31 @@ 3.112 <PagerStyle> 3.113 <Outline>black</Outline> 3.114 <Foreground>gray90</Foreground> 3.115 - <Background>#808488</Background> 3.116 + <Background>#666666</Background> 3.117 <ActiveForeground>#70849d</ActiveForeground> 3.118 <ActiveBackground>#2e3a67</ActiveBackground> 3.119 </PagerStyle> 3.120 3.121 <MenuStyle> 3.122 - <Font>FreeSans-12:bold</Font> 3.123 + <Font>FreeSans-10:bold</Font> 3.124 <Foreground>black</Foreground> 3.125 - <Background>gray90</Background> 3.126 + <Background>#f9f7f3</Background> 3.127 <ActiveForeground>white</ActiveForeground> 3.128 - <ActiveBackground>#70849d:#2e3a67</ActiveBackground> 3.129 + <ActiveBackground>#7A6753:#443b31</ActiveBackground> 3.130 <Opacity>0.85</Opacity> 3.131 </MenuStyle> 3.132 3.133 <PopupStyle> 3.134 - <Font>FreeSans-10</Font> 3.135 - <Outline>black</Outline> 3.136 + <Font>FreeSans-16</Font> 3.137 + <Outline>#dddddd</Outline> 3.138 <Foreground>black</Foreground> 3.139 - <Background>yellow</Background> 3.140 + <Background>#f9f7f3</Background> 3.141 </PopupStyle> 3.142 3.143 - <IconPath> 3.144 - $HOME/Images/Icons 3.145 - </IconPath> 3.146 - <IconPath> 3.147 - /usr/share/pixmaps 3.148 - </IconPath> 3.149 + <IconPath>$HOME/.icons</IconPath> 3.150 + <IconPath>/usr/share/pixmaps</IconPath> 3.151 + <IconPath>/usr/share/icons/SliTaz/apps/22</IconPath> 3.152 + <IconPath>/usr/share/icons/SliTaz/categories/22</IconPath> 3.153 3.154 <!-- Virtual Desktops --> 3.155 <!-- Desktop tags can be contained within Desktops for desktop names. --> 3.156 @@ -128,9 +143,7 @@ 3.157 3.158 <!-- Startup and shutdown commands. --> 3.159 <StartupCommand></StartupCommand> 3.160 - <ShutdownCommand> 3.161 - killall Xorg; clear; sleep 2; clear; echo "JWM exit OK. Press ENTER to continue... " 3.162 - </ShutdownCommand> 3.163 + <ShutdownCommand></ShutdownCommand> 3.164 3.165 <!-- Double click speed (in milliseconds) --> 3.166 <DoubleClickSpeed>400</DoubleClickSpeed> 3.167 @@ -169,4 +182,3 @@ 3.168 <Key mask="A" key="F2">window</Key> 3.169 3.170 </JWM> 3.171 -