An application launcher for Sway
I wanted to have a simple application launcher in the style of
Rofi that is native to the Wayland compositor and is able to run commands with full auto-completion. For this purpose, one can combine the
foot terminal and the
fish shell. In order to make it a proper launcher it needs to open in the foreground, and close after a single command, without closing any forked process. It can be achieved as follows.
In your Sway configuration file, you can create a key binding that starts a floating foot terminal with a launcher version of the shell:
bindsym $mod+d exec foot --app-id floatfoot fish \ -C 'source ~/.config/fish/launcher.fish' for_window [app_id="floatfoot"] floating enable
Next, the aforementioned fish configuration file should contain:
# Append ampersand to command function append_ampersand if test (string sub --start=-1 (commandline)) != '&' commandline -i '&' end commandline -f execute end # Call function on `enter` strike bind \r append_ampersand bind \n append_ampersand # close after command finished function close_window --on-event fish_postexec disown exit end
The resulting application looks like this
Rain on the 14-th of July
Here is a movie on the evolution of the rain event that caused the floods on the 14th of July 2021. The movie shows the radar data as processed by buienradar.
Fake dynamic menu
.html file. The page-generation magic can be viewed on the website’s darcs hub. Note that math rendering is still done dynamically by Katex.
After a staging period on my workstation, I decided it is best to use more efficient webserver hardware. Therfore, I installed a mini pc at some out-of-sight space in the attic.
$ neofetch _,met$$$$$gg. antoon@webserver ,g$$$$$$$$$$$$$$$P. ---------------- ,g$$P" """Y$$.". OS: Debian GNU/Linux 10 (buster) x86_64 ,$$P' `$$$. Kernel: 4.19.0-17-amd64 ',$$P ,ggs. `$$b: Uptime: 2 days, 5 hours, 15 mins `d$$' ,$P"' . $$$ Packages: 769 (dpkg) $$P d$' , $$P Shell: bash 5.0.3 $$: $$. - ,d$$' Terminal: /dev/pts/0 $$; Y$b._ _,d$P' CPU: Intel Celeron J1900 (4) @ 2.415GHz Y$$. `.`"Y$$$$P"' GPU: Intel Atom Processor `$$b "-.__ Memory: 237MiB / 7869MiB `Y$$ `Y$$. `$$b. `Y$$b. `"Y$b._ `"""
Using a tiling window manager
Rcently I have switched from Gnome to using the i3 window manager (WM). The main attraction for using such a tiling window manager is the
tiling part. Instead of positioning the windows for the various applications yourself by dragging them arround, i3 tiles them for you, always using your entire screen and never having overlapping windows. The last feature prevents having to look for a burried app, and motivates a much more structured workflow.
The main disadvantage is that you have invest getting started with it. The userinterface relies on using keyboard shortcuts that you will need to get from a cheat sheat. Further, you may not know how to access various system functions that you expect to be able to find. So at first, you feel like a (proverbial) grandpa that needs to learn how to open firefox. After this period, you will want to configure your WM, which can take a lot of time. Altough there are distro’s that ship with a preconfigured i3 environment (e.g. Endeavour os). Give it a try! On a Debian-based system it is as simple as,
$ sudo apt install i3