feat(menu): printer setup — system-config-printer in the System submenu
A `nomarchy-menu printers` entry opens system-config-printer (the CUPS admin GUI), mirroring the bluetooth/blueman pattern: the printing service ships the package via environment.systemPackages and the menu execs it, self-gated on the system-config-printer binary so the entry appears only when nomarchy.services.printing is on. No direct keybind (rare one-off). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -250,6 +250,14 @@ ${themeRows}
|
||||
# blueman-manager GUI (services.blueman.enable, system-side).
|
||||
exec blueman-manager ;;
|
||||
|
||||
printers)
|
||||
# system-config-printer GUI (the CUPS admin app), installed by
|
||||
# nomarchy.services.printing. Self-gated in the System menu; guard
|
||||
# here too in case it's invoked directly.
|
||||
command -v system-config-printer >/dev/null 2>&1 \
|
||||
&& exec system-config-printer
|
||||
notify-send "Printers" "Not available (nomarchy.services.printing off?)."; exit 0 ;;
|
||||
|
||||
audio)
|
||||
# PipeWire (pulse) sink/source switcher via rofi-pulse-select. Self-
|
||||
# gated in the System menu on the pulse socket; guarded here too.
|
||||
@@ -360,6 +368,7 @@ ${themeRows}
|
||||
row "Bluetooth" bluetooth
|
||||
[ -e "''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/pulse/native" ] \
|
||||
&& row "Audio" audio-volume-high
|
||||
command -v system-config-printer >/dev/null 2>&1 && row "Printers" printer
|
||||
row "Do Not Disturb" notification-disabled
|
||||
systemctl --user cat hyprsunset.service >/dev/null 2>&1 \
|
||||
&& row "Night light" weather-clear-night
|
||||
@@ -374,6 +383,7 @@ ${themeRows}
|
||||
*Network*) exec "$0" network ;;
|
||||
*Bluetooth*) exec "$0" bluetooth ;;
|
||||
*Audio*) exec "$0" audio ;;
|
||||
*Printers*) exec "$0" printers ;;
|
||||
*"Do Not Disturb"*) exec "$0" dnd ;;
|
||||
*"Night light"*) exec "$0" nightlight ;;
|
||||
*Snapshots*) exec "$0" snapshot ;;
|
||||
@@ -402,7 +412,7 @@ ${themeRows}
|
||||
esac ;;
|
||||
|
||||
*)
|
||||
echo "usage: nomarchy-menu [tools|system|power|power-profile|theme|clipboard|calc|files|emoji|web|network|bluetooth|audio|capture|keybinds|ask|dnd|nightlight|snapshot]" >&2
|
||||
echo "usage: nomarchy-menu [tools|system|power|power-profile|theme|clipboard|calc|files|emoji|web|network|bluetooth|audio|printers|capture|keybinds|ask|dnd|nightlight|snapshot]" >&2
|
||||
exit 64 ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user