Auteur Sujet: This is how I set up feh and stalonetray  (Lu 9797 fois)

0 Membres et 2 Invités sur ce sujet

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
This is how I set up feh and stalonetray
« le: 23 janvier 2013 à 20:14:19 »
In general I use the following method for setting up my feh and stalonetray.
This method might be overkill, but it has worked for me in Lubuntu, Pclos, WattOS, Slitaz and of course Ubuntu Openbox.
My networking and volume control icons appear in the top left hand corner of the desktop.
Once I have set this up I can then remove tint2 or fbpanel so I have a clear desktop and then use only a right click menu to access programs.

My home folder is k1, ensure you replace k1 with your own username.

First feh:
(a)
A file named .fehbg in k1, which is hidden due to the dot prefix, this file has one line.
feh --bg-tile '/home/k1/.wallpapers/ptv2.jpg'
(b)
A folder named .wallpapers in k1, the folder is hidden due to the dot prefix, this folder contains a textured background (95x80 1.6kB .jpg file) called ptv2.jpg.

(c)
A folder named autostart in the folder .config in k1 which is a hidden folder due to the dot prefix.
Folder autostart  may or may not already exist, so add it if it doesn't already exist and then decide on its contents.
Add a desktop configuration file named wallpaper.desktop (edit with geany):
[Desktop Entry]
Name=Wallpaper
Comment=Uses feh to set tiled wallpaper
Icon=nm-device-wireless
Exec=feh --bg-tile /home/k1/.wallpapers/ptv2.jpg &
Terminal=false
Type=Application
NoDisplay=false

GenericName=

Now for stalonetray:
(1)
A file named .stalonetrayrc in k1, which is hidden due to the dot prefix, this file has many lines.
# vim:filetype=config:tw=80:et
#
# This is sample ~/.stalonetrayrc, resembling default configuration.
# Remember: command line parameters take precedence.
#
# Directives introduced in 0.8 are marked with "NEW in 0.8"
#
####################################################################
#
# stalonetray understands following directives
#
####################################################################

# background <color>         # color can be specified as an HTML hex triplet or
                             # as a name from rgb.txt, note that '#' must be quoted
background "#777777"

# decorations <decspec>      # set trays window decorations; possible values for
                             # decspec are: all, title, border, none
decorations none

# display <display name>     # as usual

# dockapp_mode <mode>        # set dockapp mode, which can be either simple (for
                             # e.g. OpenBox, wmaker for WindowMaker, or none
                             # (default). NEW in 0.8.
dockapp_mode none

# fuzzy_edges [<level>]      # enable fuzzy edges and set fuzziness level. level
                             # can be from 0 (disabled) to 3; this setting works
                             # with tinting and/or transparent and/or pixmap
                             # backgrounds
fuzzy_edges 0

# geometry <geometry>        # tray's geometry in standard X notation; width and
                             # height are specified in slot_size multiples
geometry 1x1+0+1

# grow_gravity <gravity>     # one of N, S, E, W, NW, NE, SW, SE; tray will grow
                             # in the direction opposite to one specified by
# grow_gravity; if horizontal or vertical
# direction is not specified, tray will not grow in
# that direction
grow_gravity N

# icon_gravity <gravity>     # icon placement gravity, one of NW, NE, SW, SE
icon_gravity N
# icon_size <int>            # specifies dimensions of typical icon slot
icon_size 32

# log_level <level>          # controls the amount of logging output, level can
                             # be err (default), info, or trace (enabled only
                             # when stalonetray configured with --enable-debug)
                             # NEW in 0.8.
log_level err

# kludges kludge[,kludge]    # enable specific kludges to work around
                             # non-conforming WMs and/or stalonetray bugs.
                             # NEW in 0.8. Argument is a
                             # comma-separated list of
                             # * fix_window_pos - fix tray window position on
                             #     erroneous moves by WM
                             # * force_icon_size - ignore resize events on all
                             #     icons; force their size to be equal to
                             #     icon_size
                             # * use_icon_hints - use icon window hints to
                             #     dtermine icon size

# max_geometry <geometry>    # maximal tray dimensions; 0 in width/height means
                             # no limit
max_geometry 0x0

# no_shrink [<bool>]         # disables shrink-back mode
no_shrink false

# parent_bg [<bool>]         # whether to use pseudo-transparency
                             # (looks better when reparented into smth like FvwmButtons)
parent_bg false

# pixmap_bg <path_to_xpm>    # use pixmap from specified xpm file for (tiled) background
# pixmap_bg /home/user/.stalonetraybg.xpm

# scrollbars <mode>          # enable/disable scrollbars; mode is either
                             # vertical, horizontal, all or none (default)
                             # NEW in 0.8.
scrollbars none

# scrollbars-size <size>     # scrollbars step in pixels; default is slot_size / 4
# scrollbars-step 8

# scrollbars-step <step>     # scrollbars step in pixels; default is slot_size / 2
# scrollbars-step 32

# slot_size <int>            # specifies size of icon slot, defaults to
                             # icon_size NEW in 0.8.

# skip_taskbar [<bool>]      # hide tray`s window from the taskbar
skip_taskbar true

# sticky [<bool>]            # make a tray`s window sticky across the
                             # desktops/pages
sticky true

# tint_color <color>         # set tinting color
tint_color white

# tint_level <level>         # set tinting level; level ranges from 0 (disabled)
                             # to 255
tint_level 0

# transparent [<bool>]       # whether to use root-transparency (background
                             # image must be set with Esetroot or compatible utility)
transparent true

# vertical [<bool>]          # whether to use vertical layout (horisontal layout
                             # is used by default)
vertical true

# window_layer <layer>       # set the EWMH-compatible window layer; one of:
                             # bootom, normal, top
window_layer normal

# window_strut <mode>        # enable/disable window struts for tray window (to
                             # avoid converting of tray window by maximized
                             # windows); mode defines to which screen border tray
                             # will be attached; it can be either top, bottom,
                             # left, right, none or auto (default)
window_strut auto

# window_type <type>         # set the EWMH-compatible window type; one of:
                             # desktop, dock, normal, toolbar, utility
window_type dock

# xsync [<bool>]             # whether to operate on X server synchronously (SLOOOOW)
xsync false
(2)
In the existing folder named autostart [in the folder .config (which is a hidden folder due to the dot prefix) in k1],
add a desktop configuration file named stalonetray.desktop (edit with geany):
[Desktop Entry]
Name=Stalonetray
Comment=Small system tray
Icon=nm-device-wireless
Exec=stalonetray &
Terminal=false
Type=Application
NoDisplay=false

GenericName=
Restart and it should work.

Edit:
Of course  :) don't forget to install feh and stalonetray
« Modifié: 24 janvier 2013 à 01:44:47 par kjdixo »

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1676
    • Citrotux
Re : This how I set up my feh and stalonetray
« Réponse #1 le: 23 janvier 2013 à 21:42:06 »
Hi,

Thanks for your efforts. However I will ask even more efforts! ^^

I would like to ask you to first add a pic to show how it looks and also to use the quotes and code tags in your post, this way:

all quotes should be in quote tags and all code, command lines, content of configuration files should be included in code tags. Could you do that to ease the reading, please ?


Good leaders being scarce, following yourself is allowed.

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray
« Réponse #2 le: 23 janvier 2013 à 23:44:38 »
Sorry ... understood.
It is such a long time since I posted anything technical and I was in a hurry.
I simply forgot about the code boxes with scroll bars.
I will do the code tags right now as I am online with my Lubuntu desktop computer.
Then I will go to my Ubuntu Openbox - Netbook computer and do a screenshot.


« Modifié: 24 janvier 2013 à 01:55:14 par kjdixo »

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray ... SCREENSHOTS
« Réponse #3 le: 24 janvier 2013 à 00:29:45 »
Here are 3 (mtPaint) screenshots from my Netbook.




« Modifié: 24 janvier 2013 à 02:23:01 par kjdixo »

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray ... and MENUS
« Réponse #4 le: 24 janvier 2013 à 00:45:40 »
The menu is a 3 stage multiple menu.xml.
There are 3 menus : menu1.xml, menu2.xml, menu3.xml and they are selected in sequence by clicking the icon at the top of the menu.
I described the method in the following topic on the LXDE.org Forum (1 year ago):
EDIT THE OPENBOX RIGHT CLICK MENU IN LXDE and ADD ICONS
The .xml code for my Ubuntu Openbox (Netbook) menus will appear here soon (in code tags).
« Modifié: 24 janvier 2013 à 01:53:48 par kjdixo »

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray ... and MENUS
« Réponse #5 le: 24 janvier 2013 à 01:22:40 »
menu1.xml
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU 1">
<item label="" icon="/usr/share/icons/Tango/32x32/actions/go-home.png"><action name="Execute"><command>sh -c "cp /home/k1/.config/openbox/menu2.xml /home/k1/.config/openbox/menu.xml &amp;&amp; openbox --reconfigure;xdotool mousemove_relative --polar 280 80; xdotool click 3;xdotool mousemove_relative  --polar 100 80"</command></action></item>
<item label="XFE" icon="/usr/share/icons/Tango/32x32/apps/file-manager.png"><action name="Execute"><command>xfe</command></action></item>
<item label="Firefox" icon="/usr/share/pixmaps/firefox.png"><action name="Execute"><command>firefox</command></action></item>
<item label="Geany" icon="/usr/share/icons/hicolor/48x48/apps/geany.png"><action name="Execute"><command>geany</command></action></item>
<item label="Mirage" icon="/usr/share/pixmaps/mirage.png"><action name="Execute"><command>mirage</command></action></item>
<item label="Filezilla" icon="/usr/share/icons/hicolor/48x48/apps/filezilla.png"><action name="Execute"><command>filezilla</command></action></item>
<item label="Text 1" icon="/usr/share/icons/Tango/32x32/apps/accessories-text-editor.png"><action name="Execute"><command>xdotool type text1</command></action></item>
<item label="Text 2" icon="/usr/share/icons/Tango/32x32/apps/accessories-text-editor.png"><action name="Execute"><command>xdotool type text2</command></action></item>
<item label="Run" icon="/usr/share/icons/Tango/32x32/categories/applications-system.png"><action name="Execute"><command>grun</command></action></item>
<item label="Exit" icon="/usr/share/icons/gnome/48x48/actions/application-exit.png"><action name="Execute"><command>obsession-logout</command></action></item>
</menu>
</openbox_menu>

menu2.xml
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU 2">
<item label="" icon="/usr/share/icons/Tango/32x32/emblems/emblem-favorite.png"><action name="Execute"><command>sh -c "cp /home/k1/.config/openbox/menu3.xml /home/k1/.config/openbox/menu.xml &amp;&amp; openbox --reconfigure;xdotool mousemove_relative --polar 280 80; xdotool click 3;xdotool mousemove_relative --polar 100 80"</command></action></item>
<item label="XFE" icon="/usr/share/icons/Tango/32x32/apps/file-manager.png"><action name="Execute"><command>xfe</command></action></item>
<item label="Osmo" icon="/usr/share/icons/hicolor/32x32/apps/osmo.png"><action name="Execute"><command>osmo</command></action></item>
<item label="Gimp" icon="/usr/share/icons/hicolor/48x48/apps/gimp.png"><action name="Execute"><command>gimp</command></action></item>
<item label="Burn" icon="/usr/share/icons/gnome/48x48/devices/media-cdrom.png"><action name="Execute"><command>brasero</command></action></item>
<item label="Scan" icon="/usr/share/icons/gnome/24x24/devices/scanner.png"><action name="Execute"><command>simple-scan</command></action></item>
<item label="Hosts" icon="/usr/share/icons/Tango/32x32/categories/applications-system.png"><action name="Execute"><command>gksu /usr/bin/geany /etc/hosts</command></action></item>
<item label="Mixer" icon="/usr/share/icons/gnome/48x48/apps/gnome-mixer.png"><action name="Execute"><command>xterm -e 'alsamixer'</command></action></item>
<item label="Racer" icon="/usr/share/pixmaps/etracer.xpm"><action name="Execute"><command>/usr/games/etracer</command></action></item>
<item label="Exit" icon="/usr/share/icons/gnome/48x48/actions/application-exit.png"><action name="Execute"><command>obsession-logout</command></action></item>
</menu>
</openbox_menu>

menu3.xml
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU 3">
<item label="" icon="/usr/share/icons/Tango/32x32/categories/applications-system.png"><action name="Execute"><command>sh -c "cp /home/k1/.config/openbox/menu1.xml /home/k1/.config/openbox/menu.xml &amp;&amp; openbox --reconfigure;xdotool mousemove_relative --polar 280 80; xdotool click 3;xdotool mousemove_relative --polar 100 80"</command></action></item>
<item label="PCMan" icon="/usr/share/icons/Tango/32x32/apps/file-manager.png"><action name="Execute"><command>pcmanfm</command></action></item>
<item label="Search" icon="/usr/share/icons/gnome/24x24/actions/stock_search.png"><action name="Execute"><command>catfish</command></action></item>
<item label="LxTask" icon="/usr/share/icons/gnome/48x48/apps/gnome-monitor.png"><action name="Execute"><command>lxtask</command></action></item>
<item label="SysMon" icon="/usr/share/icons/gnome/48x48/apps/gnome-monitor.png"><action name="Execute"><command>gnome-system-monitor</command></action></item>
<item label="Synaptic" icon="/usr/share/pixmaps/synaptic.png"><action name="Execute"><command>gksu /usr/sbin/synaptic</command></action></item>
<item label="Terminal" icon="/usr/share/icons/Tango/32x32/apps/konsole.png"><action name="Execute"><command>sakura</command></action></item>
<item label="Desktop" icon="/usr/share/icons/Tango/32x32/apps/preferences-desktop-theme.png"><action name="Execute"><command>pcmanfm --desktop-pref</command></action></item>
<item label="Look &amp;" icon="/usr/share/icons/Tango/32x32/apps/gnome-settings-background.png"><action name="Execute"><command>lxappearance</command></action></item>
<item label="Obconf" icon="/usr/share/pixmaps/obconf.png"><action name="Execute"><command>obconf</command></action></item>
<item label="MENUS" icon="/usr/share/icons/Tango/32x32/apps/accessories-text-editor.png"><action name="Execute"><command>geany /home/k1/.config/openbox/menu1.xml /home/k1/.config/openbox/menu2.xml /home/k1/.config/openbox/menu3.xml</command></action></item>
<menu id="desktop-app" label="Menu" icon="/usr/share/pixmaps/gnome-log.png" execute=" cat ~/.cache/menu.xml" />
<item label="Exit" icon="/usr/share/icons/gnome/48x48/actions/application-exit.png"><action name="Execute"><command>obsession-logout</command></action></item>
</menu>
</openbox_menu>

See this link for a general idea of how it works EDIT THE OPENBOX RIGHT CLICK MENU IN LXDE and ADD ICONS although I am not using LXDE for this Ubuntu Openbox version, most of the same methods apply - excluding the methods pertaining specifically to LXDE.
I haven't got time to describe it all again.
When I find the time I will add more here.
« Modifié: 24 janvier 2013 à 02:27:53 par kjdixo »

Hors ligne Taco.22

  • Membre Senior
  • ****
  • Messages: 367
    • Scorpio_Openbox
Re : This is how I set up feh and stalonetray
« Réponse #6 le: 24 janvier 2013 à 02:07:08 »
Checked out your link.  Wow, now that's what I call comprehensive!  Looks neat.
What can go wrong !!

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray
« Réponse #7 le: 24 janvier 2013 à 02:44:18 »
Thanks Taco.
I  try my best.
Thanks for the Village (debian) discs 1 and 2.
I have also looked at the Scorpion web page.
All good and useful.
Cheers

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1676
    • Citrotux
Re : This is how I set up feh and stalonetray
« Réponse #8 le: 24 janvier 2013 à 02:45:18 »
Hi,

What is the practical side in using 3 different menu.xml files ?
Good leaders being scarce, following yourself is allowed.

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray ... and MENUS
« Réponse #9 le: 24 janvier 2013 à 02:53:32 »
You actually have to try it out to appreciate it.
I think this is a 'personal preference thing'.
It becomes quick and automatic in use, once you have memorised where everything is.
It eliminates submenus which I find extremely frustrating as they slow me down.
I don't like hunting for items, I like to 'automatically' find them.
As I said 'personal preference' and not for everyone.
The MENUS editor selection on menu3 (opens in Geany) and makes it easy to customise the menus.
As mentioned in one of my LXDE forum posts.
menu1.xml has 'frequently used' applications.
menu2.xml has 'sometimes used' applications.
menu3.xml has 'settings' etc.
« Modifié: 24 janvier 2013 à 23:39:04 par kjdixo »

Hors ligne kjdixo

  • Membre Junior
  • **
  • Messages: 83
Re : This is how I set up feh and stalonetray ... and MENUS
« Réponse #10 le: 24 janvier 2013 à 23:10:22 »
Another practical advantage of a 'right click menu' (openbox default or multiple customised) would be in the case of multiple monitor screens with a very large total area.
Mouse movement ('sweeping of the mouse two or three times') across the from one monitor to another monitor to click the menu is eliminated.
The 'right click menu' is always available at the exact spot your mouse cursor is located, provided you are not over a window.
The multiple menu system increases overall speed by 'scrolling' through the 3 menus with multiple left or right clicks (initially a right click).
This is possible because the menu always remains visible when the right or left click is released, until a click occurs away from the menu.
The xdotool code in the menus is key to attaining smooth and stationary switching of the menu .
Remember to install xdotool so the xdotool code works.
Pixel values in the code might need to be tweaked to match your menu font size.

It might be best for me to start a new topic for the menu system and copy the relevant information over to it?
« Modifié: 24 janvier 2013 à 23:37:22 par kjdixo »

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1676
    • Citrotux
Re : This is how I set up feh and stalonetray
« Réponse #11 le: 25 janvier 2013 à 00:13:09 »
Hi,

I don't know about xdotool, but I'm eager to know more about it. You can start a new topic, or not : as you feel best and more relevant. It's up to you. Just if you start one, maybe would you provide at the end of the present thread, a link to it, just in case it could be useful.


Good leaders being scarce, following yourself is allowed.

djohnston

  • Invité
Re : Re : This is how I set up feh and stalonetray ... and MENUS
« Réponse #12 le: 25 janvier 2013 à 00:20:23 »
It might be best for me to start a new topic for the menu system and copy the relevant information over to it?

Sounds like a good idea. Hey, a new user who is technically proficient and produces well-written documentation! I like it!


Hors ligne Taco.22

  • Membre Senior
  • ****
  • Messages: 367
    • Scorpio_Openbox
Re : This is how I set up feh and stalonetray
« Réponse #13 le: 25 janvier 2013 à 00:52:05 »
So we've actually got someone who knows what they're doing  :o ;D

But moving right along!  Multiple menus - food for thought for DebWeb?
What can go wrong !!

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1676
    • Citrotux
Re : Re : This is how I set up feh and stalonetray
« Réponse #14 le: 25 janvier 2013 à 01:02:10 »
So we've actually got someone who knows what they're doing  :o ;D

+1

Citer
But moving right along!  Multiple menus - food for thought for DebWeb?

isn't DebWeb a spin using Lxde ? If so how could it fit in ?

Good leaders being scarce, following yourself is allowed.