dotfiles/system/.config/X11/xinitrc
Severin Kaderli 052fb6bada
Update a bunch of configs
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
2019-03-26 20:22:01 +01:00

27 lines
700 B
Bash

#!/bin/bash
#
# SCRIPT NAME:
# .config/X11/xinitrc
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# This is the startup script when you start the x-server.
#
# USAGE:
# This script is executed when you start the x-server.
. "${XDG_CONFIG_HOME}/X11/xsetup"
# Load different i3 configuration depending on nvidia-xrun is used because
# the monitor names are different.
NVIDIA_CHECK="$(xrandr | grep "eDP-1-1 connected")"
if [ -z "${NVIDIA_CHECK}" ]; then
LOCAL_I3_CONFIG="${XDG_CONFIG_HOME}/i3/config.intel"
else
LOCAL_I3_CONFIG="${XDG_CONFIG_HOME}/i3/config.nvidia"
fi
cat "${LOCAL_I3_CONFIG}" "${XDG_CONFIG_HOME}/i3/config.base" > "${XDG_CONFIG_HOME}/i3/config"
i3