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

Mastodon Stories for systemd v262

On September 22 we released systemd v262 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 #systemd262 hash tag. In case you aren…

via Pid Eins October 15, 2026

"No way to prevent this" say users of only language where this regularly happens

In the hours following the release of CVE-2026-92392 for the project curl, site reliability workers and systems administrators scrambled to desperately rebuild and patch all their systems to fix a use-after-free in HTTP/2 upload retries whe…

via Xe Iaso's blog October 14, 2026

Why is Hacker News like that?

Hacker News (aka HN) is a link aggregator where “hackers”1 gather to discuss technology, politics, and anything which “good hackers would find interesting”. HN is a means by which its host, prominent startup incubator Y Combinator, projects soft…

via Drew DeVault's blog September 23, 2026

Notes on Arrow's Impossibility Theorem

Plurality voting is still bad, and finding a better mechanism is still hard.

via Ξ September 7, 2026

Generated by openring