Simple Launcher for Sway

SergeantBiggs

archlinuxlinuxtechnologysway

134 Words

2022-10-02 13:36 +0000


I wanted to share something that has been in my i3/sway config for quite a while. I don’t know where I got it from exactly, but I’ve found it quite useful over the years. It uses binding modes to create a simple program launcher.

Binding modes deactivate all normal bindings when switching to them. Only the bindings defined in the binding mode are active.

set $mode_launcher "Start: [f]irefox [c]hat [k]eepassxc [q]uit"

mode $mode_launcher {
    bindsym f exec firefox
    bindsym c exec ~/.config/sway/scripts/social.sh
    bindsym k exec keepassxc

    bindsym Return mode "default"
    bindsym Escape mode "default"
    bindsym $mod+o mode "default"
    bindsym q mode "default"
}

bindsym $mod+o mode $mode_launcher

After going into the mode with $mod+0, we can start the applications with the relevant keys. The mode can be exited using Return, Esc, $mod+o or q.

Articles from blogs I read

Claude Code won April Fools Day this year

They gave people a heckin tamagochi, what's not to like?

via Xe Iaso's blog April 1, 2026

tar: a slop-free alternative to rsync

So apparently rsync is slop now. When I heard, I wanted to drop a quick note on my blog to give an alternative: tar. It doesn’t do everything that rsync does, in particular identifying and skipping up-to-date files, but tar + ssh can definitely accomodate th…

via Drew DeVault's blog March 28, 2026

Mastodon Stories for systemd v260

On March 17 we released systemd v260 into the wild. In the weeks leading up to that release (and since then) I have posted a series of serieses of posts to Mastodon about key new features in this release, under the #systemd260 hash tag. In case you aren't …

via Pid Eins March 27, 2026

What happens if we represent unix time as floats?

When evaluating the performance of some software component, I want to get high precision. But when I talk about millions of years in the future, I don't care about the exact second.

via Ξ January 16, 2026

Generated by openring