kolbusa / stalonetray Goto Github PK
View Code? Open in Web Editor NEWSTAnd aLONE TRAY (notification area) implementation for X11
Home Page: https://kolbusa.github.io/stalonetray
License: GNU General Public License v2.0
STAnd aLONE TRAY (notification area) implementation for X11
Home Page: https://kolbusa.github.io/stalonetray
License: GNU General Public License v2.0
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.
To Reproduce
Steps to reproduce the buggy behavior (even if intermittent):
Expected behavior
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:
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'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.
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.
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!
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.
If I just kill the stalonetrayer and restart it then it works fine.
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"
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.
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
I try for some time and fail to understand it. Maybe you can give me an example.
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
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...
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.
Please include the log file location in the man file and anywhere else it might help.
After running make (which builds stalonetray) at least stalonetrayrc.sample and stalonetray.html was not built.
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?
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?
Mention different locations where rc file can be placed. From this #1
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
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
Expected behavior
(I can only achieve this window size, using -d all
so the title bar is enabled, but it shouldn't be needed)
Log files
stalonetray_log.txt
Arch Linux has a package for stalonetray in its official repository.
https://archlinux.org/packages/community/x86_64/stalonetray/
However, the upstream is still:
http://stalonetray.sourceforge.net/
I think it should be update to this new GitHub-repo. Are you the maintainer of the arch-package or should I write the maintainer a mail and ask him to update it?
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.)
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
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.