2023-10-22 Trying to use Sway as my window manager
I'm hoping to get a MNT Pocket Reform at some point and I heard that it comes with Sway as the default window manager. No problem, I can get into that. Years ago I was a fan of ratpoison and i3. Today, I'm trying to use sway. I think my biggest problem right now is that the pipe/backslash key works like a < and > key. How weird is that. Maybe some weird key binding that is coming back to haunt me.
In order to get started, I copied `/etc/sway/config` to `~/.config/sway/config` and started making some changes.
Scrolling with the touch pad was weird. Somehow inverted! The answer was to have `natural_scroll enabled` for the touchpad input. This didn't always work. And the scroll wheel was different than the touchpad. So right now I'm using the following:
This also makes Caps Lock the Compose Key again.
Getting the less key instead of the backslash key remained a problem. There are so many variants in `/usr/share/X11/xkb/symbols/us`. After a while I realised that I needed a variant with LSGT (less/greater) being mapped to `backslash` and `bar`, like this:
The options I had seemed to be: `euro`, `ibm2381`, `intl`, and so on. But also anything that contained dead keys was no good:
In these variants, I have to type every back-quote, single-quote, double-quote and circumflex twice. @bkhl@social.sdfeu.org pointed me to `altgr-intl`. Thanks!
Now I'm wondering about suspending the laptop. With Gnome, I'd hit the GUI key and type "suspend", Enter, done. But there is no "suspend" command. I ended up installing `wlogout` which gives me huge buttons to lock, logout, suspend, hibernate, shutdown and reboot. But, surprisingly, when it suspends, and it comes back, no password is required. That's weird!
I installed `cryptsetup-suspend` which adds something the old setup did not have: returning from a suspend now asks for the disk decryption password but still does not ask for the account password. Well, on a single user system like mine, one of the two is good enough, I guess. But still. And then the other time I tried it (by running wlogout and choosing "suspend") the system would go to sleep and I couldn't find a way to get it back. And when I reset it, it wiped my keyboard's config?? I don't quite understand but I hate all of it. I uninstalled it again.
β#Administration β#Sway β#Window Managers
Time has passed and today I added keybindings for lowering and raising the volume.
So proud of myself. π
As for playback from the command-line, right now I'm using `mpv`:
Status bar
OK, time for fiddling with stuff. Every minute, the script called to produce the status bar.
The script prints something like this:
This is the code. As you can see it calls `awk`, `perl` and tons of other stuff. Yikes!
I'm learning quite a bit about controlling my system from the command line. I hadn't known about `nmcli`.
In order for the computer to lock when when idle, install `swayidle` (a separate Debian package). Then the following will have the expected effect:
**2023-12-23**. See Console for me getting rid of session managers and display managers. Now I boot into the console, log in, and my login shell starts Sway.
**2023-12-27**. I tried hibernation again and it worked. Ran `wlogout` and picked Hibernate. Everything went black. I waited for a bit, pressed the power button, and it came back up. First the initramfs asking me for disk decryption, then a black screen that I recognized as the password prompt. π¬
**2023-12-29**. I recided to remove the `xserver-common` package, removing all the X11 stuff from the system. Well, a lot of it in any case. Also no `xwayland`.
With no more X11, I noticed that `dmenu` no longer worked and I replaced it with `wofi`. The following lets me use GUI+d to start desktop applications and GUI+Shift+d to start binaries on my `$PATH`.
I also had to rebuild Emacs using `./configure --with-pgtk` to get a graphical Emacs without X11.
This is going to be interesting.
**2024-01-19**. Switched from `wofi` to `fuzzel`. Also installed `bemoji`.
The config file sets the terminal and gets rid of transparency:
**2023-12-31**. Interesting, there's also an x11-common package that I cannot remove. If I do that, libice6 needs to go, and with that, Libre Office has to go, for example⦠Wow.
Removing x11proto-dev is also impossible. So many other dev packages seem to depend on it, I suspect Emacs would no longer work.
Removing x11-utils removes Chromium, the backup browser! Now it really starts to hurt.
I guess X11 is here to stay.
**2024-01-01**. Install sway-notification-center for the Firefox web notifications to show up correctly.
Oh. And Gimp needs X11? "Cannot open display:" β¦ that's bad.
I tried to use another file manager. Something leaner. Like midnight commander? I also looked at `nnn`. I think it uses `xdg-open` to open files.
Here's what's weird. The default application for PDF files is Gimp instead of Evince. I want to change that, but it appears to have no effect.
In desperation, I uninstalled Gimp. The default was set to Libre Office Draw. I uninstalled that, too. Now the default was correct: `org.gnome.Evince.desktop`. What a headache. I'm sure it can be specified somewhere, but I don't know how.
OK, reinstalled Gimp, same problem. But now:
Oh, and installing xwayland, of course, so that I can run Gimp again.
**2024-04-01**. In order to switch Firefox to dark mode, edit the GTK settings file and restart Firefox. Currently, that's the config file `~/.config/gtk-3.0/settings.ini`, even though a similar file exists for 4.0. The only setting that's important in this context:
Sadly, the above only changes my Firefox theme and doesn't seem to affect this site's CSS. The following has no effect:
At the console, the following still returns `false`, disappointingly:
It works with Chromium. My Firefox is 115.9.1esr (64-bit). This is unrelated to Sway: The situation is unchanged when I switch to Gnome. I feel like this has worked before?
**2024-09-05**. Still using Sway. Also using Sway on the MNT Pocket Reform.
**2024-11-21**. Switching to the EURkey layout.
The tricky parts:
- COβ uses `Caps Lock _ 2`
- the EN DASH takes `Shift-Alt-7 Alt-Minus` (Shift-Alt-7 is for the macron)
- β¦ is `Shift-Alt-/`
- Β« Β» is `Alt-[` and `Alt-]`
- β β is `Caps Lock < -` and `Caps Lock - >`
Strangely, on Windows, more combos are possible but Caps Lock is no Compose Key.
**2025-02-10**. I have a Purism Librem 13 laptop and when you change the keyboard layout, things get weird: The backslash key (above the Enter key) turns into a less-than key!
Today I was finally able to find out why:
By default, the keyboard in the Librem v4 (and previous) expects you to pick the US international keyboard layout, instead of the US keyboard layout. This makes the key above the enter key, normally assigned to \ and | (and labeled as such) send french quotation marks instead (Β« and Β»). -- Installing Debian on Purism Librem 13: Keyboard
Installing Debian on Purism Librem 13: Keyboard
The solution was to create a file called `/etc/udev/hwdb.d/90-purism-pipe-symbol-fix.hwdb` as described in the wiki, containing the following:
Contrary to the wiki article, I didn't specify Librem 13v4 because I have some older version (and thus 13v4 had no effect).
Reboot, or run the following:
Thanks, @deshipu@fosstodon.org.
β#Purism
**2025-03-19**. I used niri for a bit and came back with some stuff for my config file.
I no longer use a background.
Instead of using `swaync` I'm using `mako` for notifications.
Instead of using the swaybar, I use the waybar. The main benefit is that it reacts immediately to changes in volume.
Volume control switched from `amixer` to `wpctl`:
New monitor layout with a different scale for my laptop!