From 7ebe7d335c63cc3da3339f20bd806a8f419f1021 Mon Sep 17 00:00:00 2001 From: frosty Date: Fri, 6 Sep 2024 03:04:40 +0000 Subject: [PATCH] make some cross-system fixes --- .bash_profile | 6 +++--- .bashrc | 4 +--- .xinitrc | 6 +++++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.bash_profile b/.bash_profile index cfc9d04..4e47246 100644 --- a/.bash_profile +++ b/.bash_profile @@ -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 || : diff --git a/.bashrc b/.bashrc index 87db4f3..39846e3 100644 --- a/.bashrc +++ b/.bashrc @@ -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' diff --git a/.xinitrc b/.xinitrc index 78174e3..5757a0a 100755 --- a/.xinitrc +++ b/.xinitrc @@ -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