]> Freerunner's - dotfiles.git/commitdiff
bash: workarounds for opensuse
authorAndre Ramnitz <tux.rising@gmail.com>
Thu, 14 Nov 2024 06:29:08 +0000 (07:29 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Thu, 14 Nov 2024 06:29:08 +0000 (07:29 +0100)
dot-bash_profile
dot-bashrc

index 6bdc697ca01ace80488d794c4ec6f2c0fe0c51fd..e7142cba265099e635970fcd396f63c42cdf1de9 100644 (file)
@@ -15,8 +15,10 @@ export GTK_USE_PORTAL=1
 
 # This file is sourced by bash for login shells.  The following line
 # runs your .bashrc and is recommended by the bash info pages.
-if [[ -f ~/.bashrc ]] ; then
-       . ~/.bashrc
+if [[ ! "$(grep -i suse /etc/os-release)" ]]; then
+    if [[ -f ~/.bashrc ]] ; then
+       . ~/.bashrc
+    fi
 fi
 
 # autorun display-manager
index 73305c1fb1e9bfa55a616bf6b8368aebbce1fa29..9edad24a10eba5471d08f7f030ce6a2de7f7a49e 100644 (file)
@@ -23,11 +23,15 @@ alias glo='git log --oneline'
 alias gst='git status'
 alias nano='nano -_qpT4 '
 alias free='free -h --si'
-alias lsblk='lsblk -o name,size,partuuid,fstype,mountpoints,label'
-alias wtemp='sensors | grep WaterPostRad | cut -f2 -d'+''
-
+alias lsblk='lsblk -o name,partuuid,type,size,fstype,label,mountpoints'
 alias  lf='lfrun'
 
+# compatibility with OpenSuSE
+if [[ "$(grep -i suse /etc/os-release)" ]]; then
+    . ~/.bash_profile
+fi
+test -s ~/.alias && . ~/.alias || true
+
 case $(tty) in
     /dev/tty[0-9]*)
         alias  l1='EZA_GRID_ROWS=13 eza -w 220 --group --group-directories-first -1'
@@ -93,6 +97,7 @@ PS1='\u@\h \w \$ '
 command -v starship > /dev/null 2>&1 && eval "$(starship init bash)"
 
 # apply base16 theme
-~/.local/bin/base16-flavours
+test -f ~/.local/bin/base16-flavours && ~/.local/bin/base16-flavours
 clear
-command fastfetch -c "$HOME/.config/fastfetch/config.jsonc"
+test -f /usr/bin/fastfetch && command fastfetch -c "$HOME/.config/fastfetch/config.jsonc"
+