summaryrefslogtreecommitdiff
path: root/.xprofile
blob: de0b9e4ec60390ae953ec51a0262692a2e91e0a4 (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
#!/bin/sh

if [ "$DISPLAY_SESSION" != "openbox" ] && \
   [ "$DISPLAY_SESSION" != "dwm" ]; then
    exit 0
fi

setxkbmap -layout us,ru -option "grp:alt_shift_toggle"
dunst &

# Window manager specific config
if [ "$DISPLAY_SESSION" = "dwm" ]; then
    compositor_args="-o 0"
    dwmblocks &
fi

# Host specific config
if [ "$(hostname -s)" = "laptop1" ]; then
    fusuma &
fi

# Setup wallpaper
WP_DIR="$HOME/Pictures/Wallpapers/"
if [ -d "$WP_DIR" ]; then    
    WP=$( ls -l "$WP_DIR" | tail -n +2 | awk '{ print $9 }' | shuf | tail -n -1 )
    xwallpaper --zoom "$WP_DIR/$WP"
fi

# On archlinux there is only picom fork
if ! [ $(command -v compton) ]; then
    alias compton="picom"
fi

compton -c --config $XDG_CONFIG_HOME/compton/compton.conf $compositor_args &