Giter Club home page Giter Club logo

stalonetray's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stalonetray's Issues

Steam tray icon expands horizontal size.

Describe the bug
When I open steam the tray icon expands horizontally and the new icons appear in a new column despite the fact I set the grow to south.

image

To Reproduce
Steps to reproduce the buggy behavior (even if intermittent):

  1. Use WM Openbox.
  2. Use my config.
  3. Launch the app Steam.
  4. See that the Steam icon takes double the space.

Expected behavior

image

Log files
I technically can not get a log file of the error because when I restart stalonetray manually everything works as expected. But for the good measure here is the log after restarting:

trace.txt

And here is my config:

# vim:filetype=config:tw=80:et
#
# This is sample ~/.stalonetrayrc, resembling default configuration.
# Remember: command line parameters take precedence.
#
# Directives introduced in @VERSION_STR@ are marked with "NEW in @VERSION_STR@"
#
####################################################################
#
# 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 "#000000"

# 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 @VERSION_STR@.
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+9+1055

# 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 S

# icon_gravity <gravity>     # icon placement gravity, one of NW, NE, SW, SE
icon_gravity S

# icon_size <int>            # specifies dimensions of an icon
icon_size 24

# slot_size <w>[x<h>]        # specifies width and hight of an icon slot that
                             # contains icon; must be larger than icon size;
                             # height is set to width if it is omitted;
                             # defaults to icon size
slot_size 24

# 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 @VERSION_STR@.
log_level err

# kludges kludge[,kludge]    # enable specific kludges to work around
                             # non-conforming WMs and/or stalonetray bugs.
                             # NEW in @VERSION_STR@. Argument is a
                             # comma-separated list of
                             # * fix_window_pos - fix tray window position on
                             #     erroneous moves by WM
                             # * force_icons_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 0x24

# 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 @VERSION_STR@.
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 @VERSION_STR@.

# 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:
                             # bottom, 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
 

I get a small circle

I'm following the instructions to have a nm-applet here.

I have Arch with hyprland. stalonetray from official repos.

When I run:

nm-applet    2>&1 > /dev/null &
stalonetray  2>&1 > /dev/null
killall nm-applet

I get a small circle, with no icon, that can't be resized and do nothing.

20221117_11h39m17s_grim

problem using stalonetray with mwm

I want to use stalonetray with mwm.
The idea is to have a horizontal system tray window that expands when I add an applet and shrinks back when I remove the applet.
If I use the command:
stalonetray -geometry 1x1+100+100 --grow-gravity W
I get the expected behaviour:

start stalonetray: empty tray's window at X
start applet1: tray's window at X applet icon at X
start applet2: tray's window at X,X+1 applet icons at X,X+1
start applet3: tray's window at X,X+1,X+2 applet icons at X,X+1,X+2
delete applet: tray's window at X,X+1 applet icons at X,X+1
delete applet: tray's window at X applet icon at X
delete applet: empry tray's window at X

However when I use the command:
stalonetray -geometry 1x1+100+100 --grow-gravity E
I get some buggy results:

start stalonetray: empty tray's window at X
start applet1: tray's window at X applet icon at X
start applet2: tray's window at X-1,X applet icons at X(visible),X+1(not visible)
start applet3: tray's window at X-1,X,X+1 applet icons at X+1(v),X+2(nv),X+3(nv)
should be: X-2,X-1,X
delete applet: tray's window at X+2,X+3 applet icons at X+3(v),X+4(nv)
should be: X-1,X
delete applet: tray's window at X+4 applet icon at X+4(v)
should be: X
delete applet: empry tray's window at X+4

That is: the system tray window get shifted to the right and some applet icons are placed where are not visible.
I tested stalonetray with openbox and it works as expected, so the issue is with mwm.
Is there some known command line option that can be used to fix the problem?
I did try --no-shrink and --kludges fix_window_pos but it didn't help.
I observed the problem on opensuse and centos. I guess if you have access to mwm you should be able to easily reproduce the bug. If not, I can provide any trace log necessary.

version bump

Hi! Kind of a specific request, but could we get a version bump? My issue is that /bin/sh not being bash breaks the build on v0.8.4:

make[1]: Entering directory '/var/tmp/portage/x11-misc/stalonetray-0.8.4/work/stalonetray-0.8.4'
VERSION_STR=`echo 0.8.4 | sed 's/\([^\.]*\.[^\.]*\)\..*/\1/'`; \
cat stalonetray.xml.in | sed "s/@VERSION_STR@/$VERSION_STR/g" > stalonetray.xml
xsltproc --nonet /usr/share/sgml/docbook/xsl-stylesheets//manpages/docbook.xsl stalonetray.xml
Note: Writing stalonetray.1
make[1]: Leaving directory '/var/tmp/portage/x11-misc/stalonetray-0.8.4/work/stalonetray-0.8.4'
make -j12 dist 
make  dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/var/tmp/portage/x11-misc/stalonetray-0.8.4/work/stalonetray-0.8.4'
make  distdir-am
make[2]: Entering directory '/var/tmp/portage/x11-misc/stalonetray-0.8.4/work/stalonetray-0.8.4'
VERSION_STR=`echo 0.8.4 | sed 's/\([^\.]*\.[^\.]*\)\..*/\1/'`; \
cat stalonetrayrc.sample.in | sed "s/@VERSION_STR@/$VERSION_STR/g" > stalonetrayrc.sample
xsltproc --nonet /usr/share/sgml/docbook/xsl-stylesheets//xhtml/docbook.xsl stalonetray.xml >& stalonetray.html
VERSION_STR=`echo 0.8.4 | sed 's/\([^\.]*\.[^\.]*\)\..*/\1/'`; \
cat stalonetray.spec.in | sed "s/@VERSION_STR@/$VERSION_STR/g" > stalonetray.spec
/bin/sh: 1: Syntax error: Bad fd number
make[2]: *** [Makefile:863: stalonetray.html] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/x11-misc/stalonetray-0.8.4/work/stalonetray-0.8.4'
make[1]: *** [Makefile:521: distdir] Error 2
make[1]: Leaving directory '/var/tmp/portage/x11-misc/stalonetray-0.8.4/work/stalonetray-0.8.4'
make: *** [Makefile:627: dist] Error 2

This seems to be fixed on master, which is great, but there hasn't been a release in almost two years now, so for example it does not build on some specific systems, like mine, until I figured out why this was happening. Great little program otherwise, thanks for making it!

trayer position sometimes has extra offset compared with the geometry

I am using the xmonad and I add stalonetrayer & in my startup hook.

I set geometry 1x1+1896+0 to make it stay at the top right corner. However, I noticed that sometimes the trayer panel would shift left with a slot, especially after a reboot.

stalonetrayer_offset

If I just kill the stalonetrayer and restart it then it works fine.

stalonetrayer_origin

I am wondering if it is a bug or expected behavior and how could I fix this?

Thanks.

Here is the wrong xprop.

WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 24, 0, 0, 0, 0, 0, 1776, 1895, 0, 0
_NET_WM_STRUT(CARDINAL) = 0, 0, 24, 0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_DESKTOP(ATOM) = undefined atom # 0xffffffff, undefined atom # 0xffffffff
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_STICKY, _NET_WM_STATE_SKIP_TASKBAR
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x1, 0x0, 0x0, 0x0
STALONETRAY_TIMESTAMP(STALONETRAY_TIMESTAMP) = 0x73
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING
_NET_SYSTEM_TRAY_ORIENTATION(_NET_SYSTEM_TRAY_ORIENTATION) = 0x1
WM_COMMAND(STRING) = { "stalonetray" }
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 1752, 0
		user specified size: 120 by 24
		program specified minimum size: 120 by 24
		program specified maximum size: 120 by 24
		program specified resize increment: 24 by 24
		program specified base size: 0 by 0
		window gravity: NorthWest
WM_CLASS(STRING) = "stalonetray", "stalonetray"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
		Initial state is Don't Care State.
WM_NAME(STRING) = "stalonetray"

And the expected xprop

WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 24, 0, 0, 0, 0, 0, 1800, 1919, 0, 0
_NET_WM_STRUT(CARDINAL) = 0, 0, 24, 0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_DESKTOP(ATOM) = undefined atom # 0xffffffff, undefined atom # 0xffffffff
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_STICKY, _NET_WM_STATE_SKIP_TASKBAR
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x1, 0x0, 0x0, 0x0
STALONETRAY_TIMESTAMP(STALONETRAY_TIMESTAMP) = 0x73
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING
_NET_SYSTEM_TRAY_ORIENTATION(_NET_SYSTEM_TRAY_ORIENTATION) = 0x1
WM_COMMAND(STRING) = { "stalonetray" }
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 1848, 0
		user specified size: 120 by 24
		program specified minimum size: 120 by 24
		program specified maximum size: 120 by 24
		program specified resize increment: 24 by 24
		program specified base size: 0 by 0
		window gravity: NorthWest
WM_CLASS(STRING) = "stalonetray", "stalonetray"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
		Initial state is Don't Care State.
WM_NAME(STRING) = "stalonetray"

Icon for Double Commander in tray is very small

The question is - where does stalonetray take icons? Icons for all programs in the tray have normal sizes but Double Commander has very small. My config is
decorations none dockapp_mode simple geometry 6x3+0-0 icon_size 32 slot_size 40 kludges force_icons_size max_geometry 6x3 parent_bg true transparent false icon_gravity SE grow_gravity SE no_shrink true
The OS is FVWM based on Linix Mint 20.

How do you create tray window and center it?

Is there a way to create a stalone tray of window type normal and center it on the screen? for instance using this command and having the window appear int he middle of the screen:

stalonetray --window-type normal -t --icon-size 100

Option to group and label icons

Is your feature request related to a problem? Please describe.
I have some apps open multiple times and for each instance they have a icon but I would also like to group similar apps (e.g. messaging).

Describe the solution you'd like

  • Option to group icons together based on window name
  • Option to freely group icons together based on user defined rules
  • Left click to open group in either a separate window or in the same stalonetray window but with a back button displayed
  • Label that displays when the user hovers over the group
  • Custom icon for group (static image would be okay but some ideas for options: displaying multiple of the icons part of a group but smaller or displaying the last icon that got a indicator)
  • Indicator for the group in case there is a indicator on a app in the group (not 100% sure how you could get that info but displaying it after a icon change might be good enough... or just give the users some scripting freedom here and they might figure something out by themselves)
  • (Custom) context menu entries for the groups (e.g. launch app xyz from the group)

Describe alternatives you've considered
I heard about a GNOME extension that introduces groups for the system tray there but I never tried it since I don't use that DE...

Additional context
image

Works with stumpwm but window is gone when I kill and start stalonetray

image

Hello, thanks for this nice software.
Is there some way to force a re-render or something? When I kill stalonetray and start it again, with stumpwm it doesn't decide to make a new window.
When I restart stumpwm it appears again.

Turns out somebody wrote a systray module for stumpwm that I am using now. I think both are great options for stumpwm users.

Change icon of specific program

I'm using stalonetray for many years in FVWM without a problem. I starting now to use blueman-applet. Background of display is dark and icond dark, too. Nothing can see. I'd like to change icon for something more light but I do not understand where the stalonetray takes them? In /usr/share/icons/hicolor there are blueman.png, blueman-active.png, blueman-disabled.png and the same for all sizes. In config stalonetray I set size 32 and then I tried to change these icons 32x32 for anothers but without effect. May be it is possible to make possibility to use my own icons for specific program?

Unable to set display

Stalonetray keeps appearing on the wrong monitor, as per this SO question and its driving me nuts

I tried to force it to appear on my preferred display with

stalonetray -display HDMI-1-1

where HDMI-1-1 is the screen name I got from $ xrandr

But I just get this lame message, which I don't understand:

could not open display
Segmentation fault (core dumped)

Is anyone able to help?

stalonetray.1 has some format errors in Arch's package

First the error is the same in Arch's official package and on my local machine. But I am not sure if it's only in Arch Linux, if the issue can not be reproduced elsewhere, then it's probably due to arch's PKGBUILD or dependency package version.
Since none of the DOCBOOK_ROOT candidate locations exists in Arch, the PKGBUILD replaced one with another directory belonging to docbook-xsl. This seems the only change made in Arch's package.

The manual within the package from Arch's offcial repository has some errors when viewing with man:

         .PP Default configuration file is $HOME/.stalonetrayrc. If it is not
       found, then $XDG_CONFIG_HOME/stalonetrayrc is checked for. A
       configuration file contains case-insensetive keyword-argument pairs,
       one per line. Lines starting with '#' and empty lines are ignored.
       Alternatively, confiuration file can specified via -c or --config
       command-line options.

         .PP Below is the list of possible command line/configuration file
       options. Options starting with hyphens are command-line parameters
       others are configuration file keywords. Options that are new in 0.8
       version are marked with "NEW in 0.8".

OPTIONS
         .PP -bg color, --background color, background color

             Use color for tray`s background.  color can be specified as an
           HTML hex triplet or as a name from rgb.txt (note that '#' must be
           quoted). Default value: #777777.

             .RE

             .PP -c filename, --config filename

                 Read configuration from filename instead of default
               $HOME/.stalonetrayrc.

                 .RE

                 .PP -d decspec, --decorations decspec, decorations decspec

                     Specify visiblie tray window decorations. Possible values
                   for decspec are: all, title, border, none (default).

                     .RE

                     .PP -display display, display display

The reason is those .PP, .RE, etc. has spaces in front of them in the generated stalonetray.1:

.SH "OPTIONS"

  

  


  .PP
\fB\-bg\fR \fIcolor\fR, \fB\-\-background\fR \fIcolor\fR, \fBbackground\fR \fIcolor\fR
.RS 4

  
  
  
  Use
\fIcolor\fR
for tray`s background\&.
\fIcolor\fR
can be specified as an
HTML
hex triplet or as a name from rgb\&.txt (note that \*(Aq#\*(Aq must be quoted)\&. Default value:
\fB#777777\fR\&.

  .RE

Can't change the size of the stalonetray window upon launch or tray update

Describe the bug
Whatever options you use to launch stalonetray, it will always start with geometry: 75x50 and position itself in the center of the screen.

You can't change the size with resize mode (Sway), but you can if you enable all decorations with -d all and use your mouse to resize it; in that case, it will resize automatically to the size of the icons, but if the tray updates (another program icon is added/removed), it will revert to geometry: 75x50 and center itself again.

To Reproduce
I'm not sure what conditions cause this bug, but I believe it's caused by launching it with Xwayland. EndeavourOS Community Edition Sway (Wayland) is what I'm using.

This is how I'm launching it:
stalonetray -d all -bg "#0D0A15" -i 16 --log-level info --geometry 1x1+0+0 --grow-gravity W --icon-gravity E --max-geometry 3x1 -s 16 --scrollbars none

Current behavior
2023-01-26T18:06:34,607156494-05:00

Expected behavior
(I can only achieve this window size, using -d all so the title bar is enabled, but it shouldn't be needed)
2023-01-26T18:06:26,759650263-05:00

Log files
stalonetray_log.txt

Chromium-based browsers icons are not swallowed on stalonetray restart.

I restart stalonetray (flipping -v option) when changing orientation of my screen (portrait/landscape). All tray icons get swalloved again, but chromium-based browsers (google-chrome, brave, chromium, ...) do not. (They disappear or appear on some random location on screen.)
This may be related to https://bugs.chromium.org/p/chromium/issues/detail?id=1042098 . (I cannot say if stalonetray has this wrong, I post this issue, so that the problem can be tracked.)

Search for stalonetrayrc under $XDG_CONFIG_HOME

Thank you for stalonetray. I have one feature-request. I would like to store my stalonetrayrc in ~/.config which is defined by $XDG_CONFIG_HOME. It would be great if stalonetray would automatically search for stalonetrayrc under $XDG_CONFIG_HOME/stalonetrayrc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.