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

function monitor_settings() {
    sleep .5
    monitor_status=$(xrandr | grep "HDMI-1-4 connected" | wc -l)

    if [ $monitor_status == 1 ];
    then
        # xrandr --auto
        # xrandr --output eDP-1 --off
	xrandr --output eDP-1-1 --auto --output HDMI-0 --auto --left-of eDP-1-1
    fi
}

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

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

start nitrogen "--restore"
monitor_settings
caps_to_esc

start picom "-b -D 4 --vsync"