Vous n'êtes pas identifié(e).

#1 2011-01-20 21:12:14

guantas
I try to
Inscription : 2010-09-14
Messages : 2 181

Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

(edit de Kookaburra wink )

Tous les fichiers à jour sont disponibles ici :

http://crunchbanglinux-fr.pastebin.com/ … in.php?p=1

Y15zM.png




AUTOSTART.SH:

## Openbox autostart.sh
## ====================
## When you login to your CrunchBang Openbox session, this autostart script 
## will be executed to set-up your environment and launch any applications
## you want to run at startup.
##
## More information about this can be found at:
## http://openbox.org/wiki/Help:Autostart
##
## If you do something cool with your autostart script and you think others
## could benefit from your hack, please consider sharing it at:
## http://crunchbanglinux.org/forums/
##
## Have fun! :)

## Start session manager
lxsession &

## Enable power management
xfce4-power-manager &

## Start Thunar Daemon
thunar --daemon &

## Set desktop wallpaper
nitrogen --restore &

## Launch panel
tint2 &

## Enable Eyecandy - off by default, uncomment one of the commands below.
## Note: cairo-compmgr prefers a sleep delay, else it tends to produce
## odd shadows/quirks around tint2 & Conky.
#(sleep 10s && cb-compmgr --cairo-compmgr) &
#cb-compmgr --xcompmgr & 

## Launch network manager applet
(sleep 4s && nm-applet) &

## Detect and configure touchpad. See 'man synclient' for more info.
if egrep -iq 'touchpad' /proc/bus/input/devices; then
    synclient VertEdgeScroll=1 &
    synclient TapButton1=1 &
fi

## Start xscreensaver
xscreensaver -no-splash &

## Start Conky after a slight delay
(sleep 3s && conky -q) &

## Start volumeicon after a slight delay
(sleep 3s && volumeicon) &

## Bad Nautilus, minimises the impact of running Nautilus under
## an Openbox session by applying some gconf settings. Safe to delete.
cb-bad-nautilus &

## The following command will set-up a keyboard map selection tool when
## running in a live session.
cb-setxkbmap-live &

## cb-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10s && cb-welcome --firstrun) &

## cb-fortune - have Statler say a little adage
(sleep 120s && cb-fortune) &


MENU. XML:


<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/                 file:///usr/share/openbox/menu.xsd">
    <menu id="root-menu" label="Openbox 3">
        <item label="Run Program">
            <action name="Execute">
                <execute>
                    gmrun
                </execute>
            </action>
        </item>
        <separator/>
        <item label="Terminal">
            <action name="Execute">
                <execute>
                    terminator
                </execute>
            </action>
        </item>
        <item label="Web Browser">
            <action name="Execute">
                <execute>
                    x-www-browser
                </execute>
            </action>
        </item>
        <item label="File Manager">
            <action name="Execute">
                <execute>
                    thunar
                </execute>
            </action>
        </item>
        <item label="Text Editor">
            <action name="Execute">
                <execute>
                    gedit
                </execute>
            </action>
        </item>
        <item label="Media Player">
            <action name="Execute">
                <execute>
                    vlc
                </execute>
            </action>
        </item>
        <separator/>
        <menu id="accessories" label="Accessories">
            <item label="Catfish File Search">
                <action name="Execute">
                    <execute>
                        catfish
                    </execute>
                </action>
            </item>
            <item label="Archive Manager">
                <action name="Execute">
                    <execute>
                        file-roller
                    </execute>
                </action>
            </item>
            <item label="gedit Text Editor">
                <action name="Execute">
                    <execute>
                        gedit
                    </execute>
                </action>
            </item>
            <item label="Terminator Terminal">
                <action name="Execute">
                    <execute>
                        terminator
                    </execute>
                </action>
            </item>
            <item label="Thunar File Manager">
                <action name="Execute">
                    <execute>
                        thunar
                    </execute>
                </action>
            </item>
            <item label="Thunar File Manager (root)">
                <action name="Execute">
                    <execute>
                        gksudo thunar
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="graphics" label="Graphics">
            <item label="GIMP">
                <action name="Execute">
                    <execute>
                        gimp
                    </execute>
                </action>
            </item>
            <item label="Viewnior Image Viewer">
                <action name="Execute">
                    <execute>
                        viewnior
                    </execute>
                </action>
            </item>
            <menu id="graphicsScreenshots" label="Take Screenshot">
                <item label="Now">
                    <action name="Execute">
                        <execute>
                            scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
                <item label="In 5 Seconds...">
                    <action name="Execute">
                        <execute>
                            scrot -d 5 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
                <item label="In 10 Seconds...">
                    <action name="Execute">
                        <execute>
                            scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
                <item label="Selected Area... (click &amp; drag mouse)">
                    <action name="Execute">
                        <execute>
                            scrot -s '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'
                        </execute>
                    </action>
                </item>
            </menu>
            <separator/>
            <menu id="graphicsOnline" label="Online Tools">
                <item label="Colour Lovers">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://www.colourlovers.com/
                        </execute>
                    </action>
                </item>
                <item label="Color Hunter">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://colorhunter.com/
                        </execute>
                    </action>
                </item>
                <item label="Vector Magic">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://vectormagic.stanford.edu/
                        </execute>
                    </action>
                </item>
                <item label="FavIcon from Pics">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://www.htmlkit.com/services/favicon/
                        </execute>
                    </action>
                </item>
            </menu>
        </menu>
        <menu id="multimedia" label="Multimedia">
            <item label="VLC Media Player">
                <action name="Execute">
                    <execute>
                        vlc
                    </execute>
                </action>
            </item>
            <item label="Volume Control">
                <action name="Execute">
                    <execute>
                        xfce4-mixer
                    </execute>
                </action>
            </item>
            <item label="Xfburn">
                <action name="Execute">
                    <execute>
                        xfburn
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="network" label="Network">
            <item label="Google Chrome WWW Browser">
                <action name="Execute">
                    <execute>
                        google-chrome
                    </execute>
                </action>
            </item>
            <item label="gFTP Client">
                <action name="Execute">
                    <execute>
                        gftp
                    </execute>
                </action>
            </item>
            <item label="Transmission BitTorrent Client">
                <action name="Execute">
                    <execute>
                        transmission
                    </execute>
                </action>
            </item>
            <item label="XChat IRC Client">
                <action name="Execute">
                    <execute>
                        xchat
                    </execute>
                </action>
            </item>
            <item label="Heybuddy Microblogging Client">
                <action name="Execute">
                    <execute>
                        heybuddy
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="office" label="Office">
            <menu id="openoffice" label="OpenOffice.org" execute="cb-openoffice.org-pipemenu" />
            <item label="AbiWord Word Processor">
                <action name="Execute">
                    <execute>
                        abiword
                    </execute>
                </action>
            </item>
            <item label="Gnumeric Spreadsheet">
                <action name="Execute">
                    <execute>
                        gnumeric
                    </execute>
                </action>
            </item>
            <item label="Calculator">
                <action name="Execute">
                    <execute>
                        gnome-calculator
                    </execute>
                </action>
            </item>
            <item label="Evince PDF Viewer">
                <action name="Execute">
                    <execute>
                        evince
                    </execute>
                </action>
            </item>
        </menu>
        <separator/>
        <menu id="recent" label="Recent Files" execute="~/.config/openbox/pipemenus/recently_opened_menu.sh" />
        <menu id="places" label="Places" execute="~/.config/openbox/pipemenus/dash_places_menu.sh ~" />
        <menu execute="cb-dropbox-pipemenu" id="dropbox" label="Dropbox"/>
        <separator/>
        <menu id="settings" label="Settings">
            <menu execute="cb-compmgr" id="CompositingPipeMenu" label="Compositing"/>
            <menu id="conkyconfig" label="Conky Config">
                <item label="Edit .conkyrc">
                    <action name="Execute">
                        <execute>
                            gedit ~/.conkyrc
                        </execute>
                    </action>
                </item>
                <item label="Restart Conky">
                    <action name="Execute">
                        <execute>
                            conkywonky
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man conky"
                        </execute>
                    </action>
                </item>
                <item label="Wiki Page">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://crunchbanglinux.org/wiki/conky
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="dmenuconfig" label="dmenu Config">
                <item label="Edit start-up script">
                    <action name="Execute">
                        <execute>
                            gedit ~/.config/dmenu/dmenu-bind.sh
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man dmenu"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="gmrunconfig" label="gmrun Config">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            gedit ~/.gmrunrc
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man gmrun"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="obConfig" label="Openbox Config">
                <item label="Edit menu.xml">
                    <action name="Execute">
                        <execute>
                            gedit ~/.config/openbox/menu.xml
                        </execute>
                    </action>
                </item>
                <item label="Edit rc.xml">
                    <action name="Execute">
                        <execute>
                            gedit ~/.config/openbox/rc.xml
                        </execute>
                    </action>
                </item>
                <item label="Edit autostart.sh">
                    <action name="Execute">
                        <execute>
                            gedit ~/.config/openbox/autostart.sh
                        </execute>
                    </action>
                </item>
                <item label="GUI Menu Editor">
                    <action name="Execute">
                        <execute>
                            obmenu
                        </execute>
                    </action>
                </item>
                <item label="GUI Config Tool">
                    <action name="Execute">
                        <execute>
                            obconf
                        </execute>
                    </action>
                </item>
                <item label="Reconfigure">
                    <action name="Reconfigure"/>
                </item>
                <item label="Restart">
                    <action name="Restart"/>
                </item>
            </menu>
            <menu id="terminatorconfig" label="Terminator Config">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            gedit ~/.config/terminator/config
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man terminator_config"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="tint2config" label="tint2 Panel Config">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            gedit ~/.config/tint2/tint2rc
                        </execute>
                    </action>
                </item>
                <item label="GUI Config Tool">
                    <action name="Execute">
                        <execute>
                            tint2conf
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man page">
                    <action name="Execute">
                        <execute>
                            terminator --command="man tint2"
                        </execute>
                    </action>
                </item>
                <item label="Online Help">
                    <action name="Execute">
                        <execute>
                            x-www-browser http://code.google.com/p/tint2/wiki/Welcome
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="DisplaySettings" label="Display Settings">
                <item label="Adjust with grandr">
                    <action name="Execute">
                        <execute>
                            grandr
                        </execute>
                    </action>
                </item>
                <separator label="Help?"/>
                <item label="man xrandr">
                    <action name="Execute">
                        <execute>
                            terminator --command="man xrandr"
                        </execute>
                    </action>
                </item>
            </menu>
            <menu id="NotificationsSettings" label="Notifications">
                <item label="Edit config file">
                    <action name="Execute">
                        <execute>
                            gedit ~/.notify-osd
                        </execute>
                    </action>
                </item>
                <item label="Send test notification">
                    <action name="Execute">
                        <execute>
                            cb-fortune
                        </execute>
                    </action>
                </item>
            </menu>
            <item label="Edit Default Applications">
                <action name="Execute">
                    <execute>
                        terminator --command="sudo update-alternatives --all"
                    </execute>
                </action>
            </item>
            <item label="User Interface Settings">
                <action name="Execute">
                    <execute>
                        lxappearance
                    </execute>
                </action>
            </item>
            <item label="Power Management">
                <action name="Execute">
                    <execute>
                        xfce4-power-manager-settings
                    </execute>
                </action>
            </item>
            <item label="Screensaver">
                <action name="Execute">
                    <execute>
                        xscreensaver-demo
                    </execute>
                </action>
            </item>
            <item label="Choose Wallpaper">
                <action name="Execute">
                    <execute>
                        nitrogen ~/images/wallpapers/
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="system" label="System">
            <menu execute="cb-printing-pipemenu" id="PrintingPipeMenu" label="Printers"/>
            <item label="GParted">
                <action name="Execute">
                    <execute>
                        gksudo gparted
                    </execute>
                </action>
            </item>
            <item label="GDM Login Set-up">
                <action name="Execute">
                    <execute>
                        gksudo gdmsetup
                    </execute>
                </action>
            </item>
            <item label="Synaptic Package Manager">
                <action name="Execute">
                    <execute>
                        gksudo synaptic
                    </execute>
                </action>
            </item>
        </menu>
        <menu id="help" label="Help" execute="cb-help-pipemenu" />
        <separator/>
        <item label="Lock Screen">
            <action name="Execute">
                <execute>
                    cb-lock
                </execute>
            </action>
        </item>
        <item label="Exit">
            <action name="Execute">
                <execute>
                    openbox-logout
                </execute>
            </action>
        </item>
    </menu>
</openbox_menu>

RC.XML:


<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc">
  <resistance>
    <strength>10</strength>
    <screen_edge_strength>20</screen_edge_strength>
  </resistance>
  <focus>
    <focusNew>yes</focusNew>
    <!-- always try to focus new windows when they appear. other rules do
       apply -->
    <followMouse>no</followMouse>
    <!-- move focus to a window when you move the mouse into it -->
    <focusLast>yes</focusLast>
    <!-- focus the last used window when changing desktops, instead of the one
       under the mouse pointer. when followMouse is enabled -->
    <underMouse>no</underMouse>
    <!-- move focus under the mouse, even when the mouse is not moving -->
    <focusDelay>200</focusDelay>
    <!-- when followMouse is enabled, the mouse must be inside the window for
       this many milliseconds (1000 = 1 sec) before moving focus to it -->
    <raiseOnFocus>no</raiseOnFocus>
    <!-- when followMouse is enabled, and a window is given focus by moving the
       mouse into it, also raise the window -->
  </focus>
  <placement>
    <policy>Smart</policy>
    <!-- 'Smart' or 'UnderMouse' -->
    <center>yes</center>
    <!-- whether to place windows in the center of the free area found or
       the top left corner -->
    <monitor>Any</monitor>
  </placement>
  <theme>
    <name>Shiki-Statler</name>
    <titleLayout>DSLIMC</titleLayout>
    <!--
      avaible characters are NDSLIMC, each can occur at most once.
      N: window icon
      L: window label (AKA title).
      I: iconify
      M: maximize
      C: close
      S: shade (roll up/down)
      D: omnipresent (on all desktops).
  -->
    <keepBorder>yes</keepBorder>
    <animateIconify>yes</animateIconify>
    <font place="ActiveWindow">
      <name>Sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="InactiveWindow">
      <name>Sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuHeader">
      <name>Sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuItem">
      <name>Sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="OnScreenDisplay">
      <name>Sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
  </theme>
  <desktops>
    <!-- this stuff is only used at startup, pagers allow you to change them
       during a session

       these are default values to use when other ones are not already set
       by other applications, or saved in your session

       use obconf if you want to change these without having to log out
       and back in -->
    <number>2</number>
    <firstdesk>1</firstdesk>
    <names>
      <name>1</name>
      <name>2</name>
      <name>3</name>
      <name>4</name>
    </names>
    <popupTime>875</popupTime>
    <!-- The number of milliseconds to show the popup for when switching
       desktops.  Set this to 0 to disable the popup. -->
  </desktops>
  <resize>
    <drawContents>yes</drawContents>
    <popupShow>Nonpixel</popupShow>
    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
    <popupPosition>Center</popupPosition>
    <!-- 'Center' or 'Top' -->
    <popupFixedPosition>
      <x>0</x>
      <y>0</y>
    </popupFixedPosition>
  </resize>
  <!-- You can reserve a portion of your screen where windows will not cover when
     they are maximized, or when they are initially placed.
     Many programs reserve space automatically, but you can use this in other
     cases. -->
  <margins>
    <top>1</top>
    <bottom>0</bottom>
    <left>0</left>
    <right>0</right>
  </margins>
  <dock>
    <position>TopLeft</position>
    <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
    <floatingX>0</floatingX>
    <floatingY>0</floatingY>
    <noStrut>no</noStrut>
    <stacking>Above</stacking>
    <!-- 'Above', 'Normal', or 'Below' -->
    <direction>Vertical</direction>
    <!-- 'Vertical' or 'Horizontal' -->
    <autoHide>no</autoHide>
    <hideDelay>300</hideDelay>
    <!-- in milliseconds (1000 = 1 second) -->
    <showDelay>300</showDelay>
    <!-- in milliseconds (1000 = 1 second) -->
    <moveButton>Middle</moveButton>
    <!-- 'Left', 'Middle', 'Right' -->
  </dock>
  <keyboard>
    <chainQuitKey>C-g</chainQuitKey>
    <!-- Keybindings for desktop switching -->
    <keybind key="C-A-Left">
      <action name="DesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-A-Right">
      <action name="DesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-A-Up">
      <action name="DesktopUp">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-A-Down">
      <action name="DesktopDown">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Left">
      <action name="SendToDesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Right">
      <action name="SendToDesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Up">
      <action name="SendToDesktopUp">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Down">
      <action name="SendToDesktopDown">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="W-F1">
      <action name="Desktop">
        <desktop>1</desktop>
      </action>
    </keybind>
    <keybind key="W-F2">
      <action name="Desktop">
        <desktop>2</desktop>
      </action>
    </keybind>
    <keybind key="W-F3">
      <action name="Desktop">
        <desktop>3</desktop>
      </action>
    </keybind>
    <keybind key="W-F4">
      <action name="Desktop">
        <desktop>4</desktop>
      </action>
    </keybind>
    <keybind key="W-d">
      <action name="ToggleShowDesktop"/>
    </keybind>
    <!-- Keybindings for windows -->
    <keybind key="A-F4">
      <action name="Close"/>
    </keybind>
    <keybind key="A-Escape">
      <action name="Lower"/>
      <action name="FocusToBottom"/>
      <action name="Unfocus"/>
    </keybind>
    <keybind key="A-space">
      <action name="ShowMenu">
        <menu>client-menu</menu>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <execute>scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'</execute>
      </action>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <execute>scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; viewnior ~/images/$f'</execute>
      </action>
    </keybind>
    <!-- Keybindings for window switching -->
    <keybind key="A-Tab">
      <action name="NextWindow"/>
    </keybind>
    <keybind key="A-S-Tab">
      <action name="PreviousWindow"/>
    </keybind>
    <keybind key="C-A-Tab">
      <action name="NextWindow">
        <panels>yes</panels>
        <desktop>yes</desktop>
      </action>
    </keybind>
    <!-- Keybindings for running applications -->
    <keybind key="A-F2">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Run Program</name>
        </startupnotify>
        <command>gmrun</command>
      </action>
    </keybind>
    <keybind key="A-F3">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>dmenu-bind</name>
        </startupnotify>
        <command>~/.config/dmenu/dmenu-bind.sh</command>
      </action>
    </keybind>
    <keybind key="W-f">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>thunar</name>
        </startupnotify>
        <command>thunar</command>
      </action>
    </keybind>
    <keybind key="W-t">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Terminal</name>
        </startupnotify>
        <command>terminator</command>
      </action>
    </keybind>
    <keybind key="W-w">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Web Browser</name>
        </startupnotify>
        <command>x-www-browser</command>
      </action>
    </keybind>
    <keybind key="W-l">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Lock screen</name>
        </startupnotify>
        <command>cb-lock</command>
      </action>
    </keybind>
    <keybind key="W-e">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Editor</name>
        </startupnotify>
        <command>gedit</command>
      </action>
    </keybind>
    <keybind key="W-m">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Mediaplayer</name>
        </startupnotify>
        <command>vlc</command>
      </action>
    </keybind>
    <keybind key="W-v">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Volume</name>
        </startupnotify>
        <command>xfce4-mixer</command>
      </action>
    </keybind>
    <keybind key="W-x">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Logout</name>
        </startupnotify>
        <command>openbox-logout</command>
      </action>
    </keybind>
    <keybind key="W-Tab">
      <action name="ShowMenu">
        <menu>client-list-combined-menu</menu>
      </action>
    </keybind>
    <keybind key="W-space">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>
    <keybind key="A-C-q">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>
  </keyboard>
  <mouse>
    <dragThreshold>8</dragThreshold>
    <!-- number of pixels the mouse must move before a drag begins -->
    <doubleClickTime>200</doubleClickTime>
    <!-- in milliseconds (1000 = 1 second) -->
    <screenEdgeWarpTime>400</screenEdgeWarpTime>
    <!-- Time before changing desktops when the pointer touches the edge of the
       screen while moving a window, in milliseconds (1000 = 1 second).
       Set this to 0 to disable warping -->
    <context name="Frame">
      <mousebind button="A-Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="A-Left" action="Click">
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="A-Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="A-Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="A-Right" action="Drag">
        <action name="Resize"/>
      </mousebind>
      <mousebind button="A-Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="C-A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="C-A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-S-Up" action="Click">
        <action name="SendToDesktopPrevious"/>
      </mousebind>
      <mousebind button="A-S-Down" action="Click">
        <action name="SendToDesktopNext"/>
      </mousebind>
    </context>
    <context name="Titlebar">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="Left" action="DoubleClick">
        <action name="ToggleMaximizeFull"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="Up" action="Click">
        <action name="Shade"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
        <action name="Lower"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="Unshade"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="Top">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>top</edge>
        </action>
      </mousebind>
    </context>
    <context name="Left">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>left</edge>
        </action>
      </mousebind>
    </context>
    <context name="Right">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>right</edge>
        </action>
      </mousebind>
    </context>
    <context name="Bottom">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>bottom</edge>
        </action>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="BLCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="BRCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TLCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TRCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Client">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Icon">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="AllDesktops">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleOmnipresent"/>
      </mousebind>
    </context>
    <context name="Shade">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleShade"/>
      </mousebind>
    </context>
    <context name="Iconify">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="Iconify"/>
      </mousebind>
    </context>
    <context name="Maximize">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleMaximizeFull"/>
      </mousebind>
      <mousebind button="Middle" action="Click">
        <action name="ToggleMaximizeVert"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ToggleMaximizeHorz"/>
      </mousebind>
    </context>
    <context name="Close">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="Close"/>
      </mousebind>
    </context>
    <context name="Desktop">
      <mousebind button="Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="C-A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="C-A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Root">
      <!-- Menus -->
      <mousebind button="Middle" action="Press">
        <action name="ShowMenu">
          <menu>client-list-combined-menu</menu>
        </action>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="ShowMenu">
          <menu>root-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="MoveResize">
      <mousebind button="Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
    </context>
  </mouse>
  <menu>
    <!-- You can specify more than one menu file in here and they are all loaded,
       just don't make menu ids clash or, well, it'll be kind of pointless -->
    <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
    <!-- system menu files on Debian systems 
    <file>/var/lib/openbox/debian-menu.xml</file>
    <file>debian-menu.xml</file> -->
    <file>menu.xml</file>
    <hideDelay>200</hideDelay>
    <middle>no</middle>
    <submenuShowDelay>100</submenuShowDelay>
    <applicationIcons>yes</applicationIcons>
  </menu>
  <applications>
    <!--
  # this is an example with comments through out. use these to make your
  # own rules, but without the comments of course.

  <application name="first element of window's WM_CLASS property (see xprop)"
              class="second element of window's WM_CLASS property (see xprop)"
               role="the window's WM_WINDOW_ROLE property (see xprop)">
  # the name or the class can be set, or both. this is used to match
  # windows when they appear. role can optionally be set as well, to
  # further restrict your matches.

  # the name, class, and role use simple wildcard matching such as those
  # used by a shell. you can use * to match any characters and ? to match
  # any single character.

  # when multiple rules match a window, they will all be applied, in the
  # order that they appear in this list


    # each element can be left out or set to 'default' to specify to not 
    # change that attribute of the window

    <decor>yes</decor>
    # enable or disable window decorations

    <shade>no</shade>
    # make the window shaded when it appears, or not

    <position>
      # the position is only used if both an x and y coordinate are provided
      # (and not set to 'default')
      <x>center</x>
      # a number like 50, or 'center' to center on screen. use a negative number
      # to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
      # right edge (or bottom).
      <y>200</y>
      <monitor>1</monitor>
      # specifies the monitor in a xinerama setup.
      # 1 is the first head, or 'mouse' for wherever the mouse is
    </position>

    <focus>yes</focus>
    # if the window should try be given focus when it appears. if this is set
    # to yes it doesn't guarantee the window will be given focus. some
    # restrictions may apply, but Openbox will try to

    <desktop>1</desktop>
    # 1 is the first desktop, 'all' for all desktops

    <layer>normal</layer>
    # 'above', 'normal', or 'below'

    <iconic>no</iconic>
    # make the window iconified when it appears, or not

    <skip_pager>no</skip_pager>
    # asks to not be shown in pagers

    <skip_taskbar>no</skip_taskbar>
    # asks to not be shown in taskbars. window cycling actions will also
    # skip past such windows

    <fullscreen>yes</fullscreen>
    # make the window in fullscreen mode when it appears

    <maximized>true</maximized>
    # 'Horizontal', 'Vertical' or boolean (yes/no)
  </application>

  # end of the example
-->
    <application name="gmessage">
      <decor>no</decor>
      <shade>no</shade>
      <skip_pager>yes</skip_pager>
      <skip_taskbar>yes</skip_taskbar>
      <fullscreen>no</fullscreen>
      <maximized>no</maximized>
    </application>
    <application name="openbox-logout">
      <decor>no</decor>
      <shade>no</shade>
      <skip_pager>yes</skip_pager>
      <fullscreen>no</fullscreen>
      <maximized>no</maximized>
      <layer>above</layer>
    </application>
  </applications>
</openbox_config>

Dernière modification par guantas (2011-01-20 23:39:06)

Hors ligne

#2 2011-01-20 21:38:49

wlourf
wlourfeur
Inscription : 2010-09-11
Messages : 1 018

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

~/.conkyrc

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
#  Settings
##############################################
background yes
use_xft yes
xftfont monospace:size=9
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 200
maximum_width 240
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color d9d7d6
default_shade_color 000000
default_outline_color d9d7d6
alignment top_right
gap_x 12
gap_y 24
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
##############################################
#  Output
##############################################
TEXT
SYSTEM INFO:
${hr}
Host:$alignr$nodename
Uptime:$alignr$uptime
RAM:$alignr$mem/$memmax
Swap usage:$alignr$swap/$swapmax
Disk usage:$alignr${fs_used /}/${fs_size /}
CPU usage:$alignr${cpu cpu0}%


SHORTCUT KEYS:
${hr}
Alt+F2$alignr Run Dialog
Alt+F3$alignr Alt Menu
Super+Space$alignr Main Menu
Super+Tab$alignr Client Menu
Super+t$alignr Terminal
Super+f$alignr File Manager
Super+e$alignr Editor
Super+m$alignr Media Player
Super+w$alignr Web Browser
Super+l$alignr Lock Screen
Super+v$alignr Volume Control
Super+x$alignr Logout
PrtSc$alignr Screenshot

/usr/bin/openbox-logout

#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk
import os

class DoTheLogOut:

    # Cancel/exit
    def delete_event(self, widget, event, data=None):
        gtk.main_quit()
        return False

    # Logout
    def logout(self, widget):
        os.system("openbox --exit")

    # Reboot
    def reboot(self, widget):
        os.system("gdm-control --reboot && openbox --exit")

    # Shutdown
    def shutdown(self, widget):
        os.system("gdm-control --shutdown && openbox --exit")

    def __init__(self):
        # Create a new window
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.set_title("Exit? Choose an option:")
        self.window.set_resizable(False)
        self.window.set_position(1)
        self.window.connect("delete_event", self.delete_event)
        self.window.set_border_width(20)

        # Create a box to pack widgets into
        self.box1 = gtk.HBox(False, 0)
        self.window.add(self.box1)

        # Create cancel button
        self.button1 = gtk.Button("_Cancel")
        self.button1.set_border_width(10)
        self.button1.connect("clicked", self.delete_event, "Changed me mind :)")
        self.box1.pack_start(self.button1, True, True, 0)
        self.button1.show()

        # Create logout button
        self.button2 = gtk.Button("_Log out")
        self.button2.set_border_width(10)
        self.button2.connect("clicked", self.logout)
        self.box1.pack_start(self.button2, True, True, 0)
        self.button2.show()

        # Create reboot button
        self.button3 = gtk.Button("_Reboot")
        self.button3.set_border_width(10)
        self.button3.connect("clicked", self.reboot)
        self.box1.pack_start(self.button3, True, True, 0)
        self.button3.show()

        # Create shutdown button
        self.button4 = gtk.Button("_Shutdown")
        self.button4.set_border_width(10)
        self.button4.connect("clicked", self.shutdown)
        self.box1.pack_start(self.button4, True, True, 0)
        self.button4.show()

        self.box1.show()
        self.window.show()

def main():
    gtk.main()

if __name__ == "__main__":
    gogogo = DoTheLogOut()
    main()

Hors ligne

#3 2011-01-21 00:12:47

Kookaburra
#! /bin/modo
Inscription : 2010-09-26
Messages : 871
Site Web

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

Merci, super initiative smile
Hop, j'épingle big_smile


Portable17p : CrunchBangLinux // EeePC : ArchLinux
Eeepad Transformer : Android Honeycomb 3.2 // GalaxyS : Android 2.2

Ma page DevArt : http://kookadimi.deviantart.com
Mes photos : http://www.fluidr.com/photos/kookadimi/sets

Hors ligne

#4 2011-01-22 21:58:54

wacly
Crunchbanger
Inscription : 2010-12-04
Messages : 380

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

yeah bonne idée lol
Merci pour le partage wink


J'utilise Dropbox pour accéder à mes fichiers partout !
6,75 Go grâce à vous smile

Hors ligne

#5 2011-02-13 18:04:58

wlourf
wlourfeur
Inscription : 2010-09-11
Messages : 1 018

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

les 3 pipe-menus de la version 20110207, dans ~/.config/openbox/pipemenus/

~/.config/openbox/pipemenus/dash_places_menu.sh

#!/bin/sh
#    dash_places_menu.sh - a shell (hopefully dash!) places openbox pipe menu
#    Copyright (C) 2010  John Crawley
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

# Usage: add
# <menu id="places" label="Places" execute="/path/to/dash_places_menu.sh ~" />
# to your .config/openbox/menu.xml

# or, if you want the "recent files" menu incorporated at the top, use:
# <menu id="places" label="Places" execute="/path/to/dash_places_menu.sh --recent ~" />
# make sure you have recently_opened_menu.sh somewhere, and enter its path below.

# path to your "recent files" script, if you want to incorporate it:
recent_script="$HOME"/scripts/recently_opened_menu.sh

# Command to open folders at "Browse here..." - any file manager
open_folder_cmd=thunar
# Default command to open files with - others might be xdg-open, gnome-open, pcmanfm...
default_open_cmd=exo-open  # exo-open comes with thunar
# Text editor of choice
text_editor=gedit

# function to open files with default open command, or alternative command for certain files
# - add other conditions to choice
open_file() {
    [ -x "$1" ] && exec "$text_editor" "$1"     # comment out this line if you don't want to edit executables instead of executing
    #[ -x "$1" ] && exec "terminator -e" "$1"     # uncomment this and comment out previous line to run executables in terminal instead of editing
    [ "${1##*.}" = desktop ] && exec "$text_editor" "$1"     # comment out this line if you don't want to edit .desktop files instead of executing
    exec "$default_open_cmd" "$1"     # use default open command if above conditions not satisfied
}

# extra dotfiles to display in HOME folder (dotfiles are hidden by default)
# edit the list (space separated, surrounded by single quotes) or comment this line out, to taste:
shown_dotfiles='.config .local .Xdefaults .bash_aliases .bashrc .fonts.conf .gtkrc-2.0.mine .profile .xsession-errors'

# By default, this script will display directories separately, before files.
# To change this behaviour, see NOTE1, NOTE2 and NOTE3 below, near end of page.

#######################################################################

case $1 in
# if "--open" option is sent as $1, open file ($2) instead of generating menu
--open)
    open_file "$2"
    echo "$0 : failed to open $2" >&2
    exit;;    # in case exec command fails
# if "--recent" option is sent, incorporate "recent files" menu
--recent)
    shift
    output='<openbox_pipe_menu>
'
    if [ -x "$recent_script" ]
    then
        output="$output"'<separator label="Recently opened..." />
<menu execute="'"$recent_script"'" id="recent" label="files" />
'
    else
        echo "$0 : cannot find executable script $recent_script" >&2
    fi;;
*)
    output='<openbox_pipe_menu>
';;
esac

path="${1:-$HOME}"  # default starting place is ~, otherwise $1
path="$( echo "${path}"/ | tr -s '/' )"    # ensure one final slash
[ -d "$path" ] || { echo "$0 : $path is not a directory" >&2; exit 1; }

case "$path" in    # only escape if string needs it
*\&*|*\<*|*\>*|*\"*|*\'*) pathe=$(sed "s/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/\"/\&quot;/g;s/'/\&apos;/g;") <<XXX
$path
XXX
;;
*)pathe=$path;;
esac

case "$pathe" in
*\&apos\;*) pathe_apos=$(sed 's/\&apos;/\&apos;\&quot;\&apos;\&quot;\&apos;/g;')<<XXX
$pathe
XXX
;;
*) pathe_apos=$pathe;;
esac

output="$output"'<separator label="'$pathe'" />
<item label="Browse here...">
    <action name="Execute">
        <command>
         &apos;'"$open_folder_cmd"'&apos; &apos;'"$pathe_apos"'&apos;
        </command>
    </action>
</item>
<separator />
'

unset extra_entries directories_menu files_menu
[ "$path" = "$HOME"/ ] && extra_entries="$shown_dotfiles"
for i in "$path"* $extra_entries
do
    [ -e "$i" ] || continue    # only output code if file exists
    shortname="${i##*/}"
    case $shortname in
    *\&*|*\<*|*\>*|*\"*|*\'*) shortnamee=$(sed "s/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/\"/\&quot;/g;s/'/\&apos;/g;") <<XXX
$shortname
XXX
    ;;
    *) shortnamee=$shortname;;
    esac
    case $shortnamee in
    *\&apos\;*) shortnamee_apos=$(sed 's/\&apos;/\&apos;\&quot;\&apos;\&quot;\&apos;/g;')<<XXX
$shortnamee
XXX
    ;;
    *) shortnamee_apos=$shortnamee;;
    esac
    [ -d "$i" ] && { 
# NOTE1 If you want directories and files listed together    
# change next line (directories_menu="$directories_menu"') to read:    files_menu="$files_menu"' (note the one single quote at the end)
    directories_menu="$directories_menu"'
<menu id="'"${pathe_apos}${shortnamee_apos}"'" label="'"$shortnamee"'" execute="&apos;'"$0"'&apos; &apos;'"${pathe_apos}${shortnamee_apos}"'&apos;" />'; continue; }
    files_menu="$files_menu"' 
<item label="'"$shortnamee"'">
    <action name="Execute">
        <command>
        &apos;'"$0"'&apos; --open &apos;'"${pathe_apos}${shortnamee_apos}"'&apos;
        </command>
    </action>
</item>'
done

[ -n "$directories_menu" ] && {
# NOTE2 comment out next 2 lines if you don't want "Directories" label
output="${output}"'<separator label="Directories" />
'
output="${output}${directories_menu}"'
'; }
[ -n "$files_menu" ] && {
# NOTE3 comment out next 2 lines if you don't want "Files" label
output="${output}"'<separator label="Files" />
'
output="${output}${files_menu}"'
'; }
output="${output}"'</openbox_pipe_menu>
'
printf '%s' "$output"
exit

~/.config/openbox/pipemenus/recently_opened_menu.sh

#!/bin/sh
#    recently_opened_menu.sh - a script to parse .recently-used.xbel
#    and generate openbox pipe menu
#    Copyright (C) 2010  John Crawley
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

# Usage: add
# <menu id="recent" label="Recent Files" execute="/path/to/recently_opened_menu.sh" />
# to your .config/openbox/menu.xml, or use with dash_places_menu.sh (see comments there)

maximum_entries=15 # max. number of entries in menu

#######################################################################

# if argument is --clear, empty .recently-used.xbel
[ "$1" = '--clear' ] && {
cat <<':EOF' > "${HOME}"/.recently-used.xbel
<?xml version="1.0" encoding="UTF-8"?>
<xbel version="1.0"
      xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
      xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
>
</xbel>
:EOF
exit
}

maximum_entries=$((maximum_entries+2))

pre='    <item label="'
mid='">
    <action name="Execute"><command>'
post='</command></action>
    </item>'
    
files=$( tac "${HOME}"/.recently-used.xbel |  awk -v MAX="$maximum_entries" -v PR="$pre" -v MI="$mid" -v PO="$post" 'BEGIN {
    RS="</bookmark>";
    FS="<info>";
}
(NR == MAX) {exit}
!/<bookmark/ {next}
# $1 is the command, $2 the file path
{
    sub(/^.*exec=\"\&apos\;/,"",$1)
    sub(/\&apos\;.*$/,"",$1)
    sub(/ *%./,"",$1)
    sub(/^.*file:\/\//,"",$2)
    sub(/\".*$/,"",$2)
    gsub(/%22/,"\&quot;",$2)
    gsub(/%3C/,"\&lt;",$2)
    gsub(/%3E/,"\&gt;",$2)
    name=$2
    sub(/^.*\//,"",name)
    gsub(/\&apos;/,"\&apos;\&quot;\&apos;\&quot;\&apos;",$2)
    print (PR name MI $1 " '"'"'" $2 "'"'"'" PO)
}' )  

# use perl to decode urlencoded characters
files=$(perl -MURI::Escape -e 'print uri_unescape($ARGV[0]);' "$files")

output='<openbox_pipe_menu>
'"$files"'
<separator />
    <item label="Clear Recent Files">
        <action name="Execute">
            <command>
            &apos;'"$0"'&apos; --clear
            </command>
        </action>
    </item>
</openbox_pipe_menu>
'
printf '%s' "$output"  # printf because echo sometimes eats backslashes

~/.config/openbox/pipemenus/obpipemenu-places

#!/usr/bin/perl
# Recursively browse filesystem through openbox3 pipe menus
#### Usage: add
# <menu id="browse" label="Browse" execute="obpipemenu-places ~" />
# to your .config/openbox/menu.xml
#### CAVEAT ####
# This script was hacked on exclusively in stints between the hours of
# 4 and 5 in the morning. Quality may have suffered.
####
# Script by dircha from ob list on 05/17/04
# suggested improvements by John Russell on 05/17/04 implemented 
# a year later by Kacper Wysocki.
# 05/30/05 - Kacper Wysocki
# - opens files with 'rox', which launches appropriate file handler
# - hidden directories now stay hidden
# - spaces, ampersands in dir- and filenames are escaped
# - newlines at each entry to make output a little readable
# 06/04/05 - Kacper Wysocki
# - use $0 for scriptname
# - use $ENV{'HOME'} as default path
# - now follows symlinks

use strict;

# Command to lauch files with
my $cmd = "thunar";

my $path = $ARGV[0];
$path = "$ENV{'HOME'}" if $path eq "";
my @files = split /\n/, `ls -1p '$path'`;
mk_menu_element($path, @files);

sub mk_menu_element {
    my ($path, @files) = @_;

    print "<openbox_pipe_menu>\n";
    
    # "Browse here..." lauches this dir
    print "<item label=\"Browse here..\">".
           "\n\t<action name=\"Execute\">".
           "\n\t\t<execute>$cmd '$path'</execute>".
           "\n\t</action>".
           "\n</item>\n".
           "<separator />";

    foreach $_ (@files) {
        my $length = length $_;
        my $last_c = substr $_, $length - 1, 1;

        if ($last_c eq "/") {
            print mk_dir_element($path, substr $_, 0, $length - 1);
        } elsif ($last_c eq "@") {
            print mk_sym_element($path, substr $_, 0, $length - 1);
        } else {
            print mk_file_element($path, $_);
        }
    }
    print "</openbox_pipe_menu>\n";
}

sub mk_dir_element {
    my ($path, $name) = @_;
    # escape ampersand and space in pathnames
    $path =~ s/&/&amp;/g;
    $name =~ s/&/&amp;/g;
    $path =~ s/ /\\ /g;
    $name =~ s/ /\\ /g;

    return "<menu id=\"$path/$name\" label=\"$name\" execute=\"$0 $path/$name\" />\n";
}

sub mk_sym_element {
    my ($path, $name) = @_;
    # escape ampersand in pathnames
    $path =~ s/&/&amp;/g;
    $name =~ s/&/&amp;/g;

    # Follow symlinks instead of opening links in rox.
    return "<menu id=\"$path/$name\" label=\"$name\" execute=\"$0 $path/$name\" />\n";
=cut
    return "<item label=\"$name\">".
           "\n\t<action name=\"Execute\">".
           "\n\t\t<execute>$cmd '$path/$name'</execute>".
           "\n\t</action>"
           . "\n</item>\n";
=cut
}

sub mk_file_element {
    my ($path, $name) = @_;
    my $label = $name;
    # escape ampersand in pathnames
    $path =~ s/&/&amp;/g;
    $name =~ s/&/&amp;/g;

    return "<item label=\"$name\">".
           "\n\t<action name=\"Execute\">".
           "\n\t\t<execute>$cmd '$path/$name'</execute>".
           "\n\t</action>"
           . "\n</item>\n";
}

Hors ligne

#6 2011-02-13 18:43:03

Kookaburra
#! /bin/modo
Inscription : 2010-09-26
Messages : 871
Site Web

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

C'est quoi la diffèrence de résultat entre le premier et le troisième script ?


Portable17p : CrunchBangLinux // EeePC : ArchLinux
Eeepad Transformer : Android Honeycomb 3.2 // GalaxyS : Android 2.2

Ma page DevArt : http://kookadimi.deviantart.com
Mes photos : http://www.fluidr.com/photos/kookadimi/sets

Hors ligne

#7 2011-02-13 18:59:38

wlourf
wlourfeur
Inscription : 2010-09-11
Messages : 1 018

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

c'est le premier script qui est utilisé dans menu.xml, le troisième était utilisé dans les versions antérieures, il a dû être gardé en souvenir !!
Maintenant, les fichiers et les dossiers sont bien distincts dans le menu, comme on peut le voir sur cette image :
[center]f-menu4d580d7e0008ec02.png[/center]

Hors ligne

#8 2011-02-13 19:28:26

wlourf
wlourfeur
Inscription : 2010-09-11
Messages : 1 018

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

/usr/bin/cb-printing-pipemenu de la version r20110207:

#!/bin/bash
# ---------------------------------------------------------------------
# An Openbox pipemenu for configuring printing under CrunchBang Linux.
# Written for CrunchBang Linux <http://crunchbanglinux.org/>
# by Philip Newborough (aka corenominal) <mail@philipnewborough.co.uk>
# ---------------------------------------------------------------------

# Set flag
INSTALLED=false

if [ "$1" = "--install" ]; then
    terminator --command="cb-printing-pipemenu --install-printing"
    exit 0
fi
if [ "$1" = "--install-printing" ]; then
    clear
    echo ""
    echo "  INSTALL PRINTING SUPPORT"
    echo "  ------------------------"
    echo "  This script will install printing support."
    echo ""
    echo -n "  Run the installer now? (Y|n) > "
    read a
    if [ "$a" = "y" ] || [ "$a" = "Y" ] || \
    [ "$a" = "" ]; then
        # Checking internet connection...
        clear
        echo "  Checking internet connection..."
        sleep 2s
        echo ""
        IS=`/bin/ping -c 1 ftp.de.debian.org | grep -c "64 bytes"`
        if [ "$IS" -lt "1" ]; then
            until [ "$CONT" != "" ]; do
                echo ""
                IS=`/bin/ping -c 1 ftp.de.debian.org | grep -c "64 bytes"`
                if [ "$IS" -lt "1" ]; then
                    clear
                    echo "  Internet connection test failed!"
                    echo ""
                    echo "  This script requires a working internet connection. Please configure"
                    echo "  your internet connection, then hit any key to continue, else hit \"q\""
                    echo "  to quit."
                    read -n1 a
                    if [ "$a" = "q" ]; then
                        clear
                        echo "Script aborted."
                        sleep 3s
                        exit 0
                    fi
                else
                    CONT="pass"
                fi
            done
        fi
        clear
        echo "  Internet connection test passed..."
        sleep 2s
        clear
        echo "  Updating sources..."
        sleep 2s
        sudo apt-get update
        clear
        if ! sudo apt-get install -y cups cups-pdf system-config-printer hpijs; then
            clear
            echo ""
            echo "  There was a problem installing printing packages."
            echo ""
            echo "  Hit any key to try again, or \"q\" to quit..."
            read -n1 a
            if [ "$a" = "q" ] || [ "$a" = "Q" ]; then
                clear
                exit 0
            else
                cb-printing-pipemenu --install-printing
                exit 0
            fi
        else
            clear
            echo ""
            echo "  Printing support has been installed successfully."
            echo ""
            echo "  Hit any key to exit..."
            read -n1 a
            exit 0
        fi
    else
        exit 0
    fi
fi
# Start pipemenu
echo "    <openbox_pipe_menu>"

# check for system-config-printer
if [ -x "/usr/bin/system-config-printer" ];then
    INSTALLED=true
    cat << _scf_
        <item label="Configure Printers">
            <action name="Execute">
                <execute>
                    gksudo system-config-printer
                </execute>
            </action>
        </item>
_scf_
fi

if [ $INSTALLED = false ]; then
    cat << _install_
        <item label="Install Printing Support">
            <action name="Execute">
                <execute>
                    cb-printing-pipemenu --install
                </execute>
            </action>
        </item>
_install_
fi

# End pipemenu
echo "    </openbox_pipe_menu>"
exit 0

Hors ligne

#9 2011-02-25 23:53:42

DarthWound
Invité

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

Au fait le lien est pas valide depuis un sacré moment (celui du pastebin).

#10 2011-02-26 09:59:04

Kookaburra
#! /bin/modo
Inscription : 2010-09-26
Messages : 871
Site Web

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

si si, juste qu'il n'était bien formé (= balises) roll


http://crunchbanglinux-fr.pastebin.com/ … in.php?p=1


Portable17p : CrunchBangLinux // EeePC : ArchLinux
Eeepad Transformer : Android Honeycomb 3.2 // GalaxyS : Android 2.2

Ma page DevArt : http://kookadimi.deviantart.com
Mes photos : http://www.fluidr.com/photos/kookadimi/sets

Hors ligne

#11 2011-02-26 17:32:33

DarthWound
Invité

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

Oki

#12 2011-05-29 16:52:01

DarthWound
Invité

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

Désolé mais là le lien est mort encore ^^

#13 2011-05-30 03:15:02

arpinux
naked'modo
Lieu : en famille
Inscription : 2010-09-12
Messages : 2 791
Site Web

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

darth? tu pourras vérifier si je dois changer mes fichiers de conf dans le wiki de françisation ? j'ai des updates à faire?

Hors ligne

#14 2011-05-30 03:22:20

DarthWound
Invité

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

A priori non car tous tes liens renvoient sur ton dropbox.

Mais peut-être mal vu, j'ai une migraine de 3 jours roll

#15 2011-05-30 03:41:31

arpinux
naked'modo
Lieu : en famille
Inscription : 2010-09-12
Messages : 2 791
Site Web

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

ouf! big_smile

Hors ligne

#16 2011-11-28 05:34:43

DarthWound
Invité

Re : Originaux: autostart.sh, menu.xml et rc.xml (install du 20 01 11)

Il va falloir mettre à jour les fichiers les gars smile

Pied de page des forums