]> git.sev.monster Git - dotfiles.git/blobdiff - base/.xinitrc
link dabuild and dabuild-admin from docker-abuild
[dotfiles.git] / base / .xinitrc
index 838c1e9a4b592641ae369eb7b6d92da1fe818269..97c5c14abe0a185f52ff24f6c50a022fb7ea6aba 100644 (file)
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/zsh
+# using zsh to load .zshenv (eg. for PATH) but file is sh-compatible
 
 sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap
 sysresources=/usr/local/etc/X11/xinit/.Xresources
 
 sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap
 sysresources=/usr/local/etc/X11/xinit/.Xresources
-usermodmap="$HOME/.Xmodmap"
-userresources="$HOME/.Xresources"
+usermodmap=~/.Xmodmap
+userresources=~/.Xresources
 
 if [ -f $sysresources ]; then
        xrdb -merge $sysresources
 
 if [ -f $sysresources ]; then
        xrdb -merge $sysresources
@@ -27,7 +28,10 @@ xset r rate 290 26 &
 xset m 1/1 0 &
 xset s off
 xset dpms 0 0 600
 xset m 1/1 0 &
 xset s off
 xset dpms 0 0 600
-xset +fp ${XDG_DATA_HOME:-~/share}/fonts/Dina/
+
+find -L "${XDG_DATA_HOME:-~/share}/fonts" -type d -mindepth 1 -maxdepth 2 | while read -r x; do
+       [ -f "$x/fonts.dir" ] && xset +fp $x
+done
 xset fp rehash
 
 # root terminal
 xset fp rehash
 
 # root terminal
@@ -42,22 +46,25 @@ volumeicon &
 # daemons
 dunst &
 mpc-notify -d &
 # daemons
 dunst &
 mpc-notify -d &
-xautolock -time 10 -locker "$HOME/bin/l" &
+xautolock -time 10 -locker "$HOME/bin/lck" &
 xbanish &
 eval `ssh-agent`
 
 xbanish &
 eval `ssh-agent`
 
-if [ -x /usr/local/bin/urxvtd ]; then
+if [ -z "$TERMINAL" -a \( -x /usr/bin/urxvtd -o -x /usr/local/bin/urxvtd \) ]; then
        for i in 1 2; do
                # try to start client twice, once before checking for daemon
                # and another after trying to start it
        for i in 1 2; do
                # try to start client twice, once before checking for daemon
                # and another after trying to start it
-               urxvtc -e exit
+               urxvtc -e exit 2>/dev/null
                if [ $? -eq 2 ]; then
                        # daemon not started, attempt to start once
                        if [ $i -eq 1 ]; then
                                urxvtd -q -o -f
                if [ $? -eq 2 ]; then
                        # daemon not started, attempt to start once
                        if [ $i -eq 1 ]; then
                                urxvtd -q -o -f
+                       else
+                               TERMINAL=urxvt
+                               export TERMINAL
                        fi
                else
                        fi
                else
-                       TERMINAL=/usr/local/bin/urxvtc
+                       TERMINAL=urxvtc
                        export TERMINAL
                        break
                fi
                        export TERMINAL
                        break
                fi
@@ -66,12 +73,11 @@ if [ -x /usr/local/bin/urxvtd ]; then
 fi
 
 # try to wait for session to start
 fi
 
 # try to wait for session to start
-#(sleep 0.1 && tint2) &
-#(sleep 0.1 && yabar -c "$HOME/etc/yabar/yabar.conf") &
-#x220t
-(sleep 0.1 && [ -x "$HOME/bin/acpi_ac" ] && \
-       "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") &
-(sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock") &
+(sleep 0.1 && tint2) &
+# x220t
+# TODO: check hostname to load auxillary things
+# TODO: reformat for linux
+#(sleep 0.1 "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") &
 
 # load any global scripts
 if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
 
 # load any global scripts
 if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
@@ -82,7 +88,7 @@ if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
 fi
 
 # start session
 fi
 
 # start session
-if [ ! -n "$1" ]; then
+if [ -z "$1" ]; then
        session=i3
 else
        session=$1
        session=i3
 else
        session=$1
This page took 0.049901 seconds and 4 git commands to generate.