Other Removing decorations in labwc and a lot of stuff on configuring alacritty

The labwc window manager is a Wayland equivalent to openbox. I know that Alain De Vos has used it, and I think NapoleonWils0n has too.
At any rate, i have my various keyboard shortcuts, and one is to open a terminal, for me, urxvt . At any rate, it always opens with a decoration, their term for a title bar. I have set up a shortcut to ToggleDecorations, which can turn off the title bar with a keystroke, but in openbox, I'm able to specify that by default, nothing has a decoration, using, in my openbox.rc
<application class="*"><decor>no</decor></application>

In labwc's rc.xml sample I do see
<windowRule identifier="foo" serverDecoration="yes"/> <windowRule title="bar" serverDecoration="yes"/> <windowRule identifier="baz" title="quax" serverDecoration="yes"/>
but I'm not sure what it really does. I've tried setting all three of those to none, rather than yes, but it didn't seem to do anything.

At https://www.mankier.com/5/labwc-actions I do see a section for SetDecorations, but that didn't seem to work either, unless I messed up the syntax, which is possible because I wasn't 100% sure what to put the actions under--that is, does one start with windowRule or not.
Some web searching last night made me think that at least, when others were asking, the ToggleDecoration might be all that's available right now. I'm wondering though if someone has a way so that, by default, anything you open doesn't have a decoration.
At Alain and Napoleon, sorry for flagging you two, but I figure you're two of the most likely on the forums to know this, so figure you might get a notification about this post and at least glance at it.
 
hi mate

Code:
~/.config/labwc/rc.xml

server side decorations

Code:
  <core>
    <decoration>server</decoration>
    <gap>0</gap>
    <adaptiveSync>no</adaptiveSync>
    <allowTearing>no</allowTearing>
    <reuseOutputMode>no</reuseOutputMode>
  </core>

client side decorations
from memory i think thats the setting for client side decorations

Code:
  <core>
    <decoration>client</decoration>
    <gap>0</gap>
    <adaptiveSync>no</adaptiveSync>
    <allowTearing>no</allowTearing>
    <reuseOutputMode>no</reuseOutputMode>
  </core>
 
Nope, that doesn't seem to do it. The server section you have is under <core> in the default rc.xml. But adding the client section still gives me urxvt with a title bar. Thanks for the suggestion though.
 
Yeah, that one I already have, which serves the purpose but I'd prefer to have no decorations by default. (I feel like I'm whining, "But I can do it in openbox.."), and it's really a First World Problem, but it would be nice to have. :)
 
i seem to remember reading something about labwc window decorations
that some apps didnt always work

i used to use urxvt which is an x11 app
and not a native wayland application

maybe thats the issue with the decorations and Xwayland windows

Code:
~/.config/labwc/rc.xml

this line caught my attention

WM_CLASS for XWayland clients.

Code:
  <!--
    # Window Rules
    #   - Criteria can consist of 'identifier' or 'title' or both (in which
    #     case AND logic is used).
    #   - 'identifier' relates to app_id for native Wayland windows and
    #     WM_CLASS for XWayland clients.
    #   - Criteria can also contain `matchOnce="true"` meaning that the rule
    #     must only apply to the first instance of the window with that
    #     particular 'identifier' or 'title'.
    #   - Matching against patterns with '*' (wildcard) and '?' (joker) is
    #     supported. Pattern matching is case-insensitive.

    <windowRules>
      <windowRule identifier="*"><action name="Maximize"/></windowRule>
      <windowRule identifier="foo" serverDecoration="yes"/>
      <windowRule title="bar" serverDecoration="yes"/>
      <windowRule identifier="baz" title="quax" serverDecoration="yes"/>
    </windowRules>

i know switching terminals is like cutting of your arm

but urxvt is rather old and is a X11 application
so will run using XWayalnd and not as a native Wayland app

have you thought about trying a Wayland terminal like
alacritty or foot

i use alacritty and havent tried foot but some people like it
 
Yes, I thought of that too, and tried with foot, but no joy. (If it had worked, to be honest, I'd have probably stayed with urxvt anyway, despite it's various issues).

Though now you've got me looking at alacritty. Sigh, I should stop playing with every new toy that catches my eye.
 
my alacritty config



Code:
[colors.bright]
black = "0x002b36"
blue = "0x839496"
cyan = "0x93a1a1"
green = "0x586e75"
magenta = "0x6c71c4"
red = "0xcb4b16"
white = "0xfdf6e3"
yellow = "0x657b83"

[colors.normal]
black = "0x073642"
blue = "0x268bd2"
cyan = "0x2aa198"
green = "0x859900"
magenta = "0xd33682"
red = "0xdc322f"
white = "0xeee8d5"
yellow = "0xb58900"

[colors.primary]
background = "0x002b36"
foreground = "0x839496"

[env]
TERM = "xterm-256color"

[font]
size = 16.0

[font.bold]
family = "Fira Code"
style = "Bold"

[font.bold_italic]
family = "Fira Code"
style = "Bold Italic"

[font.italic]
family = "Fira Code"
style = "Italic"

[font.normal]
family = "Fira Code"
style = "Regular"

[window]
decorations = "full"
decorations_theme_variant = "Dark"
startup_mode = "Windowed"

[window.class]
general = "Alacritty"
instance = "Alacritty"

[window.padding]
x = 4
y = 4
 
Ah, I should copy that and see what I like. I just made one that gave me a borderless alacritty. It's only about 50 lines less than yours. :)
[window] decorations = "None"

What I like best about urxvt, however, is its ability to underline a url and be able to open it by just highlighting and hitting enter. I see alacritty mentions being able to do similarly but with the mouse. As I've only glanced at the thing so far, don't know if it can do that url thing with just keys.

By the way, I should mention, I have a little Wayland page and have a link to your dwl youtube video, and I never asked for permission, figuring it would be OK. And another link to our discussions here about Wayland and NVidia.
 
By the way, I should mention, I have a little Wayland page and have a link to your dwl youtube video, and I never asked for permission, figuring it would be OK.
ill notify my high powered lawyer immediately,
expect to hear from Rudy Giuliani soon

Just kidding, link away

this is what websites should look like
html pages with text, great stuff

srobb.net

alacritty running on labwc

with mac osx Tiger wallpaper


20240802_19h41m25s_grim.png
 
just a note on your wayland page


freebsd 14.1 creates the XDG_RUNTIME_DIR directory and exports the variable
so you dont need to create the directory or export it in your shell config

freebsd 14.1 XDG_RUNTIME_DIR location
where username is your username

Code:
/var/run/xdg/username

Code:
printenv

Code:
XDG_RUNTIME_DIR=/var/run/xdg/djwilcox

i see you already added that

As per FreeBSD forums user NapoleonWils0n, you shouldn't have to set this environment variable anymore. You should see that it's /var/run/xdg/<username>.
 
Heh, I thought I had fixed that. Thanks for pointing it out, it's fixed now.

As for the web page, a friend once saw it and said, You need a web designer. To which I answered, No, the idea is that anyone installing something can reach the pages without graphics.

There's one line of css to keep text more or less centered, and a few lines of javascript to mark when the page was last updated. But I agree with you that that's what most websites should be like, especially tech oriented ones. But it's no longer the fashion.
 
Sigh, yup, back to the drawing board. :) Though while I'm at it, let me see if Fedora and Void also automatically set it. Glad you read my stuff more closely than I do. :) (and meanwhile, been adding a little to my alacritty.toml, using your example though one thing I didn't find there was window size. I like the size of my urxvt which is around 80x24, but to get alacritty to look about the same I did
[window.dimensions] columns = 90 lines = 20

which gave me a terminal around the size of the urxvt one that I have set to 80x24 in .Xresources and seems around the same size in labwc on FreeBSD. (Different versions on VoidLinux).

Anyway, I took out all the mentions of the XDG_RUNTIME_DIR variable as it doesn't seem to be a problem anymore in any of the systems I tried.
 
Well, now I'm using alacritty a lot. But 20 minutes of searching and I can't figure out how to open urls. It seems that one puts a [[hints]] line in the toml file, but all the examples I found were in yaml and didn't work. So, since I'm shameless, do you know how to do that one?
If so, I could replace urxvt with it, for 95 percent of my usage. I even added a keyboard shortcut to my dwm config.h (my main workstation is the one with the NVidia card, so I use dwm and X on it.)
Not trying to be a help vampire, but the documents, to me at least, are really not clear. One example would solve it for me, something like your toml file.
 
By default, Alacritty provides hinting URLs via the Ctrl+Shift+U shortcut and opens them with xdg-open.

that didnt work for me but i found if you press

Code:
Ctrl+Shift

then you can click the link with the mouse


i only set the font and colour in my alacritty config

Code:
man 5 alacritty

alacritty doesnt seem to come with a example config file
 
No it doesn't seem to come with examples. I tried not only only on FreeBSD but also on Void and Fedora, and none of them gave a config file with it. I think I have to do a more dedicated web search for alacritty.tomls.
And, from your config, I got how to set font size and colors that I wanted. Alt+u didn't do anything for me either. I have the urxvt perlscripts, so in urxvt I can hit alt-u, it will highlight a URL and then I can hit enter, and it works.
In my .Xdefaults I have
urxvt.keysym.M-u: perl:url-select:select_next urxvt.url-select.launcher: firefox urxvt.url-select.underline: true

The ctl+shift and mouse works for me too, when I hover over the link it's underlined and clickable.

Doing some searching, some people seem to have gotten absurdly offended when someone suggested a sample config file. https://github.com/alacritty/alacritty/issues/6999
 
But 20 minutes of searching and I can't figure out how to open urls.
that didnt work for me but i found if you press

Code:
Ctrl+Shift
then you can click the link with the mouse
Long time x11/alacritty user here.

The Ctrl + Shift key combination is not necessary, x11/alacritty underlines a URL when hovering over it with the mouse, ready to open URL in the default browser when clicked.

To open URLs by keyboard, enter x11/alacritty in "vi mode" ( Shift + Control + Space ) , move cursor on URL ( the URL will be underlined ), press Enter to open URL, leave vi mode with same key combination, or " i ".

First thing I do when searching for information on installed packages is to list all files of the package ( pkg list <pkg_name> ) and search for man documentation.

x11/alacritty package includes alacritty-bindings(5) manual. The manual contains comprehensive documentation on key bindings (and a few lines about mouse bindings).

Under "Vi Mode" you can find scroll key bindings to move the cursor and other useful bindings.

alacritty.png


Note the block cursor on the WWW URL, and the current line number (counted from the bottom) in the top right corner, indicating "vi mode"
 
Ok, here's a sample file that includes urls by keyboard.

The trouble I'm finding with it is that it just seems to underline all links and there doesn't seem to be a way to select them. With urxvt, you hit alt+u and it highlights them one at a time.
Even though it's early here (I'm assuming you're in the UK), I'm a bit worn out, so back to this tomorrow. Thanks for your help and patience on this.
You'll see that I've renamed the thread.

And, it only sorta works. It seems I have to have firefox open for it to go to a link. If I just have mutt open, use ct+shift+u to get the link underlined, and hit enter, nothing happens.
 
T-Daemon that is exactly what I wanted. Thank you. I was trying some things from the link I mentioned above, the sample file, but it wasn't working the way I wanted. I removed the lines I had added to open links and used your suggestion and it works perfectly. I think the urxvt with perl extensions is easier, but that may just be because I'm so used to it. I'm going to be using alacritty a lot more now, thanks to you and NapoleonWils0n. And, as I get more used to it, more referencing of the sample toml file I linked above.
 
Having been playing more with alacritty, I've realized that man(5) shows most defaults, that is, things that will be used if you have no toml file. Firstly, you've got to hit man 5 alacritty, because there's also a man(1) alacritty giving options for the alacritty command such as alacritty --config-file for an alternate config file. So if you just go man alacritty, it'll open man(1).

Anyway, so along with T-Daemon's useful info, the man page gives the default for opening a url, it's ctl+shift+u which will, if you have no config file, underline and open a url. If there are several urls in the file, they will show as fttps, jttps, kttps, etc. So, if you want to open one, you hit j to open the jttps one, etc. As for me, I like urxvt's ctl+u that I set up at sometime, so I have a custom toml file with
[[hints.enabled]] command = "xdg-open" # On Linux/BSD hyperlinks = true post_processing = true persist = false mouse.enabled = false binding = { key = "u", mods = "Alt" } regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
I have the binding be u and the mods Alt, rather than the default U and Control|Shift. I also have the mouse disabled, though I doubt that makes a difference if I don't use it, whereas the default has it enabled.

And going back to dwl specifically, I've modified my ~/.tmux.conf
so it includes
Code:
set-option -g status-position top
This puts status at the top, which with dwl makes it more dwm to me. Since a window is usually the height of the monitor, it's fine (to me, anyway), and makes it easier to check the date for me.
 
Back
Top