Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tint2-style panel in wayland
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Tue Jul 11, 2023 2:02 am    Post subject: Tint2-style panel in wayland Reply with quote

Hello, I switched to wayland several months ago, and after trying several window managers, have been using wayfire consistently. The one thing I haven't figured out despite several tries is how I can have a panel like my tint2 configuration.

My tint2 configuration is just a wide panel along the full bottom or side of the screen, with icons only in the taskbar, a notification area, and maybe a clock, but the clock isn't important. It needs to hide automatically except when I move the cursor to the bottom of the screen, and then remain visible only until the cursor is outside its area. An openbox or XFCE-style menu would also be nice (OK, that's not the panel, but it came to mind).

I went to the Gentoo wayland page and tried all the panels listed there, but couldn't quite configure any of them like that. Does anyone have any ideas?
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1449
Location: Earth

PostPosted: Tue Jul 11, 2023 2:06 pm    Post subject: Reply with quote

it's possible with waybar, look here https://github.com/WayfireWM/wayfire/issues/1739

or is it wf-shell ? >>> https://github.com/WayfireWM/wf-shell/blob/master/wf-shell.ini.example

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6102
Location: Dallas area

PostPosted: Tue Jul 11, 2023 2:39 pm    Post subject: Reply with quote

Waybar can work as a tint2 replacement (not totally as wayland is different than X)
I don't remember whether they have added the hide feature yet, I've seen requests.

Xfce4 is in transition to wayland, and one of the pieces was the panel, but I'm not sure what the current status is.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Wed Jul 12, 2023 1:35 pm    Post subject: Reply with quote

CooSee wrote:
it's possible with waybar, look here https://github.com/WayfireWM/wayfire/issues/1739

or is it wf-shell ? >>> https://github.com/WayfireWM/wf-shell/blob/master/wf-shell.ini.example

8)


Thank you. If I remember correctly, wayfire didn't support the I.P.C. that waybar needed to autohide. I ended up using screen border rules in wayfire to send the signal to waybar to make it hide, but it seemed clunky and didn't always work as intended. I'll try again, though, with wayfire 9999.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1449
Location: Earth

PostPosted: Wed Jul 12, 2023 2:07 pm    Post subject: Reply with quote

you're welcome :D
Quote:
I'll try again, though, with wayfire 9999

before you play with *-9999 <<< it depends on stable wlroots and has some weird additional dependencies (ebuild needs a clean up, imho).

better download garudas wayfire edition and try some things out via live session https://garudalinux.org/downloads.html <<< scroll down to Wayfire edition.

i hope it'll give you some inspirations.

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Thu Jul 13, 2023 1:17 pm    Post subject: Reply with quote

From what I have read, waybar will autohide in sway using I.P.C.

I switched to sway and tried configuration a bit lower in this thread https://www.reddit.com/r/swaywm/comments/rttbt9/hide_waybar/ , but that didn't work for me, either. It's from two years ago, and says that you need wlroots 0.15 (I have 0.16.2), sway 1.7 (I have 1.8.1), and waybar from git (I have 0.9.19.... hopefully what was in git then is in the release by now). OK, I compiled waybar from git (9999), but it still didn't work.

I also tried copying the configuration from https://www.reddit.com/r/swaywm/comments/saucyg/you_can_hidetoggle_waybar/ to no avail.

I've been using wayfire most of the time, and I found this about waybar hiding: https://github.com/WayfireWM/wf-shell/issues/90

There are apparently I.P.C. plugins for wayfire, but I haven't tried them yet.

I'm not sure why autohiding is such a tricky feature here, or why it should supposedly work in one window manager but not in another.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6102
Location: Dallas area

PostPosted: Thu Jul 13, 2023 3:03 pm    Post subject: Reply with quote

For bar/panel there is also nwg-panel https://github.com/nwg-piotr/nwg-panel
and gbar https://github.com/scorpion-26/gBar

Though I haven't tried either one of them.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1449
Location: Earth

PostPosted: Thu Jul 13, 2023 5:12 pm    Post subject: Reply with quote

Code:
I also tried copying the configuration from...

yes, this should work - in waybar config you've to add:
Code:
"bar_id": "bar-0",
"ipc": true,

here are some options i saved for later time:
Code:
//  "layer": "top",                               // Waybar at top layer
//  "mode": "dock",                               // Display mode (dock|hide|invisible|overlay)
//  "exclusive": true,                            // Request an exclusive zone from the compositor
//  "passthrough": false,                         // Pass any pointer events to the window under the bar
//  "position": "left",                   // Waybar position (top|bottom|left|right)
//  "height": "",                                         // Waybar height (to be removed for auto height)
//  "width": "",                                  // Waybar width (empty for auto width)
//  "spacing": 0,                                         // Gaps between modules
//  "margin": 0,                                  // Space around the bar
//  "margin-top": 15,                             // Space above the bar
//  "margin-bottom": 15,                  // Space below the bar
//  "margin-left": 15,                            // Space to the left of the bar
//  "margin-right": 0,                            // Space to the right of the bar
//  "fixed-center": false,                        // Center modules position
//  "ipc": true,                                  // Control waybar with `swaymsg bar` commands
//  "bar_id": "bar-0",


i can't find my backup from older configs, but it'll look like this:
Code:
"bar_id": "bar-0",
"ipc": true,
"position": "top",
"mode": "hide",
"hidden_state": "show"

look here for Bar Config options httphttps://github.com/Alexays/Waybar/wiki/Configuration

i have an option in Sway for manual hiding waybar via:
Code:
 # Hide/Show waybar
    bindsym $mod+Control+h exec pkill -SIGUSR1 '^waybar$'


or you could also use F11 to go in fullscreen.

i just found this (TLDR), but i assume this works only with *-9999 version of waybar and most options depends on gui-libs/wlroots-9999 for using some new protocols.

here are some examples https://github.com/Alexays/Waybar/pull/1244

i already use live Sway/Waybar/Wayland ebuilds for a long time now - no big issues - here are all my live ebuilds:
Code:
[ebuild   R   *] app-text/scdoc-9999::gentoo  0 KiB
[ebuild   R   *] gui-apps/tinydm-9999::genlayees  0 KiB
[ebuild   R   *] dev-util/wayland-scanner-9999::gentoo  0 KiB
[ebuild   R   *] media-libs/libglvnd-9999::gentoo  USE="X -test" 0 KiB
[ebuild   R   *] dev-libs/wayland-9999::gentoo  USE="-doc -test" 0 KiB
[ebuild   R   *] dev-libs/wayland-protocols-9999::gentoo  USE="-test" 0 KiB
[ebuild   R   *] gui-apps/wl-clipboard-9999::gentoo  0 KiB
[ebuild   R   *] gui-apps/wlr-randr-9999::genlayees  0 KiB
[ebuild   R   *] x11-misc/dmenu-9999::gentoo  USE="-savedconfig xinerama" 0 KiB
[ebuild   R   *] app-shells/fish-9999::genlayees  USE="-doc nls (split-usr) -test" 0 KiB
[ebuild   R   *] gui-apps/swaybg-9999::gentoo  USE="gdk-pixbuf man" 0 KiB
[ebuild   R   *] gui-apps/swaylock-effects-9999::genlayees  USE="filecaps fish-completion gdk-pixbuf man pam zsh-completion" 0 KiB
[ebuild   R   *] sys-auth/seatd-9999:0/1::gentoo  USE="builtin elogind server -systemd" 0 KiB
[ebuild   R   *] gui-apps/swayidle-9999::gentoo  USE="elogind man -systemd" 0 KiB
[ebuild   R   ~] gui-apps/cliphist-9999::genlayees  0 KiB
[ebuild   R   ~] gui-apps/rofi-wayland-9999::genlayees  USE="drun -test windowmode" 0 KiB
[ebuild   R   *] gui-wm/hyprland-9999-r4::genlayees  USE="-X hwdata seatd -source udev -vulkan x11-backend" VIDEO_CARDS="-nvidia" 0 KiB
[ebuild   R   *] dev-cpp/waylandpp-9999:0/9999::gentoo  USE="-doc" 0 KiB
[ebuild   R   *] gui-libs/wlroots-9999:0/9999::gentoo  USE="X drm libinput -liftoff session -tinywl -vulkan x11-backend xcb-errors" 0 KiB
[ebuild   R   *] gui-libs/gtk-layer-shell-9999::genlayees  USE="examples -gtk-doc introspection -test vala" 0 KiB
[ebuild   R   *] gui-apps/wofi-9999::gentoo  0 KiB
[ebuild   R   *] gui-apps/hyprland-addons-9999::genlayees  USE="grimblast shellevents" 0 KiB
[ebuild   R   *] gui-wm/sway-9999::gentoo  USE="X grimshot man swaybar swaynag tray wallpapers" 0 KiB
[ebuild   R   *] gui-apps/waybar-9999::gentoo  USE="-evdev experimental -jack libinput logind mpd -mpris network -pipewire popups pulseaudio -sndio -systemd -test tray udev -upower wifi" 0 KiB
[ebuild   R   *] gui-apps/wf-recorder-9999::gentoo  0 KiB


no guarantee :!:

WayFire is another story - it has to many options for me - i used to make Compiz packages for debian-forum users, long time ago - maybe i'am to old nowadays :lol:

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
CrazyLion
n00b
n00b


Joined: 27 Jun 2010
Posts: 7
Location: London

PostPosted: Sun Jul 16, 2023 2:48 pm    Post subject: Reply with quote

This may be a shameless plug, but sfwbar https://github.com/LBCrion/sfwbar has tint2 look alike configuration.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Mon Jul 17, 2023 5:18 pm    Post subject: Reply with quote

CrazyLion wrote:
This may be a shameless plug, but sfwbar https://github.com/LBCrion/sfwbar has tint2 look alike configuration.


Does sfwbar have an autohide/autoshow option? I didn't see anything obvious about it in the documentation.
Back to top
View user's profile Send private message
CrazyLion
n00b
n00b


Joined: 27 Jun 2010
Posts: 7
Location: London

PostPosted: Mon Jul 17, 2023 8:30 pm    Post subject: Reply with quote

keet wrote:
Does sfwbar have an autohide/autoshow option? I didn't see anything obvious about it in the documentation.


There is show-on-modifier, but this feature is sway specific (as it uses i3 ipc for notification). The latest git version also has show/hide on mouse-over (I.e. the bar is hidden by default, but pops up when you move mouse pointer to the edge of the screen).
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Tue Jul 18, 2023 1:28 pm    Post subject: Reply with quote

CrazyLion wrote:
keet wrote:
Does sfwbar have an autohide/autoshow option? I didn't see anything obvious about it in the documentation.


There is show-on-modifier, but this feature is sway specific (as it uses i3 ipc for notification). The latest git version also has show/hide on mouse-over (I.e. the bar is hidden by default, but pops up when you move mouse pointer to the edge of the screen).


Thanks, I installed sfwbar from git, and while it looks nice, I'm not sure how to make the autohide/autoshow work. I grepped the documentation for instances of 'hid' and 'mouse', but didn't see anything that looked right, and it's not hiding/showing automatically in wayfire or sway.
Back to top
View user's profile Send private message
CrazyLion
n00b
n00b


Joined: 27 Jun 2010
Posts: 7
Location: London

PostPosted: Tue Jul 18, 2023 8:24 pm    Post subject: Reply with quote

keet wrote:

Thanks, I installed sfwbar from git, and while it looks nice, I'm not sure how to make the autohide/autoshow work. I grepped the documentation for instances of 'hid' and 'mouse', but didn't see anything that looked right, and it's not hiding/showing automatically in wayfire or sway.


Alas, I just realised that I still need to update documentation for this feature. You can add
Code:
SetBarSensor "700"
to the SfwBarInit function in the config file, the 700 value is the time in milliseconds the bar remains visible after the pointer leaves the bar window.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Tue Jul 18, 2023 9:29 pm    Post subject: Reply with quote

CrazyLion wrote:
keet wrote:

Thanks, I installed sfwbar from git, and while it looks nice, I'm not sure how to make the autohide/autoshow work. I grepped the documentation for instances of 'hid' and 'mouse', but didn't see anything that looked right, and it's not hiding/showing automatically in wayfire or sway.


Alas, I just realised that I still need to update documentation for this feature. You can add
Code:
SetBarSensor "700"
to the SfwBarInit function in the config file, the 700 value is the time in milliseconds the bar remains visible after the pointer leaves the bar window.


That looks good so far. For some reason, in wayfire, it's squishing the windows when it's showed, like it's shrinking everything else on the screen to make the bar fit, instead of simply rising over the window occupying its area. It might be something with wayfire, though, because it doesn't happen in sway.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1449
Location: Earth

PostPosted: Tue Jul 18, 2023 10:14 pm    Post subject: Reply with quote

this is really confusing, because wayfire also use wlroots, waybar etc. and this should be possible like with sway:
Code:
hidden_state hide|show [] Specifies the behaviour of the bar when it is in hide mode. When the hidden state is hide, then it is normally hidden, and only unhidden by pressing the modifier key or in case of urgency hints. When the hidden state is show, then it is permanently visible, drawn on top of the currently visible workspace. Default is hide.

For compatibility with i3, _bar hidden_state hide|show [<bar-id>]_ is
supported along with the sway only _bar <bar-id> hidden_state hide|show_
syntax. When using the i3 syntax, if _bar-id_ is omitted, the hidden_state
will be changed for all bars. Attempting to use _bar <bar-id1>
hidden_state hide|show <bar-id2>_ will result in an error due to
conflicting bar ids.

mode dock|hide|invisible|overlay [] Specifies the visibility of the bar. In dock mode, it is permanently visible at one edge of the screen. In hide mode, it is hidden unless the modifier key is pressed, though this behaviour depends on the hidden state. In invisible mode, it is permanently hidden. In overlay mode, it is permanently visible on top of other windows. (In overlay mode the bar is transparent to input events.) Default is dock.

For compatibility with i3, _bar mode <mode> [<bar-id>]_ syntax is supported
along with the sway only _bar <bar-id> mode <mode>_ syntax. When using the
i3 syntax, if _bar-id_ is omitted, the mode will be changed for all bars.
Attempting to use _bar <bar-id1> mode <mode> <bar-id2>_ will result in an
error due to conflicting bar ids.

modifier |none Specifies the modifier key that shows a hidden bar. Default is Mod4.

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
CrazyLion
n00b
n00b


Joined: 27 Jun 2010
Posts: 7
Location: London

PostPosted: Tue Jul 18, 2023 10:18 pm    Post subject: Reply with quote

keet wrote:

That looks good so far. For some reason, in wayfire, it's squishing the windows when it's showed, like it's shrinking everything else on the screen to make the bar fit, instead of simply rising over the window occupying its area. It might be something with wayfire, though, because it doesn't happen in sway.


This sounds like a layer shell exclusive zone pushing windows out of the way. Try adding
Code:
SetExclusiveZone "-1"
to SfwBarInit.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Thu Jul 20, 2023 7:30 pm    Post subject: Reply with quote

CrazyLion wrote:
keet wrote:

That looks good so far. For some reason, in wayfire, it's squishing the windows when it's showed, like it's shrinking everything else on the screen to make the bar fit, instead of simply rising over the window occupying its area. It might be something with wayfire, though, because it doesn't happen in sway.


This sounds like a layer shell exclusive zone pushing windows out of the way. Try adding
Code:
SetExclusiveZone "-1"
to SfwBarInit.


Thanks, that worked. I'm using it in labwc now, and it seems to be good. For some reason, in wayfire, clicking windows in sfwbar didn't give them focus, it's working in sway and labwc. For some reason, the bar tends to disappear while I'm dragging/repositioning windows, but if I move them quickly, then it stays up long enough for me to move them.
Back to top
View user's profile Send private message
CrazyLion
n00b
n00b


Joined: 27 Jun 2010
Posts: 7
Location: London

PostPosted: Fri Jul 21, 2023 6:43 am    Post subject: Reply with quote

keet wrote:
For some reason, the bar tends to disappear while I'm dragging/repositioning windows, but if I move them quickly, then it stays up long enough for me to move them.


I pushed an update into git to keep the bar visible while you're dragging items. It still pops down once the drag is complete, but should be more usable now. I'll take a look at that last bit when I'm back home next week.

What version of wayfire were you using? I'll run some tests to see if anything changed on the compositor side. Wayfire uses wlr foreign toplevel protocol, same as labwc, so should behave the same way (at least in theory).
Back to top
View user's profile Send private message
CrazyLion
n00b
n00b


Joined: 27 Jun 2010
Posts: 7
Location: London

PostPosted: Tue Jul 25, 2023 7:21 am    Post subject: Reply with quote

And with the latest git version, the bar shouldn't pop down when the drag finishes within the bar window either.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3357
Location: Rasi, Finland

PostPosted: Tue Jul 25, 2023 8:07 am    Post subject: Reply with quote

I've been using gui-apps/sfwbar with wayfire. It's very customizable but also comes with several premade configs. One which is /usr/share/sfwbar/t2.config and should resemble tint2 (I used is as basis of my own config IIRC).
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Fri Jul 28, 2023 4:16 pm    Post subject: Reply with quote

Thank you, moving icons works and the bar remains visible after I move them. For some reason, click for focus isn't working in wayfire, but it works in sway.

I appreciate all of your work on your project to make it usable. It's a nice panel.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3357
Location: Rasi, Finland

PostPosted: Fri Jul 28, 2023 7:05 pm    Post subject: Reply with quote

Well, I should have read few post back before I posted. :D

Thanks for your efforts with sfwbar CrazyLion.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 571

PostPosted: Sat Jul 29, 2023 2:31 am    Post subject: Reply with quote

Zucca wrote:
Well, I should have read few post back before I posted. :D

Thanks for your efforts with sfwbar CrazyLion.


Sorry, I didn't mean to ignore your comment (thanks for recommending it). I've just been a bit busy and didn't have as much time to read/post here, and I wanted to make sure that CrazyLion knew that I had tested it and tried the updates.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum