summaryrefslogtreecommitdiff
path: root/dotfiles/Xsession
blob: 3d2a716f4019ee8b2d1ed69e709eb10bbb4ea850 (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
#!/bin/bash

run_if_exists() {
    bin=$1
    binpath=$(which "$bin")
    [ -x "$binpath" ] && "$binpath" &
}

# screen locker
run_if_exists xscreensaver

# keyboard layout indicator
run_if_exists fbxkb

# clipboard manager
run_if_exists parcellite

# on FIDO HW key add/remove, update the SSH agent
udev_match --subsystem=hidraw --match=ACTION=remove --match=ID_FIDO_TOKEN=1 ssh_sk_clean &
udev_match --subsystem=hidraw --match=ACTION=add    --match=ID_FIDO_TOKEN=1 \
    "ssh-add -K || notify-send -u critical 'Error adding FIDO2 keys to SSH agent' 'Wrong PIN?'" &

# show notifications on brightness changes
for d in /sys/class/backlight/*; do
    brightness_monitor "$d" &
done

# source the machine-local configuration
[ -r "$HOME/.config/Xsession_local" ] && . "$HOME/.config/Xsession_local"

/usr/bin/awesome