dotfiles/system/.config/zsh/.zprofile
Severin Kaderli 84019aac75
Add newest settings
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
2023-04-22 15:28:15 +02:00

42 lines
1 KiB
Bash

#!/bin/bash
#
# SCRIPT NAME:
# .zprofile
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# This script is called when you start a login shell.
#
# USAGE:
# This script is automatically executed when you start a login shell.
# Load env variables (might have problems with spaces on Zsh)
export $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)
# Set shell specific env variables
export HISTCONTROL="ignoreboth"
export HISTSIZE="10000"
export SAVEHIST="${HISTSIZE}"
export HISTFILESIZE="${HISTSIZE}"
if [[ -f "${HOME}/.config/zsh/.zshrc" ]]; then
. "${HOME}/.config/zsh/.zshrc"
fi
# Restore custom dconf configuration
dconf load / < "${XDG_CONFIG_HOME}/dconf/root.conf"
if [ "$(tty)" = "/dev/tty1" ]; then
sway --unsupported-gpu >> "${XDG_LOG_HOME}/sway.log" 2>&1 && exit
fi
if [ "$(tty)" = "/dev/tty2" ]; then
startx "${XDG_CONFIG_HOME}/X11/xinitrc" -- -keeptty >> "${XDG_LOG_HOME}/xorg.log" 2>&1 && exit
fi
if [ "$(tty)" = "/dev/tty3" ]; then
XDG_SESSION_TYPE=wayland gnome-session && exit
fi