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

What's up with FUTO?

Some time ago, I noticed some new organization called FUTO popping up here and there. I’m always interested in seeing new organizations that fund open source popping up, and seeing as they claim several notable projects on their roster, I explored their webs…

via Drew DeVault's blog October 22, 2025

First look at the DGX Spark

A local supercomputer between the size of a Mac mini and a Mac mini.

via Xe Iaso's blog October 14, 2025

How to Sandbox a Terminal

I often pull code from remote repositories and execute it for testing. This is an area where sandboxing would be extremely beneficial.

via Ξ October 11, 2025

ASG! 2025 CfP Closes Tomorrow!

The All Systems Go! 2025 Call for Participation Closes Tomorrow! The Call for Participation (CFP) for All Systems Go! 2025 will close tomorrow, on 13th of June! We’d like to invite you to submit your proposals for consideration to the CFP submission site quick…

via Pid Eins June 12, 2025

Generated by openring