]> git.sev.monster Git - dotfiles.git/blame_incremental - base/.xinitrc
reorganize aliases, clean up binds, add zoxide
[dotfiles.git] / base / .xinitrc
... / ...
CommitLineData
1#!/bin/zsh
2# using zsh to load .zshenv (eg. for PATH) but file is sh-compatible
3
4# Xorg settings
5# TODO: create shim for cpp
6xrdb -merge ~/.Xresources
7xmodmap ~/.Xmodmap
8xset r rate 290 26 &
9xset m 1/1 0 &
10xset s off
11xset dpms 0 0 600
12find -L "${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do
13 [ -f "$x/fonts.dir" ] && xset +fp $x
14done
15xset fp rehash
16
17# redshift, root image
18redon &
19wall &
20
21# root terminal
22urxvt -name TermBg1 -override-redirect -geometry x5+0--1 \
23 -e tail -F /var/log/messages &
24xdotool search --limit 1 --sync --classname TermBg1 windowsize --usehints 100% 6
25
26# tray icons
27#"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 &
28volumeicon &
29
30# daemons
31dunst &
32mpc-notify -d &
33xautolock -time 10 -locker "$HOME/bin/lck" &
34xbanish &
35
36if [ -z "$TERMINAL" -a \( -x $(which -a urxvtd | head -1) \) ]; then
37 for i in 1 2; do
38 # try to start client twice, once before checking for daemon
39 # and another after trying to start it
40 urxvtc -e exit >/dev/null 2>&1
41 if [ $? -eq 2 ]; then
42 # daemon not started, attempt to start once
43 if [ $i -eq 1 ]; then
44 urxvtd -q -o -f
45 else
46 TERMINAL=urxvt
47 export TERMINAL
48 fi
49 else
50 TERMINAL=urxvtc
51 export TERMINAL
52 break
53 fi
54 done
55 unset i
56fi
57
58# taskbar
59# sleep to wait for session to start fully
60(sleep 0.1 && tint2) &
61
62# x220t
63# TODO: check hostname to load auxillary things
64# TODO: reformat for linux
65#(sleep 0.1 "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") &
66
67# start session
68if [ -z "$1" ]; then
69 session=i3
70else
71 session=$1
72 shift
73fi
74exec $session "$@"
This page took 0.028244 seconds and 4 git commands to generate.