Capture mesh-catalog at feat/r4g (2246ccc4) with the templates its manifests name and its predefined.json, and lay the copy out as a repository's root
The catalogue's manifests moved their content into template files and fall back to predefined keys, so a copy of module.json alone no longer passes the catalogue's own check; the bus's Dockerfile is gone from the catalogue.
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# dmenu, as this node's launcher answers it (module rofi, novox/hq ADR 0208). The node-launcher
|
||||
# seat's dmenu-compatible command: choices on standard input, the chosen one on standard output,
|
||||
# exit 1 when nothing was chosen. A script calls `dmenu` and works whichever module holds the seat.
|
||||
#
|
||||
# rofi understands dmenu's -p, -l and -i. dmenu's look options (-fn, -nb, -nf, -sb, -sf, -m, -w)
|
||||
# take a value rofi would misread, so they are dropped with it; -b and -f are dropped alone. The
|
||||
# look is the launcher's theme.
|
||||
set -u
|
||||
n=$#
|
||||
while [ "$n" -gt 0 ]; do
|
||||
arg=$1
|
||||
shift
|
||||
n=$((n - 1))
|
||||
case $arg in
|
||||
-fn | -nb | -nf | -sb | -sf | -m | -w)
|
||||
if [ "$n" -gt 0 ]; then
|
||||
shift
|
||||
n=$((n - 1))
|
||||
fi
|
||||
;;
|
||||
-b | -f) ;;
|
||||
*) set -- "$@" "$arg" ;;
|
||||
esac
|
||||
done
|
||||
exec rofi -dmenu "$@"
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
# rofi-launch drun|run|window|filebrowser|sudo (module rofi, novox/hq ADR 0208): what the launcher's
|
||||
# key bindings run.
|
||||
#
|
||||
# After a resume the keyboard grab can fail for a moment, and rofi then exits at once: a key press
|
||||
# that opens nothing. So a failure within half a second is tried again, up to five times. A person
|
||||
# closing the menu takes longer than that, and is never shown it a second time.
|
||||
set -u
|
||||
mode=${1:-drun}
|
||||
|
||||
now_ms() { date +%s%3N; }
|
||||
|
||||
attempt() {
|
||||
i=0
|
||||
while [ "$i" -lt 5 ]; do
|
||||
start=$(now_ms)
|
||||
"$@" && return 0
|
||||
[ $(($(now_ms) - start)) -ge 500 ] && return 1
|
||||
i=$((i + 1))
|
||||
sleep 0.1
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
case $mode in
|
||||
drun | run | window | filebrowser)
|
||||
attempt rofi -show "$mode"
|
||||
;;
|
||||
sudo)
|
||||
# A command line, run with sudo in the node's terminal.
|
||||
command=$(attempt rofi -dmenu -p sudo </dev/null) || exit 0
|
||||
[ -n "$command" ] || exit 0
|
||||
exec rofi-sensible-terminal -e sudo sh -c "$command"
|
||||
;;
|
||||
*)
|
||||
echo "rofi-launch: no mode $mode (drun, run, window, filebrowser, sudo)" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# rofi-powermenu (module rofi, novox/hq ADR 0208): lock, suspend, log out, reboot, shut down.
|
||||
#
|
||||
# It belongs to the session, and it is the launcher's: its whole face is rofi's. Every action is a
|
||||
# verb of logind or the service manager, so nothing here names a window manager or a locker:
|
||||
# - lock asks logind to lock the session, which the holder of node-lock-screen answers;
|
||||
# - log out ends this login session, whichever window manager runs in it.
|
||||
# Adopted from the workstations' power menu of 2026-10-04 (after adi1090x's powermenu type-2).
|
||||
set -u
|
||||
|
||||
theme=mesh-powermenu
|
||||
uptime="$(uptime -p | sed -e 's/^up //')"
|
||||
|
||||
shutdown=''
|
||||
reboot=''
|
||||
lock=''
|
||||
suspend=''
|
||||
logout=''
|
||||
yes=''
|
||||
no=''
|
||||
|
||||
menu() {
|
||||
rofi -dmenu -p "Uptime: $uptime" -mesg "Uptime: $uptime" -theme "$theme"
|
||||
}
|
||||
|
||||
confirm() {
|
||||
printf '%s\n%s\n' "$yes" "$no" | rofi -dmenu -p 'Confirmation' -mesg 'Are you sure?' -theme "$theme" \
|
||||
-theme-str 'window {location: center; anchor: center; fullscreen: false; width: 350px;}' \
|
||||
-theme-str 'mainbox {children: [ "message", "listview" ];}' \
|
||||
-theme-str 'listview {columns: 2; lines: 1;}' \
|
||||
-theme-str 'element-text {horizontal-align: 0.5;}' \
|
||||
-theme-str 'textbox {horizontal-align: 0.5;}'
|
||||
}
|
||||
|
||||
session() {
|
||||
# The login session this menu runs in: the session's own id, else logind's answer for this process.
|
||||
if [ -n "${XDG_SESSION_ID:-}" ]; then
|
||||
echo "$XDG_SESSION_ID"
|
||||
else
|
||||
loginctl show-session auto -p Id --value 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
confirmed() { [ "$(confirm)" = "$yes" ]; }
|
||||
|
||||
chosen="$(printf '%s\n' "$lock" "$suspend" "$logout" "$reboot" "$shutdown" | menu)" || exit 0
|
||||
case $chosen in
|
||||
"$lock") loginctl lock-session "$(session)" ;;
|
||||
"$suspend") confirmed && systemctl suspend ;;
|
||||
"$logout") confirmed && loginctl terminate-session "$(session)" ;;
|
||||
"$reboot") confirmed && systemctl reboot ;;
|
||||
"$shutdown") confirmed && systemctl poweroff ;;
|
||||
esac
|
||||
exit 0
|
||||
Reference in New Issue
Block a user