summaryrefslogtreecommitdiff
path: root/.config/autostart/autostart.sh
blob: 8233781ff0e90b18a4441ffdbe6fc6dcd5560511 (about) (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
#!/bin/bash

WALLPAPER=~/wallpapers/forest-deer-02.jpg
HOSTNAME=$(hostname)

function set_monitors() {
    if [ "$HOSTNAME" == "zeus" ]; then
        xrandr --output DisplayPort-0 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 2560x0 --rotate right 
    fi
}

function start_picom() {
    pgrep -x picom > /dev/null || picom
}

function set_wallpaper() {
    local screen_option
    if [ "$HOSTNAME" == "zeus" ]; then
	xwallpaper --output DisplayPort-0 --stretch ~/wallpapers/forest-deer-02.jpg 
        xwallpaper --output HDMI-A-0 --stretch ~/wallpapers/science-01.jpg 
    else
	xwallpaper --focus ~/wallpapers/library-fantasy-tree.jpg 
    fi
}

function get_started() {
    start_picom &
    set_wallpaper &
    syncthing --no-browser &
    transmission-daemon &
    set_monitors &
    setxkbmap us -option ctrl:swapcaps
}

get_started