Floating "Calculator" Window in Sway

For a while now, I’ve wanted a quick way to do arithmetic on my Linux laptop (which runs Sway), similar to Spotlight on OS X.

If I’m already in a terminal, it’s easy. But sometimes I’m focused on some other app, and I want to make a quick calculation.

So, in .config/sway/config.d/60-bindings-interactive-python.conf, I have:

for_window [app_id="terminal-floating"] floating enable
bindsym $mod+Semicolon exec '$term --app-id=terminal-floating python3 -q'

Alternatives


Previous Post: Terminal Bell as Notification Mechanism