mirror of
https://github.com/kastdeur/dotfiles.git
synced 2025-06-18 05:06:38 +02:00
Compare commits
No commits in common. "1865e661ce4e993edcf8477128ddc0437dff8487" and "b62b55e417c899265b931c4080653e08f926c881" have entirely different histories.
1865e661ce
...
b62b55e417
2 changed files with 14 additions and 48 deletions
|
@ -52,51 +52,6 @@ function vte_thing() {
|
||||||
|
|
||||||
export PROMPT_COMMAND=__prompt_command
|
export PROMPT_COMMAND=__prompt_command
|
||||||
|
|
||||||
function __colored_hostname() {
|
|
||||||
local HOST="${1:-$HOSTNAME}"
|
|
||||||
local color="${2:-$(color)}"
|
|
||||||
local PS1
|
|
||||||
|
|
||||||
if color ; then
|
|
||||||
case "${HOSTNAME%%.*}" in
|
|
||||||
'esson') PS1+="${IGre}\h${RCol}";;
|
|
||||||
'tinsmith') PS1+="${Gre}\h${RCol}";;
|
|
||||||
'blacksmith') PS1+="${Blu}\h${RCol}";;
|
|
||||||
'locksmith') PS1+="${Pur}\h${RCol}";;
|
|
||||||
'bladesmith') PS1+="${Yel}\h${RCol}";;
|
|
||||||
'gunsmith') PS1+="${Red}\h${RCol}";;
|
|
||||||
'goldsmith') PS1+="${IYel}\h${RCol}";;
|
|
||||||
'lilo'*) PS1+="${BWhi}\h${RCol}";;
|
|
||||||
'hg'*) PS1+="${BRed}\h${RCol}";;
|
|
||||||
'gouda'|'bunnik'|'houten'|'zandberg'|'bussum'|'baarn') PS1+="${Gre}${On_Whi}HEF:${Blu}${On_Whi}\h${RCol}";;
|
|
||||||
'messier'*) PS1+="${Blu}Astro:${Red}\h${RCol}";;
|
|
||||||
*) PS1+="${Blu}${On_Whi}\h${RCol}";;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
PS1+="\h"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$PS1"
|
|
||||||
}
|
|
||||||
|
|
||||||
function __colored_username() {
|
|
||||||
local USER="${1:-$USER}"
|
|
||||||
local color="${2:-$(color)}"
|
|
||||||
local PS1
|
|
||||||
|
|
||||||
if color ; then
|
|
||||||
case "${USER}" in
|
|
||||||
'root') PS1+="${Red}\u${RCol}";;
|
|
||||||
'kastdeur'|'ericteunis') PS1+="${Gre}\u${RCol}";;
|
|
||||||
*) PS1+="${Blu}\u${RCol}";;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
PS1+="\u"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$PS1"
|
|
||||||
}
|
|
||||||
|
|
||||||
function __prompt_command() {
|
function __prompt_command() {
|
||||||
local RETVAL=$?
|
local RETVAL=$?
|
||||||
if [ ! $RETVAL -ne 0 ]; then
|
if [ ! $RETVAL -ne 0 ]; then
|
||||||
|
@ -123,7 +78,7 @@ function __prompt_command() {
|
||||||
|
|
||||||
#user@hostname
|
#user@hostname
|
||||||
if color ; then
|
if color ; then
|
||||||
PS1+="$(__colored_username)"
|
PS1+="${Gre}\u${RCol}"
|
||||||
else
|
else
|
||||||
PS1+="\u"
|
PS1+="\u"
|
||||||
fi
|
fi
|
||||||
|
@ -131,7 +86,18 @@ function __prompt_command() {
|
||||||
PS1+="@"
|
PS1+="@"
|
||||||
|
|
||||||
if color ; then
|
if color ; then
|
||||||
PS1+="$(__colored_hostname)"
|
case "${HOSTNAME%%.*}" in
|
||||||
|
'esson') PS1+="${IGre}\h${RCol}";;
|
||||||
|
'tinsmith') PS1+="${Gre}\h${RCol}";;
|
||||||
|
'blacksmith') PS1+="${Blu}\h${RCol}";;
|
||||||
|
'locksmith') PS1+="${Pur}\h${RCol}";;
|
||||||
|
'gunsmith') PS1+="${Red}\h${RCol}";;
|
||||||
|
'lilo'*) PS1+="${BWhi}\h${RCol}";;
|
||||||
|
'hg'*) PS1+="${BRed}\h${RCol}";;
|
||||||
|
'gouda'|'bunnik'|'houten'|'zandberg'|'bussum'|'baarn') PS1+="${Gre}${On_Whi}HEF:${Blu}${On_Whi}\h${RCol}";;
|
||||||
|
'messier'*) PS1+="${Blu}Astro:${Red}\h${RCol}";;
|
||||||
|
*) PS1+="${Blu}${On_Whi}\h${RCol}";;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
PS1+="\h"
|
PS1+="\h"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -66,7 +66,7 @@ font-4 = fixed:pixelsize=10;1
|
||||||
;wm-restack = bspwm
|
;wm-restack = bspwm
|
||||||
;wm-restack = i3
|
;wm-restack = i3
|
||||||
|
|
||||||
override-redirect = false
|
override-redirect = true
|
||||||
|
|
||||||
;scroll-up = bspwm-desknext
|
;scroll-up = bspwm-desknext
|
||||||
;scroll-down = bspwm-deskprev
|
;scroll-down = bspwm-deskprev
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue