.bash_profile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Honor per-interactive-shell startup file
  2. if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
  3. os_name=$(echo | grep -E '^ID=' /etc/os-release | sed s/ID=//)
  4. # Necessary env to make Guix usable with external sources
  5. #export LIBRARY_PATH=/lib:/run/current-system/profile/lib:$HOME/.guix-profile/lib:/gnu/store/gmv6n5vy5qcsn71pkapg2hnknyn1p7g3-gcc-12.3.0-lib/lib:$VDPAU_DRIVER_PATH:$LIBRARY_PATH
  6. #export LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH
  7. #export LD_LIBRARY_PATH=$VDPAU_DRIVER_PATH:$LD_LIBRARY_PATH
  8. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/.guix-profile/lib/pkgconfig
  9. export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/.nix-profile/share
  10. export FONTCONFIG_PATH=/run/current-system/profile/etc/fonts:$HOME/.guix-profile/etc/fonts${FONTCONFIG_PATH:+:}$FONTCONFIG_PATH
  11. export DICPATH=$HOME/.local/share/hunspell${DICPATH:+:}$DICPATH
  12. export PATH=$PATH:/usr/local/bin:$HOME/.local/bin:$HOME/.scripts
  13. if [[ "$os_name" = "guix" ]]; then
  14. # Icu timezone bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68411
  15. export TZ=$(cat /etc/timezone)
  16. ## export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
  17. # In theory this is done by /etc/profile
  18. ## export GUIX_PROFILE="$HOME/.guix-profile"
  19. ##. "$GUIX_PROFILE/etc/profile"
  20. # Enbling Nix to use packages not availble in Guix
  21. # such as "rustup" or "appimage-run"
  22. source /run/current-system/profile/etc/profile.d/nix.sh
  23. fi
  24. # Makes Guix happy
  25. for locale in "$HOME/.guix-profile/lib/locale" "/run/current-system/locale"
  26. do
  27. if [ -f "$locale" ]
  28. then
  29. export GUIX_LOCPATH="$locale${GUIX_LOCPATH:+:$GUIX_LOCPATH}"
  30. fi
  31. done
  32. unset locale
  33. # Uniform lock and feel gtk/qt
  34. # other option: QT_STYLE_OVERRIDE=breeze, kvantum or gtk2
  35. export QT_QPA_PLATFORMTHEME=qt5ct
  36. if [[ $XDG_SESSION_DESKTOP = "awesome" ]]; then
  37. # Just becase I'm using components from there
  38. export XDG_CURRENT_DESKTOP=xfce
  39. export XDG_MENU_PREFIX=xfce-
  40. # Run on start-up
  41. if [[ "$os_name" = "guix" ]]; then
  42. /run/current-system/profile/libexec/polkit-mate-authentication-agent-1 &
  43. /run/current-system/profile/bin/pulseaudio --start --log-target=syslog &
  44. fi
  45. fi
  46. # Should restore alsa state? alsactl --file ~/.config/asound.state restore|store
  47. # X11 wants to blank the screen out of the box. To prevent, try putting
  48. # xset dpms 0 0 0 && xset s noblank && xset s off