Files
dualfroz 1d50e864f3 merge: import shortcut-manager sources with history
git-subtree-dir: shortcut-manager
git-subtree-mainline: d4134ccb0d
git-subtree-split: 32dec59d45
2026-08-05 19:46:37 +02:00

24 lines
928 B
Python

"""
Quick-fill command presets for the shortcut manager's "new shortcut" dialog.
Only offered when the underlying binary is actually installed, so the list
never suggests a dead command. Purely a convenience for the command entry -
any preset is still just a plain command string once saved.
"""
import shutil
_CANDIDATES = [
("Terminal", "gnome-terminal", "gnome-terminal"),
("File manager", "nemo", "nemo"),
("Lock screen", "cinnamon-screensaver-command", "cinnamon-screensaver-command --lock"),
("Screenshot - area", "flameshot", "flameshot gui"),
("Screenshot - full screen", "gnome-screenshot", "gnome-screenshot"),
("Web browser", "xdg-open", "xdg-open http://"),
("Mute volume toggle", "amixer", "amixer -q set Master toggle"),
("Text editor", "gedit", "gedit"),
]
def availablePresets():
return [(label, command) for label, binary, command in _CANDIDATES if shutil.which(binary)]