From 7ccd4ad7669f2415e2b0f0b045297708e7e28711 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 21 Jun 2023 15:58:54 +0200 Subject: Declutter startup files --- .config/X11/.xprofile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .config/X11/.xprofile (limited to '.config/X11') diff --git a/.config/X11/.xprofile b/.config/X11/.xprofile new file mode 100644 index 0000000..c55e444 --- /dev/null +++ b/.config/X11/.xprofile @@ -0,0 +1,44 @@ +#!/bin/sh + +# profile file. Runs on login. Environmental variables are set here. + +# If you don't plan on reverting to bash, you can remove the link in ~/.profile +# to clean up. + +#If running bash +#if [ -n "$BASH_VERSION" ]; then +# # include .bashrc if it exists +# if [ -f "$HOME/.bashrc" ]; then +# . "$HOME/.bashrc" +# fi +#fi + +#[[ -f ~/.config/zsh/.zshenv ]] && source ~/.config/zsh/.zshenv +[[ -f ~/.config/zsh/.zshrc ]] && source ~/.config/zsh/.zshrc + + +# Xresources +[[ -f ~/.config/X11/.Xresources ]] && xrdb -merge ~/.config/X11/.Xresources + +# Adds `~/.local/bin` to $PATH +#export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local:$HOME/.local/bin:$HOME/scripts +#export PATH=$HOME/bin:/usr/local/bin:/sbin:/usr/sbin:$PATH +#unsetopt PROMPT_SP +#export XDG_CONFIG_HOME="$HOME/.config" +#export XDG_DATA_HOME="$HOME/.local/share" +#export XDG_CACHE_HOME="$HOME/.cache" + + +#export XAUTHORITY="$XDG_RUNTIME_DIR/.Xauthority" # This line will break some DMs. +export USERXSESSION="$XDG_CACHE_HOME/X11/xsession" +export USERXSESSIONRC="$XDG_CACHE_HOME/X11/xsessionrc" +export ALTUSERXSESSION="$XDG_CACHE_HOME/X11/Xsession" +export ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors" + + +if [[ "$(tty)" = "/dev/tty1" ]]; then + pgrep bspwm || startx "$XDG_CONFIG_HOME/X11/.xinitrc" +fi +#if [[ "$(tty)" = "/dev/tty1" ]]; then +# pgrep startxfce4 || startx "$XDG_CONFIG_HOME/X11/.xinitrc" +#fi -- cgit v1.2.3