mirror of
				https://gitlab.com/ceda_ei/wish
				synced 2025-11-04 09:30:04 +01:00 
			
		
		
		
	Add dummy plugin, plain theme, allow plugins to override themes
This commit is contained in:
		
							
								
								
									
										26
									
								
								plugins/dummy.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								plugins/dummy.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
function wish_dummy_start() {
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function wish_dummy_end() {
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function wish_dummy_set_colors() {
 | 
			
		||||
	WISH_DUMMY_FG=${WISH_DUMMY_FG:-$WISH_DEFAULT_FG}
 | 
			
		||||
	WISH_DUMMY_BG=${WISH_DUMMY_BG:-$WISH_DEFAULT_BG}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function wish_dummy_main() {
 | 
			
		||||
	if [[ $fg -eq -1 ]]; then
 | 
			
		||||
		local fg="\[\033[0;5;0m\]"
 | 
			
		||||
	else
 | 
			
		||||
		local fg="\[\033[38;5;${WISH_DUMMY_FG}m\]"
 | 
			
		||||
	fi
 | 
			
		||||
	if [[ $bg -eq -1 ]]; then
 | 
			
		||||
		local bg="\[\033[0;5;0m\]"
 | 
			
		||||
	else
 | 
			
		||||
		local bg="\[\033[48;5;${WISH_DUMMY_BG}m\]"
 | 
			
		||||
	fi
 | 
			
		||||
	PS1="$PS1$bg${fg}dummy"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										2
									
								
								themes/plain.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								themes/plain.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
WISH_DEFAULT_BG=-1
 | 
			
		||||
WISH_DEFAULT_FG=-1
 | 
			
		||||
		Reference in New Issue
	
	Block a user