#!/bin/sh
#based on the original jwmConfigMgr developed by 'thoughtjourney' 2005.


##--------variables---------->>
SCRIPT_DIR="/usr/local/jwmconfig2"
MINI_ICONS_DIR="/usr/local/lib/X11/mini-icons"
HOME_DIR="/root/.jwm"
echo "SCRIPT_DIR='${SCRIPT_DIR}'" > /tmp/JWMCONFIGVARS
echo "MINI_ICONS_DIR='${MINI_ICONS_DIR}'" >> /tmp/JWMCONFIGVARS
echo "HOME_DIR='${HOME_DIR}'" >> /tmp/JWMCONFIGVARS


export JWM_Display="
<window title=\"JWM設定マネージャ\" icon-name=\"gtk-preferences\" window-position=\"1\">
 <vbox>
  <notebook labels=\"JWM|デスクトップ\">
   <vbox>
    <hbox>
     <text>
      <label>JWMテーマを選択</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini.window3d.xpm</input>
      <action>$SCRIPT_DIR/theme_switcher &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>あるいは今のGTKテーマをJWMに適用する</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini.window3d.xpm</input>
      <action>$SCRIPT_DIR/gtk2jwm &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>トレイ管理</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini-maxwide.xpm</input>
      <action>$SCRIPT_DIR/taskbar &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>ウィンドウフォーカスモデル</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini-windows.xpm</input>
      <action>$SCRIPT_DIR/focusModel &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>キーボードショートカット</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini-keyboard.xpm</input>
      <action>$SCRIPT_DIR/keyboard &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>トレイのアプリケーション起動ボタン</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/Executable.xpm</input>
      <action>$SCRIPT_DIR/panel-buttons &</action>
     </button>
    </hbox>
   </vbox>
   <vbox>
    <hbox>
     <text>
      <label>GTKテーマ</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini.window3d.xpm</input>
      <action>gtk-chtheme &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>デスクトップ背景</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/mini-cave.xpm</input>
      <action>wallpaper &</action>
     </button>
    </hbox>
   </vbox>
  </notebook>
  <frame 重要！>
   <hbox>
    <pixmap>
     <input file>$MINI_ICONS_DIR/info16.xpm</input>
    </pixmap>
    <text>
     <label>上のアクションのいくつかは変更を反映するためにJWMをリスタートする必要があります</label>
    </text>
   </hbox>
   <hbox>
    <text>
     <label>今すぐJWMをリスタートしますか？</label>
    </text>
    <button yes>
     <action>jwm -restart &</action>
    </button>
   </hbox>
  </frame>
  <hbox>
   <button help>
    <action>gxmessage -buttons Exit -bg black -fg green -name 'jwmConfigMgrヘルプ' -center 'JWMはウィンドウマネージャです。ウィンドウとトレイの動作と外観を管理します。' &</action>
   </button>
   <button>
    <label>終了</label>
    <input file stock=\"gtk-quit\"></input>
    <action>EXIT:ok</action>
   </button>
  </hbox>
 </vbox>
</window>
"
##------------run------------->>
gtkdialog3 --program JWM_Display

##----------cleanup------------>>
unset JWM_Display

#clear
exit 0

