diff --git a/Makefile b/Makefile index 23dfce5..6804dff 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,8 @@ clean: install: $(PROGRAMS) cd configs && find . -type f -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd .. + cd resources && find . -type f -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd .. + # Configs install -D -m 0755 -t $(DESTDIR)/etc/init.d configs/openrc/sxmo-setpermissions @@ -48,7 +50,7 @@ install: $(PROGRAMS) install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/applications/ configs/xdg/mimeapps.list - install -D -m 0644 -T configs/xorg/monitor.conf $(DESTDIR)$(PREFIX)/share/X11/xorg.conf.d/90-monitor.conf + install -D -m 0644 -T configs/xorg/monitor.conf $(DESTDIR)$(PREFIX)/share/X11/xorg.conf.d/90-monitor.conf mkdir -p $(DESTDIR)/etc/NetworkManager/dispatcher.d install -D -m 0755 -T configs/networkmanager/updatestatusbar.sh $(DESTDIR)/etc/NetworkManager/dispatcher.d/10-updatestatusbar.sh diff --git a/configs/appcfg/conky24h.conf b/configs/appcfg/conky24h.conf new file mode 100644 index 0000000..9c91c53 --- /dev/null +++ b/configs/appcfg/conky24h.conf @@ -0,0 +1,37 @@ +conky.config = { + alignment = 'middle_middle', + background = false, + border_width = 0.5, + cpu_avg_samples = 4, + default_color = 'white', + default_outline_color = 'grey', + default_shade_color = 'black', + draw_borders = true, + draw_graph_borders = true, + draw_outline = false, + draw_shades = true, + use_xft = true, + font = 'DejaVu Sans Mono:size=10', + gap_x = 5, + gap_y = 50, + minimum_height = 5, + minimum_width = 5, + net_avg_samples = 2, + double_buffer = true, + out_to_console = false, + out_to_stderr = false, + extra_newline = false, + own_window = false, + stippled_borders = 1, + update_interval = 60, + uppercase = false, + use_spacer = 'none', + show_graph_scale = false, + show_graph_range = false +} + +conky.text = [[ + ${font Latin Modern Mono Caps:size=60}${alignc}${exec date +"%H:%M"} + ${font Latin Modern Mono Caps:size=10}${alignc}${exec date +"%d %b %Y"} + ${font} +]] diff --git a/configs/appcfg/xinit_template b/configs/appcfg/xinit_template new file mode 100644 index 0000000..76570aa --- /dev/null +++ b/configs/appcfg/xinit_template @@ -0,0 +1,68 @@ +#!/usr/bin/env sh + +# Please modify this file to your liking + +# Important Instructions: +# All processes you launch from this script must +# be non-blocking: launch them in the background (using &) +# or ensure they return quickly. Only after this script +# finishes will the window manager be loaded + +# Set a pretty wallpaper +feh --bg-fill /usr/share/sxmo/background.jpg + +# Show conky (the clock) +conky -c /usr/share/sxmo/appcfg/conky.conf -d #12 hour clock (am/pm) +#conky -c /usr/share/sxmo/appcfg/conky24h.conf -d #24 hour clock + +# Force audio over the main speaker +# and set a sane default volume +sxmo_audioout.sh Speaker +amixer sset 'Line Out Source' 'Mono Differential','Mono Differential' +amixer set "Line Out" 50% + +# Play a funky startup tune +mpv --quiet --no-video /usr/share/sxmo/startup.wav & + +# enter SIM PIN (WARNING! SECURITY RISK!) +# the sleep is there because the modem +# might take a bit to be available +# after first boot. +#sleep 20 && mmcli -i 0 --pin 1234 + +# turn on modemmonitor on login +# Note: if the modemmonitor is not on you can +# not receive texts/calls! +#sleep 22 && sxmo_modemmonitortoggle.sh on & + + + +### Configuration Parameters ### + +# Note that this is just a subset of all available +# parameters, see the sxmo documentation for more. + +# Use firefox as default browser +[ -z "$BROWSER" ] && export BROWSER=firefox + +# Prepopulate Subreddits menu with custom subreddits +#export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn" + +# Temporarily wake every 5 minutes during sleep +#(useful for getting notifications) +#export SXMO_RTCWAKEINTERVAL=300 + +# Immediately turn the screen off when locking the device +#export SXMO_LOCK_SCREEN_OFF=1 + +# Immediately suspend the phone when locking +#export SXMO_LOCK_SUSPEND=1 + +# When scrolling past the beginning or end of a menu, wrap it around: +#export DMENU_WRAP_AROUND=1 + +# Enable audio feedback on keypress +#export KEYBOARD_ARGS="-o | clickclack -f /usr/share/sxmo/keypress.wav" + +# Or, enable vibration feedback on keypress +#export KEYBOARD_ARGS="-o | clickclack -v" diff --git a/resources/background.jpg b/resources/background.jpg new file mode 100644 index 0000000..d6f0d5b Binary files /dev/null and b/resources/background.jpg differ diff --git a/resources/keypress.wav b/resources/keypress.wav new file mode 100644 index 0000000..1206b1a Binary files /dev/null and b/resources/keypress.wav differ diff --git a/resources/startup.ogg b/resources/startup.ogg new file mode 100644 index 0000000..500008c Binary files /dev/null and b/resources/startup.ogg differ diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh index e1bae1d..37fd039 100755 --- a/scripts/core/sxmo_xinit.sh +++ b/scripts/core/sxmo_xinit.sh @@ -67,17 +67,14 @@ daemonsneedingdbus() { defaultconfig() { mkdir -p "$XDG_CONFIG_HOME/sxmo" - - echo '#!/usr/bin/env sh - -conky -c /usr/share/sxmo/appcfg/conky.conf -d -' > "$XDG_CONFIG_HOME/sxmo/xinit" + cp /usr/share/sxmo/appcfg/xinit_template "$XDG_CONFIG_HOME/sxmo/xinit" + chmod u+rx "$XDG_CONFIG_HOME/sxmo/xinit" } customxinit() { set -o allexport # shellcheck disable=SC1090 - [ ! -f "$XDG_CONFIG_HOME/sxmo/xinit" ] && defaultconfig + [ ! -e "$XDG_CONFIG_HOME/sxmo/xinit" ] && defaultconfig # shellcheck disable=SC1090 . "$XDG_CONFIG_HOME/sxmo/xinit"