parent
d2ee25d724
commit
5c4c6c15e2
3 changed files with 64 additions and 40 deletions
@ -1,40 +1,66 @@ |
|||||||
#!/usr/bin/env sh |
#!/usr/bin/env sh |
||||||
# Env vars |
|
||||||
# shellcheck disable=SC1091 |
envvars() { |
||||||
. /etc/profile |
# shellcheck disable=SC1091 |
||||||
command -v "$TERM" || export TERM=st |
. /etc/profile |
||||||
command -v "$BROWSER" || export BROWSER=surf |
command -v "$TERM" || export TERM=st |
||||||
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1 |
command -v "$BROWSER" || export BROWSER=surf |
||||||
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config |
command -v "$EDITOR" || export EDITOR=vis |
||||||
|
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1 |
||||||
# Setup audio and a few sensible X defaults |
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config |
||||||
alsactl --file /usr/share/sxmo/alsa/default_alsa_sound.conf restore |
} |
||||||
xmodmap /usr/share/sxmo/appcfg/xmodmap_caps_esc |
|
||||||
xsetroot -mod 3 2 -fg '#000000' -bg '#888888' |
xdefaults() { |
||||||
xset s off -dpms |
alsactl --file /usr/share/sxmo/alsa/default_alsa_sound.conf restore |
||||||
xrdb /usr/share/sxmo/appcfg/xresources_xcalc.xr |
xmodmap /usr/share/sxmo/appcfg/xmodmap_caps_esc |
||||||
synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25 |
xsetroot -mod 3 2 -fg '#000000' -bg '#888888' |
||||||
|
xset s off -dpms |
||||||
# Start daemons |
xrdb /usr/share/sxmo/appcfg/xresources_xcalc.xr |
||||||
pkill conky |
synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25 |
||||||
if [ -e "$XDG_CONFIG_HOME/sxmo/conky.conf" ]; then |
} |
||||||
conky -c $XDG_CONFIG_HOME/sxmo/conky.conf -d |
|
||||||
else |
daemons() { |
||||||
conky -c /usr/share/sxmo/appcfg/conky.conf -d |
pkill conky |
||||||
fi |
if [ -e "$XDG_CONFIG_HOME/sxmo/conky.conf" ]; then |
||||||
keynav & |
conky -c $XDG_CONFIG_HOME/sxmo/conky.conf -d |
||||||
autocutsel & |
else |
||||||
autocutsel -selection PRIMARY & |
conky -c /usr/share/sxmo/appcfg/conky.conf -d |
||||||
sxmo_statusbar.sh & |
fi |
||||||
|
keynav & |
||||||
# Run user's custom xinit |
autocutsel & |
||||||
set -o allexport |
autocutsel -selection PRIMARY & |
||||||
[ -f "$XDG_CONFIG_HOME/sxmo/xinit" ] && . "$XDG_CONFIG_HOME/sxmo/xinit" |
sxmo_statusbar.sh & |
||||||
set +o allexport |
} |
||||||
|
|
||||||
# Startup dbus, dunst in dbus path, lisgd in dbus path, and finally dwm |
daemonsneedingdbus() { |
||||||
exec dbus-run-session sh -c " |
|
||||||
dunst -conf /usr/share/sxmo/appcfg/dunst.conf & |
dunst -conf /usr/share/sxmo/appcfg/dunst.conf & |
||||||
sxmo_lisgdstart.sh & |
sxmo_lisgdstart.sh & |
||||||
dwm 2> ~/.dwm.log |
} |
||||||
" |
|
||||||
|
customxinit() { |
||||||
|
set -o allexport |
||||||
|
# shellcheck disable=SC1090 |
||||||
|
[ -f "$XDG_CONFIG_HOME/sxmo/xinit" ] && . "$XDG_CONFIG_HOME/sxmo/xinit" |
||||||
|
set +o allexport |
||||||
|
} |
||||||
|
|
||||||
|
startdwm() { |
||||||
|
exec dbus-run-session sh -c " |
||||||
|
$0 daemonsneedingdbus; |
||||||
|
$0 customxinit; |
||||||
|
dwm 2> ~/.dwm.log |
||||||
|
" |
||||||
|
} |
||||||
|
|
||||||
|
xinit() { |
||||||
|
envvars |
||||||
|
xdefaults |
||||||
|
daemons |
||||||
|
startdwm |
||||||
|
} |
||||||
|
|
||||||
|
if [ -z "$1" ]; then |
||||||
|
xinit |
||||||
|
else |
||||||
|
"$1" |
||||||
|
fi |
||||||
|
Loading…
Reference in new issue