summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2021-12-21 20:33:54 -0500
committerlxf <sng@luxagraf.net>2021-12-21 20:33:54 -0500
commit3dfdebcbe743659180e6a64d99528f77915664a6 (patch)
tree226a36725de72c29f8248225f359b404809c310f /src
parente58f5b252c1a928463037800f0273c52dca51f11 (diff)
consolodated a bunch of notes and sketches into scratch.txt
Diffstat (limited to 'src')
-rw-r--r--src/published/arch-philosophy.txt31
-rw-r--r--src/src-guide-to-switching-i3-to-sway.txt51
2 files changed, 50 insertions, 32 deletions
diff --git a/src/published/arch-philosophy.txt b/src/published/arch-philosophy.txt
index 4bd4bae..ff18521 100644
--- a/src/published/arch-philosophy.txt
+++ b/src/published/arch-philosophy.txt
@@ -2,34 +2,23 @@ Everyone seems to have a post about why they ended up with Arch. This is mine.
I recently made the switch to Arch Linux for my primary desktop and it's been great. Arch very much feels like the end of the line for me --the bottom of the rabbit hole as it were. Once you have a system that does everything you need it to do effortlessly, why bother with anything else? Some of it might be a pain at times, hand partitioning, hand mounting and generating your own fstab files, but it teaches you a lot. It pulls back the curtain so you can see that you are in fact the person behind the curtain, you just didn't realize it.
-Why bother? Control. Simplicity. Stubbornness. The good old DIY ethos, which is born out of the realization that if you don't do things yourself you'll have to accept the mediocrity that capitalism has produced. You never learn; you never grow. That's no way to live.
-
-I used to be a devoted Debian fan. It was a philosophical position. I still agree with the Debian manifesto, such as it is. In practice however I found the community, ahem, wanting. Embarrassing at times. The manifesto should have maybe included some guidelines on empathy, understanding and humanity. So it goes.
-
-I also used to be vegan. Also a philosophical position.
-
-I still believe in both to a certain degree. But now I eat bacon and run Arch.
+<img src="images/2020/desktop042020_uAICE8n.png" id="image-2325" class="picwide caption" />
-Which is not to say the Arch community is any better, just that Arch itself has a few advantages, like easier access to the latest and greatest software via the AUR. This matters if you happen to test software for a living. Or something like a living.
+**[Updated July 2021: Still running Arch. Still happy about it. I did switch back to Openbox instead of i3, but otherwise my setup is unchanged]**
-But there's more to it than that.
-
-I've always known I'd end up with Arch. If you take a strange, peaceful joy in configuring things with plain text files you too will eventually end up with Arch. Or you'll end up fighting everything else you try. My Arch setup is minimalist, just the [i3](https://i3wm.org/) window manager with [i3status](https://i3wm.org/i3status/manpage.html). I open apps with [dmenu](http://tools.suckless.org/dmenu/) and do most of my file system tasks from the terminal using bash (or [Ranger](http://nongnu.org/ranger/) if I want something fancier). Currently my setup uses about 200MB of RAM with no apps open, meaning I have no need to spend more than $400 on a PC, which makes me happy.
-
-<img src="images/2018/arch.jpg" id="image-1211" class="picwide caption" />
+Why bother? Control. Simplicity. Stubbornness. The good old DIY ethos, which is born out of the realization that if you don't do things yourself you'll have to accept the mediocrity that capitalism has produced. You never learn; you never grow. That's no way to live.
-Arch was also liberating for me precisely because it is the end of the line -- there's nothing else to explore. I'm done. I have my stack and I can move on to other things. It's been a long time since that was true.
+I used to be a devoted Debian fan. I still agree with the Debian manifesto, such as it is. In practice however I found myself too often having to futz with things.
-Arch is unquestionably the best linux distro I've used. It has a simple, clean install that doesn't bundle tons of crap and lets you decide what to install. Sure there's Debian minimal too if you're really opposed to Arch (like I was for a while), but then you end up with more out of date software. I've even switched to using Arch on my server. This server in fact. I still use Debian for client sites, but these words are being served from an Arch server. Lately I've been using [Vultr](https://www.vultr.com/?ref=6825229) (affiliate link) precisely because they make it easy to install Arch on a VPS.
+I came to Arch for the AUR, though the truth is these days I don't use it much. Then for a while I [ran Sway](/src/guide-to-switching-i3-to-sway), which was really only practical on Arch. Since then though I went back to X.org. Sorry Wayland, but much as I love Sway, I did not love wrestling with MIDI controller drivers, JACK, and all the other elements of an audio/video workflow in Wayland. It can be done, but it’s more work, and I don’t want to work at getting software to work. I’m too old for that shit. I want to plug in a microphone, open Audacity, and record. If it’s any more complicated than that -- and it was for me in Wayland with the mics I own -- I will find something else. I really don’t care what my software stack is, so long as I can create what I want to create with it.
-On the desktop though Debian's packages are too out of date for my tastes. Yeah, even testing. Okay not Sid. But have you ever managed to keep Sid working through more than one update?
+Wayland was smoother, less graphically glitchy, but meh, whatever. Ninety percent of the time I’m writing in Vim in a Urxvt window. I need smooth scrolling and transitions like I need a hole in my head. I also set up Openbox to behave very much like Sway, so I still have the same shortcuts and honestly, aside from the fact that Tint2 has more icons than Waybar, I can’t tell the difference. Well, that’s not true. Vim works fine with the clipboard again, no need for Neovim.
-My experience with Arch so far is much, much stabler than Sid or testing. And, more important for me, managing your out of repo software is a million times easier in Arch. There's no need to remember or track what was installed with dpkg-buildpackage, what used checkinstall or apt-src or god forbid some horror you re-packaged from an .rpm file. Not that I would do that. Cough.
+My Arch setup these days is minimalist: [Openbox](http://openbox.org/wiki/Main_Page) with [tint2](https://gitlab.com/o9000/tint2). I open apps with [dmenu](http://tools.suckless.org/dmenu/) and do most of my file system tasks from the terminal using bash (or [Ranger](http://nongnu.org/ranger/) if I want something fancier). Currently my setup uses about 200MB of RAM with no apps open. Arch doesn't have quite the software selection of Debian, but it has most of the software you'd ever want. My needs are simple: bash, vim, tmux, mutt, newsboat, mpd, mpv, git, feh, gimp, darktable and dev stuff like python3, postgis, etc. Every distro has this stuff.
-Arch has a decent set of repositories with most of the software you'd ever want all official like and whatnot. Yeah it's tiny compared to Debian, but my needs are simple: i3, bash, vim, tmux, mutt, newsboat, mpd, git, feh, gimp, darktable and dev stuff like python3, postgis, etc. Every distro has this stuff.
+meaning I have no need to spend more than $400 on a laptop.
-Arch's real strength though is how amazingly easy it is to package your own software. Because even Debian's epically oversized repos can't hold everything. The Debian repos pale next to the Arch User Respository (AUR), which has just about every piece of software available for Linux. And it's up-to-date. So up-to-date that half the AUR packages have a -git variant that's pulled straight from the project's git repo. The best part is there are tools to manage and update all these out of repo packages. I strongly suggest you learn to package and install AUR repos by hand, but once you've done that a few times and you know what's happening I suggest installing [yaourt](https://aur.archlinux.org/packages/yaourt/) to simplify managing all those AUR installs.
-I've installed Arch on about a dozen machines at this point. I started with my Macbook Pro, which I've since sold (no need for high end hardware with my setup), but it ran Arch like a champ (what a relief to not need OS X). I also installed Arch on a Dell Chromebook 13 (by far the hardest of the bunch) I used [this guide](https://github.com/Kerryliu/Native-Linux-on-Dell-Chromebook-13/wiki) to get everything set up and then I banged my head against the Arch Wiki beginner page, installing and failing over and over again until I gave up on GPT, went with MBR and Grub. It works, but I have to eject the microSD card I use for extra storage whenever I reboot (I suspect either it's a shortcoming of the legacy firmware patch or maybe I need to edit the fstab file, but I haven't bothered to debug it since it has an easy fix). Getting ALSA working on this machine was a pain, but otherwise everything was fine.
+Arch's real strength though is how amazingly easy it is to package your own software. Because even Debian's epically oversized repos can't hold everything. The Debian repos pale next to the Arch User Respository (AUR), which has just about every piece of software available for Linux. And it's up-to-date. So up-to-date that half the AUR packages have a -git variant that's pulled straight from the project's git repo. The best part is there are tools to manage and update all these out of repo packages. I strongly suggest you learn to package and install AUR repos by hand, but once you've done that a few times and you know what's happening I suggest installing [yay](https://github.com/Jguer/yay) to simplify managing all those AUR installs.
-Currently I use a Lenovo x250 that I picked up off eBay for a couple hundred bucks and upgraded with a bigger hard drive and 1080p screen. It runs Arch like a champ and gives me all I could ever want in a laptop. Okay, maybe more RAM would be nice for my occasional bouts of video editing, but otherwise it's more than enough.
+I've installed Arch on dozens of machines at this point. I started with my Macbook Pro, which I've since sold (no need for high end hardware with my setup), but it ran Arch like a champ (what a relief to not need OS X). Currently I use a Lenovo x270 that I picked up off eBay for $300. I added a larger hard drive, a second hard drive, and 32-gigabytes of RAM. It runs Arch like a champ and gives me all I could ever want in a laptop. Okay, a graphics card would be nice for my occasional bouts of video editing, but otherwise it's more than enough.
diff --git a/src/src-guide-to-switching-i3-to-sway.txt b/src/src-guide-to-switching-i3-to-sway.txt
index 33e7742..20cff23 100644
--- a/src/src-guide-to-switching-i3-to-sway.txt
+++ b/src/src-guide-to-switching-i3-to-sway.txt
@@ -1,3 +1,5 @@
+[*Updated April 2021: I added some solutions I've found to a few of the issues below. And yes, I continue to use Sway.*]
+
I recently made the switch from the [i3 tiling window manager](https://i3wm.org/) to [Sway](https://swaywm.org/), a Wayland-based i3 clone. I still [run Arch Linux on my personal machine](/src/why-i-switched-arch-linux), so all of this is within the context of Arch.
I made the switch for a variety of reasons. There's the practical: Sway/Wayland gives me much better battery life on my laptop. As well as the more philosophical: Sway's lead developer Drew Devault's take on code is similar to mine[^1] (e.g. [avoid traumatic changes](https://drewdevault.com/2019/11/26/Avoid-traumatic-changes.html) or [avoid dependencies](https://drewdevault.com//2020/02/06/Dependencies-and-maintainers.html)), and after reading his blog for a year he's someone whose software I trust.
@@ -24,7 +26,10 @@ I do almost everything in the terminal. I write in Vim, email with mutt, read RS
I tested quite a few Wayland-native terminals and I really like [Alacritty](https://github.com/alacritty/alacritty). Highly recommended. [Kitty](https://github.com/kovidgoyal/kitty) is another option to consider.
-That said, I am sticking with urxvt for now. There are two problems for me with Alacritty. First off Vim doesn't play well with the Wayland clipboard in Alacritty. Second, Ranger will not show image previews in Alacritty. Both things work as I would expect in urxvt. I'd like to find a solution to these issues because I like Alacritty better than urxvt, but so far nothing has made Vim work and that one is a deal breaker for me.
+<span class="strike">That said, I am sticking with urxvt for now. There are two problems for me with Alacritty. First off Vim doesn't play well with the Wayland clipboard in Alacritty. Second, Ranger will not show image previews in Alacritty.</span>
+
+*Update April 2021:* I have never really solved either of these issues, but I switched to Alacritty anyway. I use Neovim instead of Vim, which was a mostly transparent switch and Neovim support the Wayland clipboard. As for previews in Ranger... I forgot about those. They were nice. But I guess I don't miss them that much.
+
##### Launcher
@@ -42,11 +47,13 @@ for_window [app_id="^launcher$"] floating enable, border none, resize set width
These lines together will open a small terminal window in the upper left corner of the screen with a fzf search interface. I type, for example, "dar" and Darktable comes up. I hit return, the terminal window closes, and Darktable launches. It's as simple as dmenu and requires no extra applications (since I was already using fzf in Vim).
+If you don't want to go that route, Bemenu is dmenu-like launcher that runs natively in Wayland.
+
##### Browsers
I mainly use [qutebrower](https://qutebrowser.org/), supplemented by [Vivaldi](https://vivaldi.com/)[^2] for research because having split screen tabs is brilliant for research. I also use [Firefox Developer Edition](https://www.mozilla.org/en-US/firefox/developer/) for any web development work, because the Firefox dev tools are far superior to anything else.
-Qutebrowser and Firefox work great under Wayland. In the case of qutebrowser though you'll need to set a few shell variables to get it to start under Wayland, out of the box it launches with XWayland for some reason. Here's what I added to `.bashrc` to get it to work:
+All three work great under Wayland. In the case of qutebrowser though you'll need to set a few shell variables to get it to start under Wayland, out of the box it launches with XWayland for some reason. Here's what I added to `.bashrc` to get it to work:
~~~bash
export XDG_SESSION_TYPE=wayland
@@ -55,16 +62,14 @@ export GDK_BACKEND=wayland
One thing to bear in mind if you do have a lot of X11 apps still is that with this in your shell you'll need to reset the `GDK_BACKEND` to X11 or those apps won't launch. Instead you'll get an error, `Gtk-WARNING **: cannot open display: :0`. To fix that error you'll need to reset `GDK_BACKEND=x11`, then launch your X11 app.
-There are several ways you can do this, but I prefer to override apps in `~/bin` (which is on my $PATH). So, for example, I have a file named `vivaldi` in `~/bin` that looks like this:
+There are several ways you can do this, but I prefer to override apps in `~/bin` (which is on my $PATH). So, for example, I have a file named `xkdenlive` in `~/bin` that looks like this:
~~~bash
#! /bin/sh
-GDK_BACKEND=x11 vivaldi-stable
+GDK_BACKEND=x11 kdenlive
~~~
-Alternately you could just create a bash alias like `alias vivaldi-stable="GDK_BACKEND=x11 vivaldi-stable"`, but I prefer my `~/bin` method since I override a bunch of other apps too for other reasons and this way everything is in one spot.
-
-Note that for me this is easier, because the only apps I'm using that need X11 are Vivaldi and Slack. If you have a lot of X11 apps, you're probably better off making qutebrowser the special case by launching it like this:
+Note that for me this is easier, because the only apps I'm using that need X11 are Kdenlive and Slack. If you have a lot of X11 apps, you're probably better off making qutebrowser the special case by launching it like this:
~~~bash
GDK_BACKEND=wayland qutebrowser
@@ -111,13 +116,37 @@ bindsym --locked XF86MonBrightnessDown exec --no-startup-id light -U 10
There have been surprisingly few of these, save the Vim and Ranger issues mentioned above.
-I haven't found a working replacement for xcape. The only thing I used xcape for was to make my Cap Lock key dual-function: press generates Esc, hold generates Control. So far I have not found a way to do this in Wayland. There is ostensibly [caps2esc](https://gitlab.com/interception/linux/plugins/caps2esc), but it's poorly documented and all I've been able to reliably do with it is crash Wayland.
+<span class="stike">I haven't found a working replacement for xcape. The only thing I used xcape for was to make my Cap Lock key dual-function: press generates Esc, hold generates Control. So far I have not found a way to do this in Wayland. There is ostensibly [caps2esc](https://gitlab.com/interception/linux/plugins/caps2esc), but it's poorly documented and all I've been able to reliably do with it is crash Wayland.</span>
+
+*Update April 2021*: I managed to get caps2esc working. First you need to install it, for Arch that's something like:
+
+~~~bash
+yay -S interception-caps2esc
+~~~
+
+Once it's installed you need to create the config file. I keep mine at `/etc/interception/udevmon.d/caps2esc.yaml`. Open that up and paste in these lines:
+
+~~~yaml
+- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
+ DEVICE:
+ EVENTS:
+ EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
+~~~
+
+Then you need to start and enable the `udevmon` service unit, which is what runs the caps2esc code:
+
+~~~bash
+sudo systemctl start udevmon
+sudo systemctl enable udevmon
+~~~
+
+The last thing to do is restart. Once you've rebooted you should be able to hold down caps_lock and have it behave like control, but a quick press with give you escape instead. This is incredibly useful if you're a Vim user.
-I miss xcape. I've reverted to `inoremap jj <Esc>` for vim, but if you have a solution, please do let me know in the comments.
+The only other problems I've run into is the limited range of screen recording options -- there's wf-recorder and that's about it. It works well enough though for what I do.
-I've been using Waybar as a status bar and it works well enough. To be honest I haven't put in the time to get it exactly how I want it, but it's close enough. My one gripe is that Slack doesn't show up in the icon tray, but I hate Slack and only use it because of work, so my motivation to debug that issue is very low.
+I've been using Sway exclusively for a year and half now and I have no reason or desire to ever go back to anything else. The rest of my family isn't fond of the tiling aspect of Sway so I do still run a couple of laptops with Openbox. I'd love to see a Wayland Openbox clone that's useable. I've played with [labwc](https://github.com/johanmalm/labwc), which is promising, but lacks a tint2-style launcher, which is really what I need (i.e., a system tray with launcher buttons, which Waybar does not have). Anyway, I am keeping an eye on labwc because it looks like a good project.
-Surprisingly, those are the only problems I can think of right now. I've been using Sway exclusively for almost two months now and I have no reason or desire to ever go back.
+That's how I did it. But I am just one person. If you run into snags, feel free to drop a comment below and I'll see if I can help.
### Helpful pages: