Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Bash - Agregar Sub-Dock + Lanzador
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Bash - Agregar Sub-Dock + Lanzador
inukaze Español 1 matttbe [Read]
03 September 2014 à 21:10

inukaze, Thursday 31 July 2014 à 13:21


Subscription date : 31 July 2014
Messages : 1
Hola muy buenas , me gustaria saber , como puedo hacer para crear un sub-dock + un lanzador
para cairo-dock.

estaba intentando hacer algo asi
Ruta_Actual="$PWD" &> /dev/null
Titulo="Lanzame"
CairoDock=`ps -A | grep cairo-dock | awk '{print $4}' | head -1`

if [ "$CairoDock" = "cairo-dock" ]; then
    touch "$HOME"
    VersionDelCairoDock=$(cat "$HOME/.config/cairo-dock/current_theme/cairo-dock.conf" | head -n 1)
    Contenedor="$HOME/.config/cairo-dock/current_theme/launchers/97container.desktop"
    IconoParaElContenedor="$HOME/.config/cairo-dock/current_theme/launchers/01$Titulo.desktop"

if test ! -f "$Contenedor"
    then
    echo "$VersionDelCairoDock

#[gtk-about]

[Desktop Entry]

#F[Icon]
frame_maininfo=

#d+ Name of the container it belongs to:
Container=_MainDock_

#s[New sub-dock] Sub-dock's name:
Name=Abandonware

#v
sep_display=

#Y+[Use an image;1;1;Draw sub-dock's content as emblems;0;0;Draw sub-dock's content as stack;0;0;Draw sub-dock's content inside a box;0;0] How to render the icon:
render=0

#S+ Image's name or path:
Icon=$Ruta_Actual/.MSDos.png

#X[Extra parameters]
frame_extra=

#n Name of the view used for the sub-dock:
Renderer=

#i-[0;16] Only show in this specific viewport:
#{If '0' the container will be displayed on every viewport.}
ShowOnViewport=0

#f[0;100] Order you want for this launcher among the others:
Order=1

Icon Type=1
Type=Container" | tee "$Contenedor" &> /dev/null
fi

if test -f "$Contenedor"
    then
        if test -f "$IconoParaElContenedor"
            then
            rm "$IconoParaElContenedor"
        fi
fi

if test ! -f "$IconoParaElContenedor"
then    
    echo "$VersionDelCairoDock

#[gtk-about]

[Desktop Entry]

#F[Icon]
frame_maininfo=

#d+ Name of the container it belongs to:
Container=Abandonware

#v
sep_display=

#s[Default] Launcher's name:
Name=$Titulo

#S+[Default] Image's name or path:
Icon=$Ruta_Actual/.$Titulo.png

#s[Default] Command to launch on click:
#{Example: nautilus --no-desktop, gedit, etc. You can even enter a shortkey, e.g. <Alt>F1, <Ctrl>c, <Ctrl>v, etc}
Exec=sh "'"'$Ruta_Actual'"'"/Iniciar

#X[Extra parameters]
frame_extra=

#b Don't link the launcher with its window
#{If you chose to mix launcher and applications, this option will deactivate this behaviour for this launcher only. It can be useful for instance for a launcher that launches a script in a terminal, but you don't want it to steal the terminal's icon from the taskbar.}
prevent inhibate=false

#K[Default] Class of the program:
#{The only reason you may want to modify this parameter is if you made this launcher by hands. If you dropped it into the dock from the menu, it is nearly sure that you shouldn't touch it. It defines the class of the program, which is useful to link the application with its launcher.}
StartupWMClass=

#b Run in a terminal?
Terminal=false

#i-[0;16] Only show in this specific viewport:
#{If '0' the launcher will be displayed on every viewport.}
ShowOnViewport=0

#f[0;100] Order you want for this launcher among the others:
Order=1

Icon Type=0
Type=Application
Origin=$DirectorioEscritorio/$Titulo.desktop" | tee "$IconoParaElContenedor" &> /dev/null
fi
fi


Los archivos se crean , y eso , pero no veo que aparescan inmediatamente en el Dock , que necesito hacer , para ello ???

matttbe, Wednesday 03 September 2014 à 21:10


Subscription date : 24 January 2009
Messages : 12573
Hello and sorry for the delay,

Unfortunately none of us speaks Spanish.

Google Translate :
Very good Hello, I would like to know, as I can do to create a sub-dock + a launcher
for cairo-dock.

I was trying to do something like:
(...)

The files are created, and that, but I see aparescan immediately in the Dock, I need to do, to do ???


If I understand well, you can to create a sub-dock and launcher with a script. If yes, you should have a look to this wiki page => Control_your_dock_with_DBus

E.g. to create a new launcher with one bash command:
python -'import dbus; print dbus.Bus().call_blocking(
    "org.cairodock.CairoDock", "/org/cairodock/CairoDock", "org.cairodock.CairoDock",
    "Add", "a{sv}",
    ({"type": "Launcher", "name": "Lanzame", "position": dbus.Int32(1), "command": "$PWD/Iniciar", "icon": "$PWD/.Lanzame.png"},))'

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Bash - Agregar Sub-Dock + Lanzador
inukaze Español 1 matttbe [Read]
03 September 2014 à 21:10


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Bash - Agregar Sub-Dock + Lanzador Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.