Git Product home page Git Product logo

trayer-srg's People

Contributors

btimofeev avatar dai-vdr avatar delafthi avatar dstu avatar emberian avatar flocke avatar frozencemetery avatar johannes87 avatar keegancsmith avatar kilobyte avatar moiman avatar osandov avatar psub avatar sargon avatar xaep avatar

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  avatar  avatar  avatar  avatar  avatar  avatar

trayer-srg's Issues

padding has no effect

The --padding command line flag doesn't have any effect. It seems that in panel.c, the padding variable is set, but never used.

Add hide option

Maybe you could consider adding an option for trayer to hide unless you hover it with the mouse?

Thanks! This program is great!

I can't change the height because of a big icon

This is what it looks like:
2023-01-26T15:46:22,058034241-05:00

Config:

trayer \
    --edge top \
    --align right \
    --height 20 \
    --expand false  \
    --transparent true \
    --alpha 0 \
    --width 20  \
    --monitor primary \
    --widthtype request

I'm on Wayland using Xwayland

Trayer taking focus/closing under i3

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.

How to use custom icons?

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?

trayer disappear with icone change

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.

Reduce minimal panel height and add warnings (PANEL_HEIGHT_MIN)

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

http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=blob;f=x11-misc/trayer-srg/files/trayer-srg-1.1.2-panel_height.patch;h=a5d87cbf15a200394b4649348183603c18cb1ef1;hb=99bce18f66447dd744e3842af278c9d7b7a5dc39

--- 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)
    
  • } else if (p->height > PANEL_HEIGHT_MAX) {
  •   ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MAX );
         p->height = PANEL_HEIGHT_MAX;
    
  • }
    }
    panel_start_gui(p);
    RET(1);

Switching monitors and --edge right

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!

Align icons in the center

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?

nm-applet margin to other icons is increasing with each change

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.

After start

image

After some changes of the icon

E.g. due to changing the connected network.
image

Info

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 &

compile error on Arch Linux

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

Deprecation warnings -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_DEPRECATED

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’

http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=blob;f=x11-misc/trayer-srg/files/trayer-srg-1.1.2-cflags.patch;h=d9d56de2ef5c98b2ff917340ca4fa6e800edcdeb;hb=99bce18f66447dd744e3842af278c9d7b7a5dc39

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

-DGTK_DISABLE_DEPRECATED does not work yet

-CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED
+#CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED

%.o: %.c
$(CC) $(CFLAGS) $(INCS) -c $&lt;

get current width

Is there currently a way to query trayer in order to get the current width it occupies? thank you!

transparent part of icons are not repainting

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:

2018-11-17_201757_3840x1080_scrot

this is what it's suppose to look like (after restarting trayer):

2018-11-17_201833_3840x1080_scrot

please let me know if any info can be provided to help troubleshotting.

Please add option to lower trayer on start

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".

Bad _NET_WM_DESKTOP

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.

Option to add spacing between icons

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!

Icons only grow right to left.

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.

Hide some icons?

Would there be any way to add a way to exclude some application icons from trayer?

Trayer pops up as dragable window on XMonad

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.

Make it a GtkWidget ?

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 ;-)

Scaling issue

System tray icons of some applications scale to look quite bad.
Here the example is keepassxc, with --height 17.

screenshot-2023-04-16 1681657440

Man page : alpha cannot be 256

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`

Correct license.

please correct license of Trayer-SRG , you have some code licensed under GPL-2

Trayer problems in Openbox

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.

Linking with --as-needed fails

Please fix the gcc linker invokation in Makefile, place $(LIBS) behind -o $@, otherwise linking with -Wl,--as-needed (which is used on most distros nowadays) fails.

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 toXGetErrorText'
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 togtk_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 toXChangeProperty'
/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 functionpanel_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 tog_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 functionpanel_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

http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=blob;f=x11-misc/trayer-srg/files/trayer-srg-1.1.2-as-needed.patch;h=851b21f0eabecf83e3c87deeb3eab06c0e0755bd;hb=99bce18f66447dd744e3842af278c9d7b7a5dc39

--- trayer-srg-1.1.2/Makefile
+++ trayer-srg-1.1.2/Makefile
@@ -19,7 +19,7 @@

TARGET = trayer
$(TARGET): $(OBJ)

  • $(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
  • $(CC) $(LDFLAGS) $(OBJ) -o $@ $(LIBS)
    ifeq (,$(DEVEL))
    strip $@
    endif

Arch linux ( http://aur.archlinux.org/packages.php?ID=36049 ) clears the LDFLAGs, which is just wrong, imho.

Weird behavior with dwm

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:
1

This is what happens after I start an app that has a systray icon:
2

This is what happens after I close that app and systray becomes empty again:
3

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.

Use --isdistancefrom twice

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

New release?

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. :-)

ubuntu installation

For ubuntu, you'll need these two libraries for installation to work.

  • libgtk2.0-dev
  • libxmu-dev

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.