SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-08-05 21:07:11

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

How-To xfce4-panel and tint2 panel launch scripts

Background - I have used cairo-dock forever..  I wanted to switch to tint2 launchers or xfce4-panel launchers but each had limitations as to how they behaved..

ToZ is an individual I met on the XFCE forums and did ALL of this coding..  He gets every bit of the credit, all I did was request for help and ToZ did it all..  I am very grateful to ToZ smile

Tint2 -

The new launcher capability in tint2 is great, but I could not use it like I had cairo-dock setup.  If you had an app open and clicked on the launcher again, it would open a new instance of the app.  In cairo-dock, this is defined by a class of the program that you linked to it and stopped multiple instances opening..

tint2 - Solution

You will first need to install wmctrl and xdotool, the tools that are used to manage windows (opened apps)

sudo apt-get install wmctrl
sudo apt-get install xdotool

Now create the launch file

gksudo gedit /usr/local/bin/launch

and put the following code in:

#!/bin/bash
# This script acts as a launcher for apps that observes the following rules:
#   1. If the app is not running, then start it up
#   2. If the app is running, don't start a second instance, instead:
#     2a. If the app does not have focus, give it focus
#     2b. If the app has focus, minimize it
# Reference link: http://forum.xfce.org/viewtopic.php?id=6168&p=1

# there has to be at least one parameter, the name of the file to execute
if [ $# -lt 1 ]
then
  echo "Usage: `basename $0` {executable_name parameters}"
  exit 1
fi

BNAME=`basename $1`

# test to see if program is already running
if [ "`wmctrl -lx | tr -s ' ' | cut -d' ' -f1-3 | grep -i $BNAME`" ]; then 
    # means it must already be running
    ACTIV_WIN=$(xdotool getactivewindow getwindowpid)
    LAUNCH_WIN=$(ps -ef | grep "$BNAME" | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n 1)

    if [ "$ACTIV_WIN" == "$LAUNCH_WIN" ]; then
        # launched app is currently in focus, so minimize
        xdotool getactivewindow windowminimize
    else
        # launched app is not in focus, so raise and bring to focus
        for win in `wmctrl -lx | tr -s ' ' | cut -d' ' -f1-3 | grep -i $BNAME | cut -d' ' -f1`
        do
            wmctrl -i -a $win
        done
    fi
    exit

else
    # start it up
    $*&
fi

exit 0

Save the file

next make the file executable

sudo chmod +x /usr/local/bin/launch

Now you are set to create launchers in tint2

Here is how I use mine, with a couple of key points to consider...

#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------

#---------------------------------------------
# BACKGROUND AND BORDER
#---------------------------------------------

# Background definitions
# ID 1 for Panel
rounded = 0
border_width = 0
background_color = #ffffff 0
#border_color = #000000 70

# ID 2
rounded = 1
border_width = 1
background_color = #ffffff 0
#border_color = #D8D8D8 29

# ID 3
rounded = 1
border_width = 1
background_color = #ffffff 0
#border_color = #121212 89

# ID 4
rounded = 1
border_width = 1
background_color = #ffffff 0
#border_color = #ED2323 60

# ID 5
rounded = 0
border_width = 1
background_color = #ffffff 0
#border_color = #000000 0

# ID 6
rounded = 6
border_width = 0
background_color = #ffffff 0
#border_color = #D8D8D8 0

# ID 7
rounded = 3
border_width = 0
background_color = #ffffff 0
#border_color = #222222 89

# ID 8
rounded = 1
border_width = 1
background_color = #ffffff 0
#border_color = #888888 200

# ID 9
rounded = 6
border_width = 0
background_color = #ffffff 0
#border_color = #888888 20

# ID 10
rounded = 0
border_width = 0
background_color = #ffffff 0
#border_color = #888888 20


#---------------------------------------------
# PANEL
#---------------------------------------------
panel_items = L
panel_monitor = all
panel_position = bottom middle
panel_size = 30% 85
panel_margin = 0 0
panel_padding = 7 0
font_shadow = 0
panel_background_id = 0
panel_layer = top

#---------------------------------------------
# TASKBAR
#---------------------------------------------
taskbar_mode = single_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 1

#---------------------------------------------
# TASKS
#---------------------------------------------
#task_icon = 1
#task_text = 0
#task_width = 40
#task_centered = 1
#task_padding = 2 2
#task_font = sans 7
#task_font_color = #ffffff 70
#task_active_font_color = #ffffff 85
#task_background_id = 3
#task_active_background_id = 2

#---------------------------------------------
# SYSTRAYBAR
#---------------------------------------------
#systray_padding = 4 2 3
#systray_background_id = 1

#---------------------------------------------
# CLOCK
#---------------------------------------------
#time1_format = %H:%M
#time1_font = sans 8
#time2_format = %A %d %B
#time2_font = sans 6
#clock_font_color = #ffffff 76
#clock_padding = 4 4
#clock_background_id = 1

#---------------------------------------------
# BATTERY
#---------------------------------------------
#battery = 0
#battery_low_status = 7
#battery_low_cmd = notify-send "battery low"
#bat1_font = sans 8
#bat2_font = sans 6
#battery_font_color = #ffffff 76
#battery_padding = 1 0
#battery_background_id = 0

# Launchers
launcher_icon_theme = LinuxLex-8
launcher_padding = 5 0 10
launcher_background_id = 9
launcher_icon_size = 85
# launcher_item_app = /usr/share/applications/gedit.desktop
launcher_item_app = /home/vastone/bin/iceweasel.desktop
launcher_item_app = /home/vastone/bin/terminator.desktop
launcher_item_app = /home/vastone/bin/pcmanfm-mod.desktop
launcher_item_app = /home/vastone/bin/gmusicbrowser.desktop
# launcher_item_app = /usr/share/applications/clementine.desktop
launcher_item_app = /home/vastone/bin/virtualbox.desktop
launcher_item_app = /home/vastone/bin/xchat.desktop
# launcher_item_app = /usr/share/applications/vlc.desktop


#---------------------------------------------
# MOUSE ACTION ON TASK
#---------------------------------------------
mouse_middle = none
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify


# Panel Autohide
autohide = 1
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 3
strut_policy = minimum

Note that I have only L in

panel_items = L

That is because I use this as a second tint2 config (tint2rctwo) and call it on startup.  This keeps the launchers only at the bottom, just like I had it setup in cairo-dock.

In tint2,  .desktop files needed for launchers (and are the only way you can launch and app)... as you can see, I have moved some of my launchers to my /home/vastone/bin directory..  I did this so that I can easily edit them and use the icons and launcher that is needed..  You can keep and use and edit the ones already in /user/share/applications

Here is a snippet of my iceweasel launcher and how I use launch to make it work

[Desktop Entry]

(deleted non important info for this How To)

Exec=launch iceweasel %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/vastone/images/firefox01-04.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Firefox-bin
StartupNotify=true

You see in

Exec=launch iceweasel %u      This is where the launch script is engaged ..  and in

Icon=/home/vastone/images/firefox01-04.png      is where I setup my icon for this...

Thats it for tint2

xcfe4-panel

Same situation, you can create Launchers within xfce4-panel, but if you click on an icon it opens a new instance and not what is already open

xfce4-panel solution

Using the same launch script add it to the launchers you create within the panel

Create a new launcher (pcmanfm-mod for demo purposes):
Right-click Panel->Panel->Add New Items,
select "Launcher" and click "Add" (new launcher appears on panel), click "Close"
Right-click the new launcher icon->Properties
click on "Add new empty item" button (4th button down on right side)
set: Name = pcmanfm
       Comment = <whatever_you_want>
       Command = launch pcmanfm-mod --no-desktop
       Select an icon
       Check "Use startup notification"
Click "Create

Image showing the setup..

screenshot-08052011-035243pm.png

And that is all there is to it for tint2 and xfce4-panels to be more intuitive as launchers and for me, to replace cairo-dock

This image shows tint2 at the bottom and xfce4-panel on the left

screenshot-08052011-040101pm.png

Thats it...  Again a million thanks to ToZ for hearing my requests and sharing his great solutions..!

Edit - I also tested this with adeskbar and it works great..  Just add "launch" before any command..

screenshot-08052011-064935pm.png

UPDATE - 08 February 2012

Using the launchers the same as tasks is now doable now thanks to my friend ToZ.  The  launch file above has been updated and now uses wmctrl and xdotool and will treat each tint2 launcher the same as a task.  It will not add a task to the launcher panel, but will open if not open, and iconify either way depending on what state the app is in.

Last edited by VastOne (2011-11-26 21:42:26)


VSIDO | SolusOS

Words That Build Or Destroy

Offline

Help fund CrunchBang, donate to the project!

#2 2011-08-06 00:21:43

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

I chose tint2 as my final replacement.. It is the only one of the three that mimics cairo-dock in allowing the mouse scrollwheel to open apps

xfce4-panel also has a white background when you hover over an icon..  This does not happen to everyone and I have open threads trying to resolve it...

ADeskBar is good but seems to have lost it's developer and is being maintained on Conky PitStop.  It also seems "slow" to me in responses..

This is all IMHO, YMMV....

Last edited by VastOne (2011-08-06 00:53:33)


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3 2011-08-06 01:09:36

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 9,961
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

ADeskBar - isn't being maintained at CPS just keeping links to existing versions out there but it looks like there is someone on the French Ubuntu site that is continuing the work.  CKDevelop is going to keep Adeskbar alive! Being French or knowing French will really help.

EDIT:

Just took a quick look ... I'm very impressed!
Great work!

Last edited by Sector11 (2011-08-06 01:14:07)

Offline

#4 2011-08-06 01:14:12

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

Sector11 wrote:

ADeskBar - isn't being maintained at CPS just keeping links to existing versions out there but it looks like there is someone on the French Ubuntu site that is continuing the work.  CKDevelop is going to keep Adeskbar alive! Being French or knowing French will really help.

Keeping the links alive is maintaining it's life...

smile


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#5 2011-08-06 01:15:37

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

Sector11 wrote:

EDIT:

Just took a quick look ... I'm very impressed!
Great work!


Thank you!  For the compliment and the suggestion to build this...


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#6 2011-08-06 01:22:50

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 9,961
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

VastOne wrote:
Sector11 wrote:

ADeskBar - isn't being maintained at CPS just keeping links to existing versions out there but it looks like there is someone on the French Ubuntu site that is continuing the work.  CKDevelop is going to keep Adeskbar alive! Being French or knowing French will really help.

Keeping the links alive is maintaining it's life...

smile

OK, I understand where you are coming from, I stand corrected.

Offline

#7 2011-08-06 01:25:00

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 9,961
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

VastOne wrote:
Sector11 wrote:

EDIT:

Just took a quick look ... I'm very impressed!
Great work!


Thank you!  For the compliment and the suggestion to build this...

I suggested, you did the work.
Tomorrow I start/try to build it.  big_smile

Last edited by Sector11 (2012-02-08 21:35:36)

Offline

#8 2011-08-17 18:45:46

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

VastOne wrote:

I chose tint2 as my final replacement.. It is the only one of the three that mimics cairo-dock in allowing the mouse scrollwheel to open apps

xfce4-panel also has a white background when you hover over an icon..  This does not happen to everyone and I have open threads trying to resolve it...

I have since resolved my issues with the white background when hovering over xfce4-panels and now use these..  The fix was a hack to the gtkrc2 theme I use within it's gtkrc file

Using xfce4-panels, I can add more types of launchers, including menu launchers and use all of the dbus functions..

As far as resources, tint2 and xfce4-panel use the same amount of memory in the setup I use


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#9 2012-02-08 20:57:34

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

UPDATE - 08 February 2012

Using the launchers the same as tasks is now doable now thanks to my friend ToZ.  The  launch file above and instructions has been updated and now:

This script acts as a launcher for apps that observes the following rules:
1. If the app is not running, then start it up
2. If the app is running, don't start a second instance, instead:
2a. If the app does not have focus, give it focus
2b. If the app has focus, minimize it


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#10 2012-02-13 19:29:32

Mandark
New Member
Registered: 2012-02-13
Posts: 4

Re: How-To xfce4-panel and tint2 panel launch scripts

Wonderful hack, while waiting for tint2 to add the support natively.

However, I'm having a problem with the application in focus not minimizing.
Instead, the script seems to defer any action until the application loses focus/gets minimized, only then to bring it back to focus smile

Anyone else have this problem?

Offline

#11 2012-02-13 19:33:32

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

^ Do you have xdotool installed?

What you are describing is what the original scripts did with just the wmctrl support

With the addition of xdotool, it should iconify either way when clicked on.

That is how it works for me.

I agree also. it would be nice if tint2 did this natively.


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#12 2012-02-13 19:37:19

Mandark
New Member
Registered: 2012-02-13
Posts: 4

Re: How-To xfce4-panel and tint2 panel launch scripts

I do.
As this was just a quick virtualbox attempt, I'll try again at home, and report back with results.

Also, unminimizing is noticably slower than when using the taskbar... Sure hope they add it

Offline

#13 2012-02-13 19:57:39

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

I would also make sure that everything is in the path..  that you can run each of the tools and script from anywhere. shot in the dark,  I know.  smile

I recall an issue when I first set this up until I rebooted..


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#14 2012-02-17 15:21:44

Mandark
New Member
Registered: 2012-02-13
Posts: 4

Re: How-To xfce4-panel and tint2 panel launch scripts

Well, seems there's a problem with xdotool...

First off, my version doesn't accept the syntax used in your example:
"xdotool getactivewindow getwindowpid" outputs "Usage: getactivewindow".

But, replacing the offenfing line with ACTIV_WIN=$(xdotool getwindowpid $(xdotool getactivewindow))
gets me to the proper if.

However, "xdotool windowminimize" keeps throwing Segmentation faults whichever way I try to invoke it.

Could you, perhaps, tell me which version you are using?
(I'm doing this on a vanilla Statler installation, standard repos, no fiddling)

Offline

#15 2012-02-17 15:30:12

Mandark
New Member
Registered: 2012-02-13
Posts: 4

Re: How-To xfce4-panel and tint2 panel launch scripts

Sorry for the double post, but yes, it was the xdotool version...

Updating to xdotool2 ( I found some debs @ http://distro.ibiblio.org/debian/pool/main/x/xdotool/) resolved my issue.

Perhaps adding this info to you tutorial might help some future poor soul encountering my issue?

Last edited by Mandark (2012-02-17 15:30:37)

Offline

#16 2012-03-04 16:46:41

rml
#! Member
Registered: 2012-02-10
Posts: 52

Re: How-To xfce4-panel and tint2 panel launch scripts

Mandark wrote:

Updating to xdotool2 ( I found some debs @ http://distro.ibiblio.org/debian/pool/main/x/xdotool/) resolved my issue.

Mine too! Thanks to both of you!

xdotool2 is in Sid, othor mirrors for same deb at http://packages.debian.org/sid/xdotool

Last edited by rml (2012-03-04 16:48:40)

Offline

#17 2012-06-15 13:51:16

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 9,961
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

I've been wanting to try this for a long time.  I'm running OpenBox and when we fist switched to OpenBox my wife complained - "Again something new." - but she got use to her section being in Spanish.
aaln7DNX.jpg
The advantage of being an OpenBox user in a bilingual family - at least the menus can be in two languages.

OK, so "icons" are multilingual and I've had this idea on a back burner since this thread opened  Yesterday I did it.

First I grabbed VastOne's tint2 config file and saved it as:

~/.config/tint2/t2launchrc

Since I'm running tint2 already I know this will work I changed the launcher section to what I wanted for my wife:

launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Web-Browsing-iceweasel.desktop
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Communication-icedove_mail.desktop
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-System-Administration-nitrogen.desktop

and tested it in a terminal to be sure: Terminal time

$ tint2 -c  ~/.config/tint2/t2launchrc

and there it was - no big issue.  OK, but it's on the bottom I want it on the left side middle, a quick change in the panel section:

panel_position = center left vertical #bottom center horizontal

took care of that.

Now I have a problem, it didn't match my tint2 for size and style.
OK, easy I opened my "tint2rc" and saved it as:

~/.config/tint2/1_tint2rc

first thing I changed - copied the panel from VastOne's code to my new one:

# Panel
panel_items = L
panel_monitor = 1
panel_position = center left vertical #bottom center horizontal
panel_size = 26 85
panel_margin = 0 16
# panel_margin = 0 5

changed the panel_size to match something closer to my layout and removed the border and shading, making the launcher invisible:

# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #000000 0
border_color = #FFFFFF 0

Popped in the "launcher section" and dropped the

I ran it:

tint2 -c  ~/.config/tint2/1_tint2rc

And there it was.  Looked nice ... my wife said ... "Can I still use the menus?"
"Yes"
"OK, I probably won't use them"  {balloon - POP!}
"Ohhhhh OK"

But I thought ... someone might benefit from this so here's my
~/.config/tint2/1_tint2rc - I left all the other section in but commented them out.

# Tint2 config file
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure

# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #000000 0
border_color = #FFFFFF 0

# ID 2
rounded = 8
border_width = 0
background_color = #000000 35
border_color = #FFFFFF 20

# ID 3
rounded = 8
border_width = 0
background_color = #000000 35
border_color = #FFFFFF 20

# ID 4
rounded = 8
border_width = 0
background_color = #000000 35
border_color = #FFFFFF 20

# Panel
panel_items = L
panel_monitor = 1
panel_position = center left vertical #bottom center horizontal
panel_size = 26 85
panel_margin = 0 16

##panel_padding = horizontal_left_right_padding vertical_padding horizontal_spacing
panel_padding = 0 0 0

panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 0

########### Panel Autohide  ##############
# autohide = boolean (0 or 1) : enable(=1) or disable(=0) autohiding
# autohide_show_timeout = float : show timeout in seconds. Use '.' as decimal separator.
# autohide_hide_timeout = float : hide timeout in seconds. Use '.' as decimal separator.
# autohide_height = integer : panel height (width for vertical panels) in hidden mode

autohide = 0
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 2
strut_policy = none

# Taskbar
#taskbar_name = 0
#taskbar_mode = multi_desktop
#taskbar_padding = 0 0 0
#taskbar_background_id = 1
#taskbar_active_background_id = 0

# Tasks
#urgent_nb_of_blink = 7
#task_icon = 1
#task_text = 0
#task_centered = 1
#task_maximum_size = 30 32
#task_padding = 1 1
#task_background_id = 3
#task_active_background_id = 2
#task_urgent_background_id = 0
#task_iconified_background_id = 0

# Task Icons
#task_icon_asb = 100 0 0
#task_active_icon_asb = 100 0 0
#task_urgent_icon_asb = 100 0 0
#task_iconified_icon_asb = 100 0 0

# Fonts
#task_font = sans 7
#task_font_color = #FFFFFF 62
#task_active_font_color = #FFFFFF 80
#task_urgent_font_color = #FFFFFF 100
#task_iconified_font_color = #FFFFFF 100
#font_shadow = 0

# Launcher
launcher_padding = 5 0 10
launcher_background_id = 1
launcher_icon_size = 18
## Specify icon theme names with launcher_icon_theme.
## if you have an XSETTINGS manager running (like xfsettingsd), tint2 will follow your current theme.
## launcher_icon_theme = LinuxLex-BlackWhite

## Each launcher_item_app must be a full path to a .desktop file
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Web-Browsing-iceweasel.desktop
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Communication-icedove_mail.desktop
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-System-Administration-nitrogen.desktop

#####  Mine """"
#launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Web-Browsing-iceweasel.desktop
#launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Communication-claws_mail.desktop
#launcher_item_app = /home/sector11/bin/desktop/terminator.desktop
#launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Editors-gedit.desktop
#launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Sound-gmusicbrowser.desktop


# System Tray
#systray = 1
#systray_padding = 4 2 3
#systray_sort = ascending
#systray_background_id = 1
#systray_icon_size = 14
# systray_icon_asb = 100 0 0

# Clock
#time1_format = %T
#time1_font = digitalk bold 12
#time2_format = %S
#time2_font = digitalk bold 7
#clock_font_color = #FFFFFF 100
#clock_padding = 4 4
#clock_background_id = 1
#clock_rclick_command = ~/Conky/OBMenuS/S-11.sh
#clock_lclick_command = ~/bin/kfc.sh

# Tooltips
#tooltip = 0
#tooltip_padding = 0 0
#tooltip_show_timeout = 0
#tooltip_hide_timeout = 0
#tooltip_background_id = 0
#tooltip_font = Sans 12
#tooltip_font_color = #FFFFFF 100

# Mouse
mouse_middle = none
mouse_right = none
mouse_scroll_up = toggle    # mouse pointer over the icon in tint2 panel
mouse_scroll_down = iconify # mouse pointer over the icon in tint2 panel

# Battery
#battery = 0
#battery_low_status = 20
#battery_low_cmd = notify-send "battery low"
#battery_hide = 90
#bat1_font = Sans 12
#bat2_font = Sans 12
#battery_font_color = #FFFFFF 100
#battery_padding = 0 0
#battery_background_id = 0

# End of config

Since I'm on a roll, I edited my tint2 as well - not sure if I will keep the launcher or not but there it is - launcher on the far left:
aapmEtvb.jpg

and if anyone cares - my tint2rc file with launcher

# Tint2 config file
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure

# Background definitions
# ID 1
rounded = 8
border_width = 1
background_color = #000000 50
border_color = #FFFFFF 50

# ID 2
rounded = 8
border_width = 0
background_color = #000000 35
border_color = #FFFFFF 20

# ID 3
rounded = 8
border_width = 0
background_color = #000000 35
border_color = #FFFFFF 20

# ID 4
rounded = 8
border_width = 0
background_color = #000000 35
border_color = #FFFFFF 20

# Panel
panel_items = LTSC
#panel_items = TSC
panel_monitor = 1
panel_position = bottom left horizontal #bottom center horizontal
panel_size = 80% 22
panel_margin = 0 16
# panel_margin = 0 5
panel_padding = 2 0 0
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 0

# Panel Autohide
autohide = 0
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 0
#strut_policy = follow_size
strut_policy = none

# Taskbar
taskbar_name = 0
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 1
#taskbar_active_background_id = 0

# Tasks
urgent_nb_of_blink = 7
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 30 32
task_padding = 1 1
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 0
task_iconified_background_id = 0

# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0

# Fonts
task_font = sans 7
task_font_color = #FFFFFF 62
task_active_font_color = #FFFFFF 80
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #FFFFFF 100
font_shadow = 0

# Launcher
# launcher_padding = 8 4 4
launcher_padding = 5 0 10
# launcher_background_id = 0
launcher_background_id = 1
# launcher_icon_size = 24
launcher_icon_size = 14
# # Specify icon theme names with launcher_icon_theme.
# # if you have an XSETTINGS manager running (like xfsettingsd), tint2 will follow your current theme.
launcher_icon_theme = LinuxLex-BlackWhite
# launcher_icon_theme = ShiningReprise
# # Each launcher_item_app must be a full path to a .desktop file
# launcher_item_app = /usr/share/applications/xfce4-file-manager.desktop
#####  Mine #####
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Web-Browsing-iceweasel.desktop
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Network-Communication-claws_mail.desktop
launcher_item_app = /home/sector11/bin/desktop/terminator.desktop
launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Editors-gedit.desktop
#launcher_item_app = /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Sound-gmusicbrowser.desktop



# System Tray
systray = 1
systray_padding = 4 2 3
systray_sort = ascending
systray_background_id = 1
systray_icon_size = 16
 systray_icon_asb = 100 0 0

# Clock
time1_format = %T
time1_font = digitalk bold 12
#time2_format = %S
#time2_font = digitalk bold 7
clock_font_color = #FFFFFF 100
clock_padding = 4 4
clock_background_id = 1
clock_rclick_command = ~/Conky/OBMenuS/S-11.sh
clock_lclick_command = ~/bin/kfc.sh

# Tooltips
tooltip = 0
tooltip_padding = 0 0
tooltip_show_timeout = 0
tooltip_hide_timeout = 0
tooltip_background_id = 0
tooltip_font = Sans 12
tooltip_font_color = #FFFFFF 100

# Mouse
mouse_middle = none
mouse_right = none
mouse_scroll_up = toggle    # mouse pointer over the icon in tint2 panel
mouse_scroll_down = iconify # mouse pointer over the icon in tint2 panel

# Battery
#battery = 0
#battery_low_status = 20
#battery_low_cmd = notify-send "battery low"
#battery_hide = 90
#bat1_font = Sans 12
#bat2_font = Sans 12
#battery_font_color = #FFFFFF 100
#battery_padding = 0 0
#battery_background_id = 0

# End of config

Next I have to head over to VastOne's How To - GMusicBrowser and Custom Layouts - as you see it's in the launcher section - but commented out, I have the ugly default layout.  Gotta give that a touch of VastOne's magic.

and then I see more tint2 stuff: How To - Latest Tint2 Code and New Tint2 Additions which probably means I'll have more changes coming with tint2 too!

Say that fast 10 times: tint2 too tint2 too tint2 too tint2 too tint2 too tint2 too tint2 too tint2 too tint2 too tint2 too - and you'll be dancing in a ballet wearing a tin tutu! lol

KUDOS to VastOne!

Last edited by Sector11 (2012-06-15 13:56:06)

Offline

#18 2012-06-15 22:39:22

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

Nice to see the development Sector11, in fact the launchers are far easier with the How To - Latest Tint2 Code and New Tint2 Additions, and even more control.   Since you have yours going how you want, that is all that matters.. 

Thanks for posting how you got it done.  Well done.. cool


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#19 2012-06-15 22:53:05

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 9,961
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

VastOne wrote:

Nice to see the development Sector11, in fact the launchers are far easier with the How To - Latest Tint2 Code and New Tint2 Additions, and even more control.   Since you have yours going how you want, that is all that matters.. 

Thanks for posting how you got it done.  Well done.. cool

Easier ... OH I have to go play now.  I see some stuff I'm interested in.  big_smile

Offline

#20 2012-10-01 14:36:21

mips
Member
Registered: 2011-07-19
Posts: 45

Re: How-To xfce4-panel and tint2 panel launch scripts

Would it be possible to add another function to this so when you middle or right click it opens another instance of the app and mousewheel scrolls through the open ones?

Offline

#21 2012-10-01 15:23:18

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: How-To xfce4-panel and tint2 panel launch scripts

mips wrote:

Would it be possible to add another function to this so when you middle or right click it opens another instance of the app and mousewheel scrolls through the open ones?

The mousewheel functions can be setup on tasks (open ones) this way

  mouse_scroll_up = next_task : send the focus to next task
  mouse_scroll_down = prev_task : send the focus to previous task

There is no native way to make tint2 open a new instance of the app from the tasks or launchers, if it is already open

toggle_iconify : toggle or iconify the task, this will open a new or raise the open one but will not open a new one

Here are all the settings for tasks:

      mouse_middle = none
      mouse_right = close
      mouse_scroll_up = toggle
      mouse_scroll_down = iconify

  close : close the task
  toggle : toggle the task
  iconify : iconify the task
  toggle_iconify : toggle or iconify the task
  maximize_restore : maximized or minimized the task
  desktop_left : send the task to the desktop on the left
  desktop_right : send the task to the desktop on the right
  next_task : send the focus to next task
  prev_task : send the focus to previous task

VSIDO | SolusOS

Words That Build Or Destroy

Offline

#22 2013-12-20 16:45:23

Geezer
#! Junkie
From: Never Never Land
Registered: 2013-02-19
Posts: 301

Re: How-To xfce4-panel and tint2 panel launch scripts

@VastOne: I thought I'd experiment a bit with tint2 panel, and possibly with xfce4, but never got past

fff@crunchbang:~$ gksudo gedit /usr/local/bin/launch
(gksudo:5054): GLib-CRITICAL **: g_str_has_prefix: assertion `str != NULL' failed
fff@crunchbang:~$ 

Now I'm unable to access Thunar File Manager. Please advise.

Thanks

Last edited by Geezer (2013-12-20 16:45:47)


There's no such thing as coffee that's too strong. cool

OHCG | Free Geek Providence | LXer

Offline

#23 2013-12-20 17:12:38

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,192

Re: How-To xfce4-panel and tint2 panel launch scripts

Some systems have a library problem with gksudo (others can advise on the details I guess). I never use it now - just sudo gedit for me.

Does a restart solve the issue with thunar?


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Offline

#24 2013-12-20 17:27:48

Geezer
#! Junkie
From: Never Never Land
Registered: 2013-02-19
Posts: 301

Re: How-To xfce4-panel and tint2 panel launch scripts

^ neither sudo gedit nor restart helped.  After using both terminal and root terminal, I got:

root@crunchbang:/home/fff# gedit /usr/local/bin/launch
bash: gedit: command not found
root@crunchbang:/home/fff# 

There's no such thing as coffee that's too strong. cool

OHCG | Free Geek Providence | LXer

Offline

Be excellent to each other!

#25 2013-12-20 17:41:32

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,192

Re: How-To xfce4-panel and tint2 panel launch scripts

Geezer wrote:

^ neither sudo gedit nor restart helped.  After using both terminal and root terminal, I got:

root@crunchbang:/home/fff# gedit /usr/local/bin/launch
bash: gedit: command not found
root@crunchbang:/home/fff# 

So use a text editor that you have installed, or apt-get gedit?
eg

sudo geany /path/to/file

or in a terminal

sudo nano /path/to/file

Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo