Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tray and $xxx$ scripts not displaying #75

Open
rebdeg opened this issue May 22, 2022 · 11 comments
Open

tray and $xxx$ scripts not displaying #75

rebdeg opened this issue May 22, 2022 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@rebdeg
Copy link

rebdeg commented May 22, 2022

I have 'tray' active in my hypr.conf and also added some scripts ($vol$ and $wifi$) to my bar settings, but both tray and script output are not displayed. %RAM% and %CPU% display OK.
Both my scripts when run in the terminal give the expected output, which is not displayed in the bar.
Bug?

@rebdeg rebdeg added the bug Something isn't working label May 22, 2022
@vaxerski
Copy link
Member

show config

@rebdeg
Copy link
Author

rebdeg commented May 22, 2022

Bar {
33 │ height=35
34 │ monitor=0
35 │ enabled=1
36 │ mod_pad_in=12
37 │ no_tray_saving=1 # using this doesnt save the tray between reloads but fixes an issue with the bar disappearing.
38 │
39 │ font.main=Hermit
40 │ font.secondary=FontAwesome
41 │ font.size=22
42 │ col.bg=0xcc222222
43 │ col.high=0xffffa700
44 │
45 │ module=left,X,0xff8000ff,0xffffffff,1,workspaces
46 │ module=pad,left,10
47 │ module=left,X,0xffb8b8b8,0x00222222,1,tray
48 │ module=left,,0xffb8b8b8,0x00222222,1000,%WINNAME%
49 │ module=right,,0xffb8b8b8,0x00222222,1000,[ $date +%a,\ %d\ %b\ %Y\ \ %I:%M\ %p$ ]
50 │ module=pad,right,15
51 │ module=right,,0xffb8b8b8,0x00222222,1000,%CPU%
52 │ module=pad,right,15
53 │ module=right,,0xffb8b8b8,0x00222222,1000, %RAM%
54 │ # module=right,,0xffb8b8b8,0x00222222,500, $volume$
55 │ module=right,,0xffb8b8b8,0x00222222,1000,$web$
56 │ module=right,,0xffb8b8b8,0x00222222,1000,:
57 │
58 │ }

@rebdeg
Copy link
Author

rebdeg commented May 22, 2022

$volume$ and $web$ are my scripts
this is better readable:

Bar config

Bar {
height=35
monitor=0
enabled=1
mod_pad_in=12
no_tray_saving=1 # using this doesnt save the tray between reloads but fixes an issue with the bar disappearing.

font.main=Hermit
font.secondary=FontAwesome
font.size=22
col.bg=0xcc222222
col.high=0xffffa700

module=left,X,0xff8000ff,0xffffffff,1,workspaces
module=pad,left,10
module=left,X,0xffb8b8b8,0x00222222,1,tray
module=left,,0xffb8b8b8,0x00222222,1000,%WINNAME%
module=right,,0xffb8b8b8,0x00222222,1000,[ $date +%a,\ %d\ %b\ %Y\ \ %I:%M\ %p$ ]
module=pad,right,15
module=right,,0xffb8b8b8,0x00222222,1000,%CPU%
module=pad,right,15
module=right,,0xffb8b8b8,0x00222222,1000, %RAM%

module=right,,0xffb8b8b8,0x00222222,500, $volume$

module=right,,0xffb8b8b8,0x00222222,1000,$web$
module=right,,0xffb8b8b8,0x00222222,1000,:

}

@vaxerski
Copy link
Member

can you launch

web

in your terminal? That's basically what it does.

If it's a script, you should use its actual path:

~/my/path/to/web.sh

@eingorz
Copy link

eingorz commented Jul 11, 2022

Doesn't work for me either even with an example config

@vaxerski
Copy link
Member

vaxerski commented Jul 11, 2022

image

    module=right,,0xffffffff,0x22ffffff,1000,$date +%a,\ %d\ %b\ %Y\ \ %I:%M\ %p$
    module=pad,right,10
    module=right,,0xffffffff,0x22ffffff,1000, %RAM%
    module=pad,right,10
    module=right,ﲯ,0xffffffff,0x22ffffff,1000, %CPU%
    module=pad,right,10
    module=right,,0xffffffff,0x22ffffff,60000, $checkupdates | wc -l$
    module=center,﯑,0xffffffff,0x22ffffff,50, %WINNAME%

@ghost
Copy link

ghost commented Nov 16, 2022

Screenshot_2022_16_1668579713_1920x1080

Hi, I have used Hypr for a week. I appreciate the smooth animation, rounded window corner, and built-in status bar. However, there is a small problem that makes me confused. According to the screenshot and the config, the shell scripts can execute and display well on status bar and I think the tray may display on the right hand of the date, but the tray can't display correctly. Is there any solution for the problem? Thank you!

The below is part of my configuration:

Bar {
    enabled=1
    height=30
    mod_pad_in=24
    force_no_tray=0
    no_tray_saving=0
    font.main=SF Pro Text Bold
    font.size=20
    col.bg=0xff282828
    col.high=0xffd65d0e

    module=left,,0xfffbf1c7,0xff282828,1,workspaces
    module=left,,0xff8ec07c,0xff282828,1000,%WINNAME%

    module=pad,left,10
    module=right,,0xff7000dd,0xffffffff,1,tray
    module=pad,left,10
    module=right,,0xfffbf1c7,0xff282828,1000,$date +%Y-%m-%d\ \ %H:%M$
    module=pad,left,10
    module=right,,0xffd3869b,0xff282828,1000,$~/.config/hypr/scripts/functions/battery.sh$
    module=pad,left,10
    module=right,,0xff83a598,0xff282828,1000,$~/.config/hypr/scripts/functions/backlight.sh$
    module=pad,left,10
    module=right,,0xffb8bb26,0xff282828,1000,$~/.config/hypr/scripts/functions/alsa.sh$
    module=pad,left,10
    module=right,,0xfffabd2f,0xff282828,1000,$~/.config/hypr/scripts/functions/mem.sh$
    module=pad,left,10
    module=right,CPU ,0xfffb4934,0xff282828,1000,%CPU%
}

@vaxerski
Copy link
Member

have you tried restarting Hypr? there are some issues with the tray if you reload the config.

@ghost
Copy link

ghost commented Nov 16, 2022

@vaxerski

Hi, I tried it, but it didn't work.

@vaxerski
Copy link
Member

no clue then

@ghost
Copy link

ghost commented Nov 16, 2022

I reinstall the Hypr, and the tray displays correctly. The speed of drawing the tray is a little bit slow, but I know that there is no problem with the tray at least. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants