Merge pull request 'merge/all-three-fixes' (#11) from merge/all-three-fixes into main
Reviewed-on: #11
This commit is contained in:
parent
aa6b271343
commit
5b1b915e14
8 changed files with 75 additions and 107 deletions
18
build.sh
18
build.sh
|
|
@ -969,8 +969,6 @@ configure_live_operator_session() {
|
|||
"${MOUNT_POINT}/usr/local/bin/clawdie-bootstrap-launch.sh"
|
||||
install -m 0755 "${LIVE_SESSION_DIR}/clawdie-noblank-guard.sh" \
|
||||
"${MOUNT_POINT}/usr/local/bin/clawdie-noblank-guard.sh"
|
||||
install -m 0755 "${LIVE_SESSION_DIR}/clawdie-xfce-visuals-guard.sh" \
|
||||
"${MOUNT_POINT}/usr/local/bin/clawdie-xfce-visuals-guard.sh"
|
||||
install -m 0755 "${LIVE_SESSION_DIR}/hw-report" \
|
||||
"${MOUNT_POINT}/usr/local/bin/hw-report"
|
||||
|
||||
|
|
@ -1029,8 +1027,6 @@ EOF
|
|||
"${MOUNT_POINT}/usr/local/etc/xdg/autostart/clawdie-bootstrap.desktop"
|
||||
install -m 0644 "${LIVE_SESSION_DIR}/autostart/clawdie-noblank-guard.desktop" \
|
||||
"${MOUNT_POINT}/usr/local/etc/xdg/autostart/clawdie-noblank-guard.desktop"
|
||||
install -m 0644 "${LIVE_SESSION_DIR}/autostart/clawdie-xfce-visuals-guard.desktop" \
|
||||
"${MOUNT_POINT}/usr/local/etc/xdg/autostart/clawdie-xfce-visuals-guard.desktop"
|
||||
mkdir -p "${MOUNT_POINT}/usr/local/etc/X11/xorg.conf.d"
|
||||
install -m 0644 "${LIVE_SESSION_DIR}/xorg.conf.d/30-keyboard.conf" \
|
||||
"${MOUNT_POINT}/usr/local/etc/X11/xorg.conf.d/30-keyboard.conf"
|
||||
|
|
@ -1358,8 +1354,8 @@ EOF
|
|||
fi
|
||||
# Keep a real hostname so startx/xauth do not derive invalid display names
|
||||
# such as bare :0 or /unix:0 on the installer-derived "Amnesiac" profile.
|
||||
set_config_line "${MOUNT_POINT}/etc/rc.conf" 'hostname="clawdie-live"'
|
||||
if ! grep -Eq '^hostname="clawdie-live"' "${MOUNT_POINT}/etc/rc.conf"; then
|
||||
set_config_line "${MOUNT_POINT}/etc/rc.conf" 'hostname="usb.clawdie.home.arpa"'
|
||||
if ! grep -Eq '^hostname="usb.clawdie.home.arpa"' "${MOUNT_POINT}/etc/rc.conf"; then
|
||||
echo "ERROR: live USB hostname is not configured in /etc/rc.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1405,12 +1401,11 @@ EOF
|
|||
# hidbus / iichid — HID-over-I²C bridge for modern touchpads / keyboards.
|
||||
# hms / hmt / hkbd — HID mouse / multitouch / keyboard class drivers.
|
||||
# acpi_video — backlight control sysctls (hw.acpi.video.lcd0.brightness).
|
||||
# acpi_asus / acpi_asus_wmi — ASUS-laptop fn-keys, hotkeys, fan control. No-op on non-ASUS hardware.
|
||||
append_rc_list_values "${MOUNT_POINT}/etc/rc.conf" kld_list \
|
||||
linux linux64 zfs \
|
||||
cuse \
|
||||
hidbus iichid hms hmt hkbd \
|
||||
acpi_video acpi_asus acpi_asus_wmi
|
||||
acpi_video
|
||||
|
||||
mkdir -p "${MOUNT_POINT}/etc/ssh/sshd_config.d"
|
||||
install -m 0644 "${LIVE_SESSION_DIR}/sshd-live.conf" \
|
||||
|
|
@ -1546,7 +1541,7 @@ EOF
|
|||
mkdir -p "${MOUNT_POINT}/usr/local/etc/xdg/xfce4/xfconf/xfce-perchannel-xml"
|
||||
cp "${PANEL_SKEL}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml" \
|
||||
"${MOUNT_POINT}/usr/local/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"
|
||||
for _xfconf_xml in xsettings.xml xfwm4.xml xfce4-desktop.xml xfce4-power-manager.xml; do
|
||||
for _xfconf_xml in xsettings.xml xfwm4.xml xfce4-desktop.xml xfce4-power-manager.xml displays.xml; do
|
||||
if [ -f "${PANEL_SKEL}/.config/xfce4/xfconf/xfce-perchannel-xml/${_xfconf_xml}" ]; then
|
||||
cp "${PANEL_SKEL}/.config/xfce4/xfconf/xfce-perchannel-xml/${_xfconf_xml}" \
|
||||
"${MOUNT_POINT}/usr/local/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/${_xfconf_xml}"
|
||||
|
|
@ -1589,9 +1584,14 @@ EOF
|
|||
echo " Installing brand icons..."
|
||||
mkdir -p \
|
||||
"${MOUNT_POINT}/usr/local/share/clawdie-iso/icons" \
|
||||
"${MOUNT_POINT}/usr/local/share/icons/hicolor/48x48/apps" \
|
||||
"${MOUNT_POINT}/usr/local/share/icons/hicolor/64x64/apps" \
|
||||
"${MOUNT_POINT}/usr/local/share/icons/hicolor/scalable/apps"
|
||||
cp "${_icons_dir}"/* "${MOUNT_POINT}/usr/local/share/clawdie-iso/icons/" 2>/dev/null || true
|
||||
if [ -f "${_icons_dir}/clawdie-start-48.png" ]; then
|
||||
install -m 0644 "${_icons_dir}/clawdie-start-48.png" \
|
||||
"${MOUNT_POINT}/usr/local/share/icons/hicolor/48x48/apps/clawdie-start.png"
|
||||
fi
|
||||
if [ -f "${_icons_dir}/clawdie-start.png" ]; then
|
||||
install -m 0644 "${_icons_dir}/clawdie-start.png" \
|
||||
"${MOUNT_POINT}/usr/local/share/icons/hicolor/64x64/apps/clawdie-start.png"
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Clawdie XFCE Visual Guard
|
||||
Comment=Re-apply Clawdie live USB theme, icon, and wallpaper settings
|
||||
Exec=/usr/local/bin/clawdie-xfce-visuals-guard.sh
|
||||
OnlyShowIn=XFCE;
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Terminal=false
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Best-effort live-session visual guard for XFCE.
|
||||
#
|
||||
# XFCE may create monitor-specific desktop keys only after xfdesktop starts, and
|
||||
# some panel plugins are stricter about themed icon names than absolute paths.
|
||||
# Re-assert the operator USB visual contract after login without failing the
|
||||
# session if a component is missing.
|
||||
|
||||
LOG="${HOME}/.clawdie-xfce-visuals-guard.log"
|
||||
WALLPAPER="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"
|
||||
START_ICON="clawdie-start"
|
||||
|
||||
log() {
|
||||
printf '%s %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$*" >>"$LOG" 2>/dev/null || true
|
||||
}
|
||||
|
||||
set_xfconf() {
|
||||
_channel="$1"
|
||||
_property="$2"
|
||||
_type="$3"
|
||||
_value="$4"
|
||||
|
||||
command -v xfconf-query >/dev/null 2>&1 || return 0
|
||||
xfconf-query -c "$_channel" -p "$_property" -s "$_value" >/dev/null 2>&1 || \
|
||||
xfconf-query -c "$_channel" -p "$_property" -n -t "$_type" -s "$_value" >/dev/null 2>&1 || true
|
||||
}
|
||||
|
||||
apply_theme() {
|
||||
set_xfconf xsettings /Net/ThemeName string Greybird
|
||||
set_xfconf xsettings /Net/IconThemeName string Papirus
|
||||
set_xfconf xsettings /Net/CursorTheme string DMZ-White
|
||||
set_xfconf xsettings /Net/CursorSize int 24
|
||||
set_xfconf xsettings /Gtk/FontName string "Noto Sans 11"
|
||||
set_xfconf xsettings /Gtk/MonospaceFontName string "Hack 11"
|
||||
}
|
||||
|
||||
apply_panel() {
|
||||
set_xfconf xfce4-panel /plugins/plugin-1/button-icon string "$START_ICON"
|
||||
set_xfconf xfce4-panel /plugins/plugin-1/show-button-icon bool true
|
||||
set_xfconf xfce4-panel /plugins/plugin-1/show-button-title bool true
|
||||
set_xfconf xfce4-panel /panels/panel-1/size uint 40
|
||||
set_xfconf xfce4-panel /panels/panel-1/icon-size uint 2
|
||||
set_xfconf xfce4-panel /plugins/plugin-8/square-icons bool true
|
||||
}
|
||||
|
||||
apply_wallpaper() {
|
||||
[ -f "$WALLPAPER" ] || {
|
||||
log "wallpaper missing: $WALLPAPER"
|
||||
return 0
|
||||
}
|
||||
command -v xfconf-query >/dev/null 2>&1 || return 0
|
||||
|
||||
_bases="$(xfconf-query -c xfce4-desktop -l 2>/dev/null | awk '/\/last-image$/ { sub(/\/last-image$/, ""); print }')"
|
||||
if [ -z "$_bases" ]; then
|
||||
_bases='/backdrop/screen0/monitor0/workspace0
|
||||
/backdrop/screen0/monitorDefault/workspace0'
|
||||
fi
|
||||
|
||||
printf '%s\n' "$_bases" | while IFS= read -r _base; do
|
||||
[ -n "$_base" ] || continue
|
||||
set_xfconf xfce4-desktop "${_base}/last-image" string "$WALLPAPER"
|
||||
set_xfconf xfce4-desktop "${_base}/image-path" string "$WALLPAPER"
|
||||
set_xfconf xfce4-desktop "${_base}/image-style" int 5
|
||||
set_xfconf xfce4-desktop "${_base}/image-show" bool true
|
||||
set_xfconf xfce4-desktop "${_base}/color-style" int 0
|
||||
done
|
||||
|
||||
if command -v xfdesktop >/dev/null 2>&1; then
|
||||
xfdesktop --reload >/dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
run_once() {
|
||||
log "applying XFCE visual guard"
|
||||
apply_theme
|
||||
apply_panel
|
||||
apply_wallpaper
|
||||
}
|
||||
|
||||
# Run more than once because xfdesktop/panel may create monitor/plugin state
|
||||
# after XDG autostart begins.
|
||||
sleep 3
|
||||
run_once
|
||||
sleep 7
|
||||
run_once
|
||||
sleep 15
|
||||
run_once
|
||||
|
|
@ -245,7 +245,6 @@ run_shell_if_present usbhid-dump usbhid-dump-version "usbhid-dump --help 2>&1 |
|
|||
|
||||
run_if_present cat clawdie-live-gpu-log /var/log/clawdie-live-gpu.log
|
||||
run_if_present cat clawdie-noblank-guard-log /home/clawdie/.clawdie-noblank-guard.log
|
||||
run_if_present cat clawdie-xfce-visuals-guard-log /home/clawdie/.clawdie-xfce-visuals-guard.log
|
||||
run_if_present cat clawdie-touchpad-guard-log /home/clawdie/.clawdie-touchpad-guard.log
|
||||
run_if_present cat sndstat /dev/sndstat
|
||||
run_if_present mixer mixer-s -s
|
||||
|
|
|
|||
BIN
live/operator-session/icons/clawdie-start-48.png
Normal file
BIN
live/operator-session/icons/clawdie-start-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.1" encoding="UTF-8"?>
|
||||
|
||||
<channel name="displays" version="1.0">
|
||||
<property name="ActiveProfile" type="string" value="Default"/>
|
||||
<property name="Notify" type="int" value="1"/>
|
||||
<property name="AutoEnableProfiles" type="int" value="3"/>
|
||||
<property name="Default" type="empty">
|
||||
<property name="HDMI-A-0" type="string" value="Philips Consumer Electronics Company 58"">
|
||||
<property name="Active" type="bool" value="true"/>
|
||||
<property name="EDID" type="string" value="eb3a88b3e924dff0eef60b51ede5d142f7854918"/>
|
||||
<property name="DuplicateEDID" type="bool" value="false"/>
|
||||
<property name="Resolution" type="string" value="1920x1080"/>
|
||||
<property name="RefreshRate" type="double" value="60"/>
|
||||
<property name="ModeFlags" type="uint64" value="5"/>
|
||||
<property name="Rotation" type="int" value="270"/>
|
||||
<property name="Reflection" type="string" value="0"/>
|
||||
<property name="Primary" type="bool" value="false"/>
|
||||
<property name="Scale" type="double" value="1"/>
|
||||
<property name="Position" type="empty">
|
||||
<property name="X" type="int" value="0"/>
|
||||
<property name="Y" type="int" value="0"/>
|
||||
</property>
|
||||
</property>
|
||||
<property name="eDP" type="string" value="Laptop">
|
||||
<property name="Active" type="bool" value="true"/>
|
||||
<property name="EDID" type="string" value="094c68e1cb71ed69083c70a30d0d951ed88f1a73"/>
|
||||
<property name="DuplicateEDID" type="bool" value="false"/>
|
||||
<property name="Resolution" type="string" value="1920x1080"/>
|
||||
<property name="RefreshRate" type="double" value="60.003425830763959"/>
|
||||
<property name="ModeFlags" type="uint64" value="9"/>
|
||||
<property name="Rotation" type="int" value="0"/>
|
||||
<property name="Reflection" type="string" value="0"/>
|
||||
<property name="Primary" type="bool" value="true"/>
|
||||
<property name="Scale" type="double" value="1"/>
|
||||
<property name="Position" type="empty">
|
||||
<property name="X" type="int" value="1080"/>
|
||||
<property name="Y" type="int" value="840"/>
|
||||
</property>
|
||||
</property>
|
||||
</property>
|
||||
</channel>
|
||||
|
|
@ -7,12 +7,34 @@
|
|||
<property name="image-style" type="int" value="5"/>
|
||||
<property name="last-image" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
<property name="image-show" type="bool" value="true"/>
|
||||
<property name="image-path" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
</property>
|
||||
<property name="workspace1" type="empty">
|
||||
<property name="color-style" type="int" value="0"/>
|
||||
<property name="image-style" type="int" value="5"/>
|
||||
<property name="last-image" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
<property name="image-show" type="bool" value="true"/>
|
||||
<property name="image-path" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
</property>
|
||||
</property>
|
||||
<property name="screen0" type="empty">
|
||||
<property name="monitoreDP" type="empty">
|
||||
<property name="workspace0" type="empty">
|
||||
<property name="color-style" type="int" value="0"/>
|
||||
<property name="image-path" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
<property name="image-show" type="bool" value="true"/>
|
||||
<property name="image-style" type="int" value="5"/>
|
||||
<property name="last-image" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
</property>
|
||||
</property>
|
||||
<property name="monitorHDMI-A-0" type="empty">
|
||||
<property name="workspace0" type="empty">
|
||||
<property name="color-style" type="int" value="0"/>
|
||||
<property name="image-path" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
<property name="image-show" type="bool" value="true"/>
|
||||
<property name="image-style" type="int" value="5"/>
|
||||
<property name="last-image" type="string" value="/usr/local/share/clawdie-iso/wallpapers/clawdie-operator-bg.png"/>
|
||||
</property>
|
||||
</property>
|
||||
</property>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
<value type="int" value="10"/>
|
||||
<value type="int" value="12"/>
|
||||
</property>
|
||||
<property name="output-name" type="string" value="eDP"/>
|
||||
</property>
|
||||
</property>
|
||||
<property name="plugins" type="empty">
|
||||
|
|
@ -93,13 +94,13 @@
|
|||
<property name="update-interval" type="int" value="4"/>
|
||||
</property>
|
||||
<property name="plugin-10" type="string" value="xkb">
|
||||
<property name="display-type" type="uint" value="1"/>
|
||||
<property name="display-type" type="uint" value="0"/>
|
||||
<property name="display-name" type="uint" value="0"/>
|
||||
<property name="group-policy" type="uint" value="0"/>
|
||||
</property>
|
||||
<property name="plugin-12" type="string" value="clock">
|
||||
<property name="mode" type="uint" value="2"/>
|
||||
<property name="digital-format" type="string" value="%H:%M %d.%b.%Y"/>
|
||||
<property name="digital-format" type="string" value="%H:%M %d.%b.%y"/>
|
||||
<property name="font" type="string" value="Noto Sans 14"/>
|
||||
<property name="fg-color" type="array">
|
||||
<value type="uint" value="65535"/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue