6 ## We live in a unicode world now
11 # The wrappers directory must be the first entry in the PATH, and
12 # /tools/bin should be last.
14 # Once you are no longer needing or using the tools dir you can remove
16 #PATH=/usr/lib/pkgusr:/usr/bin:/usr/X11R6/bin:/opt/qt/bin:/tools/bin
17 PATH=/usr/lib/pkgusr:/usr/bin:/usr/X11R6/bin:/opt/qt/bin
19 ## A couple things to make less(1) nicer.
20 LESS='-FgiMrswX --use-color'
22 LESSOPEN='|lesspipe.sh %s'
24 ## Timezone -- set to your local zone
25 TZ='Australia/Brisbane'
31 _XORG=/usr/X11R6/lib/pkgconfig:/usr/X11R6/share/pkgconfig
32 _KDE=/opt/kde/lib/pkgconfig
33 _QT=${QTDIR}/lib/pkgconfig
34 _PKGCFG=$(pkg-config --variable pc_path pkg-config)
35 PKG_CONFIG_PATH=${_PKGCFG}:${_XORG}:${_KDE}:${_QT}
38 unset _XORG _KDE _QT _PKGCFG
40 ## Locale directory suppression.
41 # If this is set to `1' (one) then the install and mkdir wrappers
42 # won't put anything in /usr/share/locale. Technically, the mkdir
43 # wrapper still creates the dir, but it is removed afterward. If
44 # you want to override this behaviour globally, set this to `0'
45 # (zero) here, or you can override an individual package by adding
46 # `SUPPRESSLOCALEDIR=0' to that pkgusr's ~/.pkgusrrc.
48 # See the comments in the install wrapper for more detail and
52 ## Build script update checks
53 # If this is set to `1' (one) a check is done to see if there is a
54 # newer build script available that the pkgusr could update to. If an
55 # update is available a message is printed to stdout with instructions
58 # Override this in ~/.pkgusrrc.
61 ## Slackware PKG local repo
62 # Having a shortcut to a local Slackware PKG repo is very useful.
63 # Pat Volkerding and his team are of a minority who actually know
64 # what they are doing. I always check Slackware for patches.
66 # I get the Slack source via rsync.
67 # See https://mirrors.slackware.com/mirrorlist/
69 SLACKPKG=/home/steve/download/Slackware/slackware64-current/source
70 # Obviously edit to suit your situation
73 export LANG LC_CTYPE PATH LESS LESSCHARSET LESSOPEN TZ PKG_CONFIG_PATH QTDIR
74 export SUPPRESSLOCALEDIR CHECKUPDATES SLACKPKG
77 # Shell prompts are not just eye-candy they should show what you need
78 # to know most and they should do it in such a way that you don't
79 # even notice. This sets up a two-line prompt that reminds you that
80 # you're currently logged in as a pkgusr, which pkgusr, which group
81 # if that pkgusr has multiple groups and you've newgrp'd, if you're
82 # inside a git repo display the branch and other pertinent info, if
83 # the previous command had a non-zero exit display the code, display
84 # the current time, and current working directory (truncated to
85 # prevent "prompt-creep"). Colourised so that often you won't even
86 # need to read it to take in the info.
88 # Colours (doesn't include black (30))
89 CO="\[\e[0m\]" # Colour Off
90 RED="\[\e[0;31m\]" # Red
91 GRN="\[\e[0;32m\]" # Green
92 YEL="\[\e[0;33m\]" # Yellow
93 BLU="\[\e[0;34m\]" # Blue
94 MAG="\[\e[0;35m\]" # Magenta
95 CYN="\[\e[0;36m\]" # Cyan
96 WTE="\[\e[0;37m\]" # White
98 BRED="\[\e[1;31m\]" # Bold Red
99 BGRN="\[\e[1;32m\]" # Bold Green
100 BYEL="\[\e[1;33m\]" # Bold Yellow
101 BBLU="\[\e[1;34m\]" # Bold Blue
102 BMAG="\[\e[1;35m\]" # Bold Magenta
103 BCYN="\[\e[1;36m\]" # Bold Cyan
104 BWTE="\[\e[1;37m\]" # Bold White
106 # Some pkgusrs may use extra groups so the prompt should reflect that.
107 # This function adds the group name to the prompt if necessary.
110 [[ $(id -gn) != $(id -un) ]] && echo "$WTE:$CYN$(id -gn)"
113 # This function, called from $PROMPT_COMMAND, puts all the pieces of
114 # the prompt together.
117 rc=$? # Return code from previous cmd
118 [[ $rc -gt 0 ]] && prc="$BWTE[$BRED$rc$BWTE] " || prc=
126 [[ -f /etc/pkgusr/git-prompt ]] && gitp=$(__git_ps1) || gitp=
131 PS1="$BWTE[$WTE$p $BWTE($CYN\u$sg$BWTE)]" # [pkgusr (usr:grp)]
132 PS1+="$CO" # reset to not mess up git prompt
133 PS1+="$gitp" # (gitstuff)
134 PS1+="\n$prc$BYEL\A$WTE:$BMAG\w$BWTE>$CO " # [rc]TIME:CWD>
138 [[ -f /etc/pkgusr/git-prompt ]] && source /etc/pkgusr/git-prompt
139 GIT_PS1_SHOWDIRTYSTATE=true
140 GIT_PS1_SHOWSTASHSTATE=true
141 GIT_PS1_SHOWUNTRACKEDFILES=true
142 GIT_PS1_SHOWUPSTREAM=auto
143 GIT_PS1_DESCRIBE_STYLE=branch
144 GIT_PS1_SHOWCOLORHINTS=true
146 # So the prompt doesn't fly off the right-hand edge of the screen
147 # when you're down a long directory tree.
150 # Finally, make the prompt happen!
151 PROMPT_COMMAND=make_prompt
154 ## Pretty colours for ls
156 alias ls='ls --color=always -Fb'
158 ## Suck in some handy shell functions
159 . /etc/pkgusr/handy_funcs
161 ## Go to the home directory whenever we su to a package user.
164 ## Setup the git config if needed
165 if [[ ! -d ${HOME}/.config/git && -f ${HOME}/.gitconfig ]]; then
170 if [ -f /usr/share/bash-completion/bash_completion ]; then
171 . /usr/share/bash-completion/bash_completion
175 # Called last so that defaults can be overridden.
176 [[ -f ${HOME}/.pkgusrrc ]] && . ${HOME}/.pkgusrrc
178 ###===============================================================###
179 # Don't put anything below here unless it relies on something being #
180 # set in ~/.pkgusrrc #
181 ###===============================================================###
183 # Maybe check if the build script can be updated, but not on dumb
184 # terms so that TRAMP still works.
185 if [ ${CHECKUPDATES} -eq 1 -a "$TERM" != "dumb" ]; then