summaryrefslogtreecommitdiffstats
path: root/.config/qtile/autorc
blob: 14969c914df156dd2a83f74c2130f41ebdf6842c (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
#!/bin/bash

function off_monitor_if_hdmi_plugged_in() {
    monitor_status=$(xrandr | grep "HDMI-1-4 connected" | wc -l)

    if [ $monitor_status == 1 ];
    then
        xrandr --auto
        xrandr --output eDP-1 --off
    fi
}

function caps_to_esc(){ xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'; }

function start() {
    killall $1
    sleep .5
    $($1 $2) &
}

off_monitor_if_hdmi_plugged_in
caps_to_esc

start picom "-b -D 4 --vsync"
start nitrogen "--restore"
start run_spotifyd