nix/module/desktop/sway/module/Launcher.nix

18 lines
620 B
Nix
Raw Normal View History

2024-04-06 03:03:58 +03:00
{ style, key, ... }: let
fontName = style.font.serif.name;
2024-06-22 23:34:03 +03:00
fontSize = toString style.font.size.desktop;
2024-04-06 03:03:58 +03:00
accent = style.color.accent;
bg = style.color.bg.dark;
fg = style.color.fg.light;
in {
text = ''
# Application launcher.
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
2024-05-02 04:47:21 +03:00
set $menu _dmenu_path_wrapped | wmenu -b -p 'Run:' -i -f "${fontName} ${fontSize}" -M ${bg}D9 -S ${bg}D9 -N ${bg}D9 -m ${accent} -s ${accent} -n ${fg} | xargs swaymsg exec --
2024-04-06 03:03:58 +03:00
bindsym $mod+${key.action.launch} exec $menu
'';
}