summaryrefslogtreecommitdiff
path: root/desktop/.xsession
blob: afc60b74eb86dac3c3a079347d7a541cf47f54a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -euo pipefail

SETUP_MARKER=$HOME/.local/share/__kj.dotfiles__
if [[ ! -e "$SETUP_MARKER" ]]; then
    echo running setup
    urxvt -e sh -c "$HOME/dotfiles/setup.sh"
    touch "$SETUP_MARKER"
fi

source ~/.zshenv

find_planck_keyboard() {
  xinput list | grep -q "OLKB Planck"
}

export TERMINAL=urxvt
xrdb -merge $HOME/.Xresources -I$HOME
if find_planck_keyboard; then
  setxkbmap us -option compose:ralt
else
  setxkbmap us -variant dvorak -option compose:ralt -option caps:ctrl_modifier
fi

xsetroot -solid "#2A3462"
pasystray &
xss-lock -- /usr/bin/env xscreensaver-command --lock &
xset -b
dzen2 -dock -x 0 -h 24 -e 'onstart=lower' -bg '#252526' -p &
conky | dzen2 -dock -geometry 800x24-950+0 -expand left -fn "WenQuanYi Micro Hei-16" -ta r -bg '#252526' -fg '#f4f4f4' &
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 100 --widthtype pixel --transparent true --height 24 --tint 0x252526  --alpha 0 &

[[ -f /etc/nixos/configuration.nix ]] || \
  redshift -l 40:-70 -r -t 5500:3700 &

nm-applet --no-agent &

if which autorandr >/dev/null; then
  autorandr --change
fi

dunst -max_icon_size 30 &

exec xmonad