make some cross-system fixes

This commit is contained in:
frosty 2024-09-06 03:04:40 +00:00
parent a0f6d24712
commit 7ebe7d335c
3 changed files with 9 additions and 7 deletions

View file

@ -1,13 +1,13 @@
# shellcheck shell=sh disable=SC1091
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
# XDG base directories
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
# Default programs
export TERMINAL="${TERMINAL:-st}"
export EDITOR="${EDITOR:-nvim}"
@ -36,4 +36,4 @@ export PATH="$PATH:$CARGO_HOME/bin"
export PATH="$PATH:$XDG_DATA_HOME/npm/bin"
# Automatic graphical start
[ "$(tty)" = "/dev/tty2" ] && exec startx
[ "$(tty)" = "/dev/tty2" ] && exec startx || :

View file

@ -15,9 +15,7 @@ alias mv='mv -iv'
alias rm='rm -vI'
alias mkdir='mkdir -pv'
alias ls='ls --color=auto -AF'
cd() {
builtin cd "$@" && ls
}
cd() { builtin cd "$@" && ls; }
alias grep='grep --color=auto'
alias wget='wget --no-hsts'
alias vim='nvim'

View file

@ -25,5 +25,9 @@ mpd --no-daemon &
modbot -x &
while :; do
dbus-launch --sh-syntax --exit-with-session dwm
if command -v dbus-launch >/dev/null; then
dbus-launch --sh-syntax --exit-with-session dwm
elif command -v dbus-run-session >/dev/null; then
dbus-run-session dwm
fi
done