config/.config/shell/profile

145 lines
3.3 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/zsh
# 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.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
# Userwide npm installations
export npm_config_prefix="$HOME/.local"
unsetopt PROMPT_SP
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="firefox-bin"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
# Other program settings:
export DICS="/usr/share/stardict/dic/"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
# This is the list for lf icons:
export LF_ICONS="di=:\
fi=:\
tw=:\
ow=:\
ln=:\
or=:\
ex=:\
*.txt=:\
*.mom=:\
*.me=:\
*.ms=:\
*.odt=:\
*.ods=:\
*.png=:\
*.webp=:\
*.ico=:\
*.jpg=:\
*.jpe=:\
*.jpeg=:\
*.gif=:\
*.svg=:\
*.tif=:\
*.tiff=:\
*.xcf=:\
*.html=:\
*.gpg=:\
*.css=:\
*.js=:\
*.ts=:\
*.cs=:\
*.sql=:\
*.db=:\
*.json=:\
*.py=:\
*.c=:\
*.orig=:\
*.rej=:\
*.h=:\
*.yml=:\
*.yaml=:\
*.mk=:\
*.cpp=:\
*.scss=:\
*.sass=:\
*.pdf=:\
*.epub=:\
*.csv=:\
*.xlsx=:\
*.tex=:\
*.md=:\
README=:\
LICENSE=:\
*.mp3=:\
*.opus=:\
*.ogg=:\
*.m4a=:\
*.flac=:\
*.wav=:\
*.mkv=:\
*.mp4=:\
*.webm=:\
*.mpeg=:\
*.avi=:\
*.mov=:\
*.mpg=:\
*.wmv=:\
*.m4b=:\
*.flv=:\
*.zip=:\
*.rar=:\
*.7z=:\
*.tar.gz=:\
*.1=:\
*.nfo=:\
*.info=:\
*.iso=:\
*.img=:\
*.torrent=:\
*.jar=:\
*.java=:\
"
# I'm not using Luke's shortcuts so...
#[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 &
# This is something luke smith has in his profile (which I have stolen, it's nice but
# doesn't work very nicely with my login manager, lightdm, and I prefer to just run
# startx myself if I'm not using a login manager anyway.
# Start graphical server on user's current tty if not already running.
#[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
if [ -n "$DESKTOP_SESSION" ];then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
fi