PROJET AUTOBLOG


Chromic

Site original : Chromic

⇐ retour index

Trying Wayland

jeudi 21 mars 2019 à 05:00

Let me preface this by saying that I don't particularly dislike X11. I've used it for years, it did a pretty good job of getting out of the way, and most of the time I'm not really thinking about it.

I've been stumbling on more and more articles and mentions about Wayland, however, and so I've decided to try to use Wayland, and applications running on Wayland exclusively. For this experiment, I consider XWayland cheating, so I disabled it in my Sway configs.

It's been working pretty well so far. Now granted, I have pretty simple needs. I run most things in the terminal, and then I need a browser because you kind of have to nowadays.

Window Manager

The biggest push for me to start this experiment was hearing about Sway, a drop-in replacement for the i3 window manager. Given that i3 was the window manager I was running on X11, this seemed like an obvious choice. Sway, along with sway-bar, have been working very well.

On X11, I was also using xautolock to lock my screen after a period of inactivity. This has been replaced with swaylock. This only thing I'm missing from xautolock is the ability to prevent auto-locking by placing your mouse cursor in a corner of your screen (ex: top-right). This might be something that swaylock supports, but I haven't looked into it very hard.

Terminal

On X11, I was using st. On Wayland, I use wterm, which is an xterm replacement based on an st fork using wld.

Browser

I arbitrarily alternate between the following two browsers:

qutebrowser works on Wayland if you start it with the QT_QPA_PLATFORM=wayland environment variable. You can get rid of the window decorations by using the QT_WAYLAND_DISABLE_WINDOWDECORATION=1 environment variable as well.

Firefox Nightly will use Wayland if you start it with the GDK_BACKEND environment variable set to "wayland".

PDF Viewer

Firefox can open PDF files just fine, but I prefer my application with minimal window decorations so on X11 I was using xpdf. On Wayland, I use Zathura. This is a faily recent addition to my Wayland tools, and I try to avoid PDFs as much as possible, so my experience with Zathura is limited. It worked well the few times I used it though.

Image Viewer

In the same vein as the PDF Viewer, I was using feh as an image viewer. On Wayland, I use imv.

Screenshot Tool

I replaced scrot with grim. It doesn't seem to have a `--delay` option like `scrot` does, but doing `sleep 5 && grim screenshot.png` works just as well.

`grim` works well with `slurp` if you want to take screenshots of just a portion of the screen: `grim -g "$(slurp)" screenshot.png`

Password Manager

pass-wl-clipboard. This is pass, but patched with Wayland clipboard support. I'm using this package until the patch lands in an official release.

As a related side-note, I'm using wl-clipboard instead of xclip to manage clipboard content from the CLI.

Notifications

mako is in charge of displaying notifications.

Issues

I've been running this setup for a least a month now and I ran in to very few issues so far. The only thing I can think of at the moment is copy/pasting from wterm to firefox doesn't work or pastes symbols I don't understand (Google says it's Chinese, but won't translate it oddly enough). It's not a big deal for me so I haven't investigated the issue further yet.

Trying Wayland

jeudi 21 mars 2019 à 01:00

Let me preface this by saying that I don't particularly dislike X11. I've used it for years, it did a pretty good job of getting out of the way, and most of the time I'm not really thinking about it.

I've been stumbling on more and more articles and mentions about Wayland, however, and so I've decided to try to use Wayland, and applications running on Wayland exclusively. For this experiment, I consider XWayland cheating, so I disabled it in my Sway configs.

It's been working pretty well so far. Now granted, I have pretty simple needs. I run most things in the terminal, and then I need a browser because you kind of have to nowadays.

Window Manager

The biggest push for me to start this experiment was hearing about Sway, a drop-in replacement for the i3 window manager. Given that i3 was the window manager I was running on X11, this seemed like an obvious choice. Sway, along with sway-bar, have been working very well.

On X11, I was also using xautolock to lock my screen after a period of inactivity. This has been replaced with swaylock. This only thing I'm missing from xautolock is the ability to prevent auto-locking by placing your mouse cursor in a corner of your screen (ex: top-right). This might be something that swaylock supports, but I haven't looked into it very hard.

Terminal

On X11, I was using st. On Wayland, I use wterm, which is an xterm replacement based on an st fork using wld.

Browser

I arbitrarily alternate between the following two browsers:

qutebrowser works on Wayland if you start it with the QT_QPA_PLATFORM=wayland environment variable. You can get rid of the window decorations by using the QT_WAYLAND_DISABLE_WINDOWDECORATION=1 environment variable as well.

Firefox Nightly will use Wayland if you start it with the GDK_BACKEND environment variable set to "wayland".

PDF Viewer

Firefox can open PDF files just fine, but I prefer my application with minimal window decorations so on X11 I was using xpdf. On Wayland, I use Zathura. This is a faily recent addition to my Wayland tools, and I try to avoid PDFs as much as possible, so my experience with Zathura is limited. It worked well the few times I used it though.

Image Viewer

In the same vein as the PDF Viewer, I was using feh as an image viewer. On Wayland, I use imv.

Screenshot Tool

I replaced scrot with grim. It doesn't seem to have a `--delay` option like `scrot` does, but doing `sleep 5 && grim screenshot.png` works just as well.

Password Manager

pass-wl-clipboard. This is pass, but patched with Wayland clipboard support. I'm using this package until the patch lands in an official release.

As a related side-note, I'm using wl-clipboard instead of xclip to manage clipboard content from the CLI.

Notifications

mako is in charge of displaying notifications.

Issues

I've been running this setup for a least a month now and I ran in to very few issues so far. The only thing I can think of at the moment is copy/pasting from wterm to firefox doesn't work or pastes symbols I don't understand (Google says it's Chinese, but won't translate it oddly enough). It's not a big deal for me so I haven't investigated the issue further yet.

Trying Wayland

jeudi 21 mars 2019 à 01:00

Let me preface this by saying that I don't particularly dislike X11. I've used it for years, it did a pretty good job of getting out of the way, and most of the time I'm not really thinking about it.

I've been stumbling on more and more articles and mentions about Wayland, however, and so I've decided to try to use Wayland, and applications running on Wayland exclusively. For this experiment, I consider XWayland cheating, so I disabled it in my Sway configs.

It's been working pretty well so far. Now granted, I have pretty simple needs. I run most things in the terminal, and then I need a browser because you kind of have to nowadays.

Window Manager

The biggest push for me to start this experiment was hearing about Sway, a drop-in replacement for the i3 window manager. Given that i3 was the window manager I was running on X11, this seemed like an obvious choice. Sway, along with sway-bar, have been working very well.

On X11, I was also using xautolock to lock my screen after a period of inactivity. This has been replaced with swaylock. This only thing I'm missing from xautolock is the ability to prevent auto-locking by placing your mouse cursor in a corner of your screen (ex: top-right). This might be something that swaylock supports, but I haven't looked into it very hard.

Terminal

On X11, I was using st. On Wayland, I use wterm, which is an xterm replacement based on an st fork using wld alacritty since I eventually ran into a few issues with wterm.

Browser

I arbitrarily alternate between the following two browsers:

qutebrowser works on Wayland if you start it with the QT_QPA_PLATFORM=wayland environment variable. You can get rid of the window decorations by using the QT_WAYLAND_DISABLE_WINDOWDECORATION=1 environment variable as well.

Firefox Nightly will use Wayland if you start it with the GDK_BACKEND environment variable set to "wayland".

PDF Viewer

Firefox can open PDF files just fine, but I prefer my application with minimal window decorations so on X11 I was using xpdf. On Wayland, I use Zathura. This is a faily recent addition to my Wayland tools, and I try to avoid PDFs as much as possible, so my experience with Zathura is limited. It worked well the few times I used it though.

Image Viewer

In the same vein as the PDF Viewer, I was using feh as an image viewer. On Wayland, I use imv.

Screenshot Tool

I replaced scrot with grim. It doesn't seem to have a `--delay` option like `scrot` does, but doing `sleep 5 && grim screenshot.png` works just as well.

Password Manager

pass-wl-clipboard. This is pass, but patched with Wayland clipboard support. I'm using this package until the patch lands in an official release.

As a related side-note, I'm using wl-clipboard instead of xclip to manage clipboard content from the CLI.

Notifications

mako is in charge of displaying notifications.

Issues

I've been running this setup for a least a month now and I ran in to very few issues so far. The only thing I can think of at the moment is copy/pasting from wterm to firefox doesn't work or pastes symbols I don't understand (Google says it's Chinese, but won't translate it oddly enough). It's not a big deal for me so I haven't investigated the issue further yet.

Aqueous Radio

vendredi 17 novembre 2017 à 06:00
Automated Meter Reading (AMR) module

"I wonder what that thing is…"
Is what I thought when I saw the "thing" in the picture above stuck to our house when we moved in almost four years ago. I then promptly forgot about it as I got busy with other things.

Last summer however, I was walking around the expanding neighborhood near construction sites. I must've been in a particularly inquisitive mood and my eyes happened to focus on one of those "things" on another house. I decided that the mystery needed to be solved so I walked back home and did a bit of research (fancy way of saying I ran two or three web searches).

As most people already know, that thing is an Automated Meter Reading (AMR) transceiver device for utility meters. This specific one is from the 100 Series by Itron.

Cool Story, Bro

Mystery solved, right? Nope! Now I need to know how it works. And since it's wireless technology, now I need to know if there's a way for me to tap into it and see what kind of information I can get from it.

So I put on my robe and researcher hat, and hit up the good old search engine again. Not long after, I find that somebody wrote a software defined radio (SDR) receiver for Itron compatible smart meters. Nice!

I do a bit more research and end up getting this USB receiver thingy (RTL2832 + R820T) by NooElec. RTL2832 + R820T by NooElec

Things are Happening

With the above software/hardware combo I was able to receive data on the console, which is great, but wanted a way to get an overview over time.

Around that same time, I had recently setup a "influxdb + telegraf + grafana" stack to gather SNMP data from by Ubiquiti devices (the instructions on how to do this are here in case anyone's interested). So I thought using that same stack for the water meter data, somehow, would make the most sense.

At some point I stumbled upon this gist that does exactly that. A few tweaks here & there and I have water consumption data in graph form! Water consumption data, per day, in graph form

Aqueous Radio

vendredi 17 novembre 2017 à 01:00
Automated Meter Reading (AMR) module

"I wonder what that thing is…"
Is what I thought when I saw the "thing" in the picture above stuck to our house when we moved in almost four years ago. I then promptly forgot about it as I got busy with other things.

Last summer however, I was walking around the expanding neighborhood near construction sites. I must've been in a particularly inquisitive mood and my eyes happened to focus on one of those "things" on another house. I decided that the mystery needed to be solved so I walked back home and did a bit of research (fancy way of saying I ran two or three web searches).

As most people already know, that thing is an Automated Meter Reading (AMR) transceiver device for utility meters. This specific one is from the 100 Series by Itron.

Cool Story, Bro

Mystery solved, right? Nope! Now I need to know how it works. And since it's wireless technology, now I need to know if there's a way for me to tap into it and see what kind of information I can get from it.

So I put on my robe and researcher hat, and hit up the good old search engine again. Not long after, I find that somebody wrote a software defined radio (SDR) receiver for Itron compatible smart meters. Nice!

I do a bit more research and end up getting this USB receiver thingy (RTL2832 + R820T) by NooElec. RTL2832 + R820T by NooElec

Things are Happening

With the above software/hardware combo I was able to receive data on the console, which is great, but wanted a way to get an overview over time.

Around that same time, I had recently setup a "influxdb + telegraf + grafana" stack to gather SNMP data from by Ubiquiti devices (the instructions on how to do this are here in case anyone's interested). So I thought using that same stack for the water meter data, somehow, would make the most sense.

At some point I stumbled upon this gist that does exactly that. A few tweaks here & there and I have water consumption data in graph form! Water consumption data, per day, in graph form