sargon / trayer-srg Goto Github PK
View Code? Open in Web Editor NEWtrayer fork with multi monitor support, cleaned up codebase and other fancy stuff
License: Other
trayer fork with multi monitor support, cleaned up codebase and other fancy stuff
License: Other
The --padding command line flag doesn't have any effect. It seems that in panel.c
, the padding
variable is set, but never used.
Maybe you could consider adding an option for trayer to hide unless you hover it with the mouse?
Thanks! This program is great!
For me this is not desired, suggesting an option to have it off, or have that be the standard behaviour if this is not intended
trayer
is able to take focus and closes when the close shortcut is executed whilst running under the i3 window manager.
As a temporary workaround I attempted to make a quick dirty hack/script that reopen trayer
when the process is not running - but this is when I realised that the process does not actually stop when the close shortcut is run.
I've tried having a little look through the code as to where this could be addressed, but I'm unfamiliar with GTK/X programming so I'm not 100% sure where to look! At a very vague guess without cracking out the documentation, perhaps it might be something around the delete/destroy events?
Is it possible to stop trayer
from even being able to take focus, and at the very least would it be possible to stop it from being closable from the window manager shortcut.
Please see http://bugs.debian.org/623429. If you want to reply directly to that bug report, use [email protected] . And maybe http://bugs.debian.org/603447 is part of the same thing?
Cheers,
Jens Peter Secher [email protected]
Some of the tray icons are truly horrid. I would like to avoid having to stare at them for hours a day. Is there a way to provide custom icons to trayer?
Using fvwm and fvwm-crystal, trayer is working fine with the recipe it is run on its own, but with the recipe where it is swallowed into a FvwmButtons, it disappear at icon change.
The same config was working before. This get triggered by some system update it was a long time ago. I get exactly the same issue with trayer-srg and have no clue on how to solve it.
As example, in the default config of fvwm:
#Test (x stalonetray) *RightPanel: (120x20, Swallow(NoClose,UseOld) \
# stalonetray 'Exec exec stalonetray --config \
# "$[FVWM_DATADIR]/default-config/.stalonetrayrc"', Frame 0)
Test (x trayer) *RightPanel: (120x20, Swallow(NoClose,UseOld) trayer 'Exec exec trayer --SetDockType false --widthtype pixel --heighttype false --height 20 --width 120', Frame 0)
#Test (x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-225)), \
Test (x trayer) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-225)), \
Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"'
#Test (!x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)),\
Test (!x trayer) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)),\
Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"'
*RightPanel: (120x45, Swallow DateTime 'Module FvwmScript FvwmScript-DateTime',\
Frame 0)
*RightPanel: (120x5, Frame 0)
If I launch hexchat, trayer move from its button to over the pager, when it should stay in place.
With fvwm-crystal, as example with the amiga recipe, it is worst because it disappear from the view point and is not visible in the screen anymore.
That on gentoo with fvwm-2.6.7.1 and fvwm-crystal from its svn repository.
Perhaps Trayer should register org.freedesktop.StatusNotifierWatcher service instance on D-BUS enabled systems?
https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/
PANEL_HEIGHT_MIN is set to 16 in panel.h and overrides command line args w/o notification.
Some users like smaller setups like 13 or 10 pixel in height.
Please consider using this patch
--- trayer-srg-1.1.2/panel.h
+++ trayer-srg-1.1.2/panel.h
@@ -18,7 +18,7 @@
#define PANEL_HEIGHT_DEFAULT 26
#define PANEL_HEIGHT_MAX 200
-#define PANEL_HEIGHT_MIN 16
+#define PANEL_HEIGHT_MIN 2
typedef struct {
--- trayer-srg-1.1.2/panel.c
+++ trayer-srg-1.1.2/panel.c
@@ -337,10 +337,13 @@
p->width = 100;
p->heighttype = HEIGHT_PIXEL;
if (p->heighttype == HEIGHT_PIXEL) {
if (p->height < PANEL_HEIGHT_MIN)
if (p->height < PANEL_HEIGHT_MIN) {
ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MIN );
p->height = PANEL_HEIGHT_MIN;
else if (p->height > PANEL_HEIGHT_MAX)
ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MAX );
p->height = PANEL_HEIGHT_MAX;
I'm using trayer like this:
trayer --edge top --align right --SetPartialStrut true --height 14 --widthtype request --alpha 200 --transparent true
I use xrandr to switch between monitors with a different resolution, a laptop screen and a desktop monitor. When switching monitors, trayer stays at the position where it was on the other monitor before. Only when an icon appears or disappears does trayer update its position to the new screen edge.
Is it possible to update trayer's position immediately when switching monitors?
Thanks!
When I use --align center
, the dock centers itself, but the icons remain left-aligned. Is there any way to align the icons to the center of the dock?
I'm experiencing a weird issue. Consistently the icon changes of the networkmanager icon (nm-applet
) lead to an increase in size. This seems not to be the case with stalonetray
. It might be related to gtk themes. At first glance it looks like a glitch in the width calculation of trayer. I haven't found a way to avoid this behavior by changing the arguments of trayer (played a lot with sizes etc.) or switching the icon theme.
E.g. due to changing the connected network.
Version: 1.1.8
Command:
trayer \
--align center \
--alpha 0 \
--distance 2 \
--edge bottom \
--height 18 \
--heighttype pixel \
--iconspacing 6 \
--monitor primary \
--tint 0x44475a \
--transparent true \
--widthtype request &
Getting a make error, not sure what is going on?
gcc -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng14 -lgthread-2.0 -lrt -lglib-2.0 -lX11 -L/usr/X11R6/lib -lXmu panel.o misc.o bg.o egg-marshal.o eggtraymanager.o fixedtip.o main.o -o trayer panel.o: In function `handle_error': panel.c:(.text+0x28): undefined reference to `GDK_DISPLAY' panel.o: In function `panel_set_wm_strut': panel.c:(.text+0x1b7): undefined reference to `GDK_DISPLAY' panel.c:(.text+0x1f1): undefined reference to `GDK_DISPLAY' panel.o: In function `panel_start_gui': panel.c:(.text+0x896): undefined reference to `GDK_DISPLAY' panel.c:(.text+0x8e7): undefined reference to `GDK_DISPLAY' panel.o:panel.c:(.text+0x918): more undefined references to `GDK_DISPLAY' follow collect2: ld returned 1 exit status make: *** [trayer] Error 1
Please do not set -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_DEPRECATED in Makefile.common, you run into following "implicit declarations" with x11-libs/gtk+-2.24.4:2
x86_64-pc-linux-gnu-gcc -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2 -mfpmath=sse -O2 -pipe -ggdb -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -Wall -pthread -DQT_SHARED -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore -c misc.c
misc.c: In function ‘text_property_to_utf8’:
misc.c:306:3: warning: implicit declaration of function ‘gdk_text_property_to_utf8_list’
x86_64-pc-linux-gnu-gcc -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2 -mfpmath=sse -O2 -pipe -ggdb -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -Wall -pthread -DQT_SHARED -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore -c bg.c
bg.c: In function ‘modify_drawable’:
bg.c:132:5: warning: implicit declaration of function ‘gdk_drawable_get_size’
bg.c:143:5: warning: implicit declaration of function ‘gdk_draw_pixbuf’
--- trayer-srg-1.1.2/Makefile.common
+++ trayer-srg-1.1.2/Makefile.common
@@ -15,17 +15,16 @@
endif
endif
-CC = gcc
+CC ?= gcc
LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -lX11 -L/usr/X11R6/lib -lXmu
INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
-CFLAGS = -O2 # overwriten by command line or env. variable
-CFLAGS += -Wall # always nice to have
+CFLAGS ?= -O2 -Wall
ifneq (,$(DEVEL))
-CFLAGS := -g -Wall
+CFLAGS ?= -g -Wall
endif
-CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED
+#CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED
%.o: %.c
Is there currently a way to query trayer in order to get the current width it occupies? thank you!
see: https://github.com/sargon/trayer-srg/blob/master/main.c#L5
Should it be removed?
trayer-srg version 1.1.8
trayer-srg --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 11 --transparent true --tint 0xe0e0e0 --height 24
when I try to drag some window on top of the trayer, the transparent part of the icons are not redrawing:
this is what it's suppose to look like (after restarting trayer):
please let me know if any info can be provided to help troubleshotting.
I use xmonad with trayer and want to toggle the layout to fullscreen, but trayer is always on the top.
It would be very useful to have an option like "onstart=lower" in dzen, so that trayer is on the bottom of the "z axis".
Hello I am using trayer-srg-git
from the AUR (The latest version from Git).
When I launch trayer
I get a message in my xsession-errors
stating:
Bad _NET_WM_DESKTOP with data=[-1,0,0,0,0]
Bad _NET_WM_DESKTOP with data=[-1,0,0,0,0]
Bad _NET_WM_DESKTOP with data=[-1,0,0,0,0]
Trayer seems to work as intended otherwise, so I assume this is just a warning.
I am using XMonad with EWMH activated.
System Info:
Linux asus 6.1.12-artix1-1 #1 SMP PREEMPT_DYNAMIC Wed, 15 Feb 2023 15:19:45 +0000 x86_64 GNU/Linux
I am filing this issue in case this is not the intended behavior.
Hi there, I just wanted to let you know that I have packaged trayer-srg into Fedora and I am working on pushing it into the Fedora repos.
The bugzilla request can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=827101
Thought you should know,
Thanks for the great software!
Bryan
I think trayer currently leaves too little space between systray icons, leaving the tray cluttered. Having the option to add some spacing between the icons would be fantastic!
Yet I can see relics of there being one in e.g. config.h
.
I have trayer on the left side of my screen, and I think it would be visually pleasing to have an option where the icons grow left to right.
Would there be any way to add a way to exclude some application icons from trayer?
trayer --transparent true --alpha 255
gives me a solid black background in Elementary Juno 5.0b.
Same issue reported here: https://bbs.archlinux.org/viewtopic.php?id=39723
You forgot to add a cool --iconspacing option into manpage
When I execute trayer with the following command:
exec /usr/bin/trayer --edge bottom --align right --SetDockType true --expand true --width 8 --transparent true --alpha 0 --tint 0a0a0a --height 20
Trayer launches as a floating dragable widow on the bottom right corner of my screen. It even has the Window borders that my windows have.
Never experienced this issue before.
I am doing a small panel software and need a tray manager. This just fits and I want to embed it into my own software.
Could you please make it a GtkWidget? That would be great ;-)
reopen #24
Hi, just had a question since I don't see any recent commits from the first glance at the repo, nor any comments on recent issues. Thanks!
The man page states that the maximum value for option --alpha is 256, but I suspect it is really 255.
The error message if used with 256 is:
`(trayer:35110): GdkPixbuf-CRITICAL **: 23:00:26.758: gdk_pixbuf_composite_color_simple: assertion 'overall_alpha >= 0 && overall_alpha <= 255' failed
(trayer:35110): Gdk-CRITICAL **: 23:00:26.758: IA__gdk_draw_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(trayer:35110): GLib-GObject-CRITICAL **: 23:00:26.759: g_object_unref: assertion 'G_IS_OBJECT (object)' failed`
please correct license of Trayer-SRG , you have some code licensed under GPL-2
The README file points to the following dead github link:
https://github.com/sargon/trayer-srg/blob/master/man/trayer.1#L110
Must be "SetDockType"
Edit: the typo is present in the README too.
Edit1: I see it's here #37
trayer is not behaving correctly in Openbox. I'm setting it to stay below all other windows but it will stay above, always. Also, it's not respecting the dock position by showing in the bottom-center position everytime (only works with --align right
). Other systray software like stalonetray behaves correctly, both in position and layer, so I don't think it's a configuration error in Openbox.
My Openbox dock configuration is this:
<dock>
<stacking>Below</stacking>
<position>BottomRight</position>
<floatingX>0</floatingX>
<floatingY>0</floatingY>
<direction>Horizontal</direction>
<noStrut>yes</noStrut>
<autoHide>no</autoHide>
</dock>
I'm also running trayer with these parameters:
trayer --widthtype request --SetPartialStrut false --SetDockType true --heighttype pixel --height 28
This is trayer 1.1.6.
Please fix the gcc linker invokation in Makefile, place
Error:
x86_64-pc-linux-gnu-gcc -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng14 -lgthread-2.0 -lrt -lglib-2.0 -lX11 -L/usr/X11R6/lib -lXmu panel.o misc.o bg.o eggtraymanager.o eggmarshalers.o fixedtip.o main.o gdk-helper.o -o trayer-srg
panel.o: In function handle_error': /var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:409: undefined reference to
XGetErrorText'
panel.o: In function panel_set_wm_strut': /var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:66: undefined reference to
gtk_object_get_type'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:66: undefined reference to g_type_check_instance_cast' /var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:99: undefined reference to
XChangeProperty'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:102: undefined reference to XChangeProperty' panel.o: In function
panel_size_alloc':
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to gtk_window_get_type' /var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to
g_type_check_instance_cast'
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:189: undefined reference to gtk_window_move' panel.o: In function
panel_destroy_event':
/var/tmp/portage/x11-misc/trayer-srg-1.1.2/work/trayer-srg-1.1.2/panel.c:150: undefined reference to `gtk_main_quit'
(a ton of similar "undefined reference"s)
Fix
--- trayer-srg-1.1.2/Makefile
+++ trayer-srg-1.1.2/Makefile
@@ -19,7 +19,7 @@
TARGET = trayer
Arch linux ( http://aur.archlinux.org/packages.php?ID=36049 ) clears the LDFLAGs, which is just wrong, imho.
dwm-6.2
trayer-srg-1.1.8
trayer launched from ~/.xinitrc before dwm like this:
trayer \
--edge top \
--align right \
--width 80 \
--widthtype pixel \
--height 16 \
--heighttype pixel \
--expand false \
--monitor primary&
This is what happens at startup:
This is what happens after I start an app that has a systray icon:
This is what happens after I close that app and systray becomes empty again:
Is there a way to tell trayer-srg launch in the right position from the start? Perhaps some dwm rule for trayer window is needed? I wouldn't like to resort to fooling dwm with ugly hacks like launching a void systray app at startup and quickly close it just for the sake of enforcing trayer's correct position at the edge of the screen, on top of status bar, not under it.
I want to use --isdistancefrom twice one for top and one for right i am using xmonad+xmobar where i would like the tray to be in somewhere middle on top of xmobar but when i use it twice only the last option works so is it possible
The most recent release is more than 3 years old, but I see changes have continued to be made.
The latest release, 1.1.6, has no configure script, so I'm having to clone the git repo to get what I need.
A new release would be great. :-)
For ubuntu, you'll need these two libraries for installation to work.
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.