Compare commits
	
		
			3 commits
		
	
	
		
			bca06ca805
			...
			89b9edeff7
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 89b9edeff7 | |||
| 753f6ae659 | |||
| 832bb934c0 | 
					 4 changed files with 36 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -75,6 +75,14 @@ function __rebuild_bashrcd() {
 | 
			
		|||
		source \""""$(readlink -f "$COMPILED_SRC")"""\"
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function __bashrc_reload() {
 | 
			
		||||
	export BASHRC_RELOAD_COUNTER=$((${BASHRC_RELOAD_COUNTER:-0}+1))
 | 
			
		||||
	if [[ $BASHRC_RELOAD_COUNTER -gt 1 ]]; then echo "reload count: $BASHRC_RELOAD_COUNTER"; fi
 | 
			
		||||
	source ~/.bashrc
 | 
			
		||||
}
 | 
			
		||||
alias __bashrc_reload='-reload-bashrc'
 | 
			
		||||
 | 
			
		||||
""" >> $COMPILED_SRC
 | 
			
		||||
 | 
			
		||||
__builder_postbuild_exec
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ if ! which -s python && which -s python3; then
 | 
			
		|||
	alias python=python3
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
function -restart_plasma() {
 | 
			
		||||
function -restart-plasma() {
 | 
			
		||||
	(
 | 
			
		||||
		set -ex
 | 
			
		||||
		plasmashell --replace &>/dev/null &
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								data/rainbow-template.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								data/rainbow-template.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
export PS1="\[\e[01;32m\]\u\[\e[00m\]@\[\e[01;32m\]___ALT_HOSTNAME___"
 | 
			
		||||
export PS1+="\[\e[01;34m\] \w \\$\[\e[00m\] "
 | 
			
		||||
 | 
			
		||||
unset $alt_hostname $COLOR_NORM $ULINE $ULINE_RST $COLOR_RST
 | 
			
		||||
							
								
								
									
										21
									
								
								hostname/rainbow.meta.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								hostname/rainbow.meta.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
export IFS=$'\n'
 | 
			
		||||
 | 
			
		||||
__builder_prebuild() {
 | 
			
		||||
  NAME=$(hostname)
 | 
			
		||||
  OUTPUT_STRING="""$(
 | 
			
		||||
  for (( I=0; I < ${#NAME}; I++)); do
 | 
			
		||||
    printf '\\\[\e[38;5;%dm\\\]%s' $((${RANDOM}%224+8)) "${NAME:$I:1}"
 | 
			
		||||
  done
 | 
			
		||||
  printf '\\\[\e[;10m\\\]'
 | 
			
		||||
  )"""
 | 
			
		||||
  set -x
 | 
			
		||||
  sed 's/___ALT_HOSTNAME___/'${OUTPUT_STRING}'/' data/rainbow-template.sh > tmp-ps1.sh
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__builder_postbuild() {
 | 
			
		||||
	set -x
 | 
			
		||||
	rm tmp-ps1.sh
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue