sxmo: lift device-specific config out of the sxmo-utils & into the hosts
This commit is contained in:
@@ -28,5 +28,11 @@
|
||||
# see <repo:mil/sxmo-utils:scripts/deviceprofiles>
|
||||
# SXMO_DEVICE_NAME = "pine64,pinephone-1.2";
|
||||
};
|
||||
package = pkgs.sxmo-utils.overrideAttrs (base: {
|
||||
postPatch = (base.postPatch or "") + ''
|
||||
# after volume-button navigation mode, restore full keyboard functionality
|
||||
cp ${./xkb_mobile_normal_buttons} ./configs/xkb/xkb_mobile_normal_buttons
|
||||
'';
|
||||
})
|
||||
};
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ sane-lib, ... }:
|
||||
{ pkgs, sane-lib, ... }:
|
||||
{
|
||||
sane.gui.sxmo = {
|
||||
settings = {
|
||||
@@ -13,5 +13,13 @@
|
||||
DEFAULT_COUNTRY = "US";
|
||||
BROWSWER = "librewolf";
|
||||
};
|
||||
package = pkgs.sxmo-utils.overrideAttrs (base: {
|
||||
postPatch = (base.postPatch or "") + ''
|
||||
cat <<EOF >> ./configs/default_hooks/sxmo_hook_start.sh
|
||||
# rotate UI based on physical display angle by default
|
||||
sxmo_daemons.sh start autorotate sxmo_autorotate.sh
|
||||
EOF
|
||||
'';
|
||||
});
|
||||
};
|
||||
}
|
||||
|
21
pkgs/additional/sxmo-utils/0005-system-audio.patch
Normal file
21
pkgs/additional/sxmo-utils/0005-system-audio.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/configs/default_hooks/sxmo_hook_start.sh b/configs/default_hooks/sxmo_hook_start.sh
|
||||
index 194814d..beb9232 100755
|
||||
--- a/configs/default_hooks/sxmo_hook_start.sh
|
||||
+++ b/configs/default_hooks/sxmo_hook_start.sh
|
||||
@@ -16,16 +16,6 @@ while ! superctl status > /dev/null 2>&1; do
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
-# Load our sound daemons
|
||||
-
|
||||
-if [ "$(command -v pulseaudio)" ]; then
|
||||
- superctl start pulseaudio
|
||||
-elif [ "$(command -v pipewire)" ]; then
|
||||
- # pipewire-pulse will start pipewire
|
||||
- superctl start pipewire-pulse
|
||||
- superctl start wireplumber
|
||||
-fi
|
||||
-
|
||||
# Periodically update some status bar components
|
||||
sxmo_hook_statusbar.sh all
|
||||
sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
23
pkgs/additional/sxmo-utils/0105-more-apps.patch
Normal file
23
pkgs/additional/sxmo-utils/0105-more-apps.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff --git a/configs/default_hooks/sxmo_hook_apps.sh b/configs/default_hooks/sxmo_hook_apps.sh
|
||||
index ba70a31..f1ce0d5 100755
|
||||
--- a/configs/default_hooks/sxmo_hook_apps.sh
|
||||
+++ b/configs/default_hooks/sxmo_hook_apps.sh
|
||||
@@ -31,6 +31,7 @@ write_line_app audacity "$icon_mic Audacity" "audacity"
|
||||
write_line_app gnome-calculator "$icon_clc Calculator" "gnome-calculator"
|
||||
write_line_app calcurse "$icon_clk Calcurse" "sxmo_terminal.sh calcurse"
|
||||
write_line_app cmus "$icon_mus Cmus" "sxmo_terminal.sh cmus"
|
||||
+write_line_app cozy "$icon_mus Cozy" "cozy"
|
||||
write_line_app dino "$icon_msg Dino" "GDK_SCALE=1 dino"
|
||||
write_line_app dolphin "$icon_dir Dolphin" "dolphin"
|
||||
write_line_app emacs "$icon_edt Emacs (Terminal)" "sxmo_terminal.sh emacs -nw"
|
||||
@@ -62,8 +63,10 @@ write_line_app ii "$icon_msg Ii" "sxmo_terminal.sh ii"
|
||||
write_line_app ipython "$icon_trm IPython" "sxmo_terminal.sh ipython"
|
||||
write_line_app kasts "$icon_rss Kasts" "kasts"
|
||||
write_line_app kmail "$icon_eml KMail" "kmail"
|
||||
+write_line_app komikku "$icon_bok Komikku" "komikku"
|
||||
write_line_app kontact "$icon_msg Kontact" "kontact"
|
||||
write_line_app konversation "$icon_msg Konversation" "konversation"
|
||||
+write_line_app koreader "$icon_bok KOReader" "koreader"
|
||||
write_line_app kwrite "$icon_edt Kwrite" "kwrite"
|
||||
write_line_app lagrange "$icon_glb Lagrange" "lagrange"
|
||||
write_line_app lf "$icon_dir Lf" "sxmo_terminal.sh lf"
|
@@ -1,57 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. sxmo_common.sh
|
||||
|
||||
# Create xdg user directories, such as ~/Pictures
|
||||
xdg-user-dirs-update
|
||||
|
||||
sxmo_daemons.sh start daemon_manager superd -v
|
||||
|
||||
# let time to superd to start correctly
|
||||
while ! superctl status > /dev/null 2>&1; do
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
# Periodically update some status bar components
|
||||
sxmo_hook_statusbar.sh all
|
||||
sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
||||
sxmo_hook_statusbar.sh periodics
|
||||
|
||||
# mako/dunst are required for warnings.
|
||||
# load some other little things here too.
|
||||
superctl start mako
|
||||
superctl start sxmo_wob
|
||||
superctl start sxmo_menumode_toggler
|
||||
superctl start bonsaid
|
||||
swaymsg output '*' bg "$SXMO_BG_IMG" fill
|
||||
|
||||
# To setup initial lock state
|
||||
sxmo_hook_unlock.sh
|
||||
|
||||
# Turn on auto-suspend
|
||||
if [ -w "/sys/power/wakeup_count" ] && [ -f "/sys/power/wake_lock" ]; then
|
||||
superctl start sxmo_autosuspend
|
||||
fi
|
||||
|
||||
# Turn on lisgd
|
||||
superctl start sxmo_hook_lisgd
|
||||
|
||||
# Start the desktop widget (e.g. clock)
|
||||
superctl start sxmo_conky
|
||||
|
||||
# Monitor the battery
|
||||
superctl start sxmo_battery_monitor
|
||||
|
||||
# It watch network changes and update the status bar icon by example
|
||||
superctl start sxmo_networkmonitor
|
||||
|
||||
# The daemon that display notifications popup messages
|
||||
superctl start sxmo_notificationmonitor
|
||||
|
||||
# monitor for headphone for statusbar
|
||||
superctl start sxmo_soundmonitor
|
||||
|
||||
# rotate UI based on physical display angle by default
|
||||
sxmo_daemons.sh start autorotate sxmo_autorotate.sh
|
@@ -69,9 +69,12 @@ stdenv.mkDerivation rec {
|
||||
./0002-ensure-log-dir.patch
|
||||
./0003-fix-xkb-paths.patch
|
||||
./0004-no-busybox.patch
|
||||
# wanted to fix/silence some non-fatal errors
|
||||
./0005-system-audio.patch
|
||||
|
||||
# personal preferences:
|
||||
# personal (but upstreamable) preferences:
|
||||
./0104-full-auto-rotate.patch
|
||||
./0105-more-apps.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@@ -79,16 +82,6 @@ stdenv.mkDerivation rec {
|
||||
sed -i "s@/etc/profile\.d/sxmo_init.sh@$out/etc/profile.d/sxmo_init.sh@" scripts/core/*.sh
|
||||
sed -i "s@/usr/bin/@@g" scripts/core/sxmo_version.sh
|
||||
sed -i 's:ExecStart=/usr/bin/:ExecStart=/usr/bin/env :' configs/superd/services/*.service
|
||||
|
||||
# apply customizations
|
||||
# - xkb_mobile_normal_buttons:
|
||||
# - on devices where volume is part of the primary keyboard (e.g. thinkpad), we want to avoid overwriting the default map
|
||||
# - this provided map is the en_US 105 key map
|
||||
${rsync}/bin/rsync -rlv ${./customization}/ ./
|
||||
# TODO: lift this to an override
|
||||
# - i temporarily disable the xkb map override
|
||||
# - this is needed only on lappy; on moby it causes problems
|
||||
# ${rsync}/bin/rsync -rlv ${./customization}/default_hooks/ ./default_hooks/
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
Reference in New Issue
Block a user