mirror of
				https://gitlab.com/ceda_ei/wish
				synced 2025-10-31 16:30:05 +01:00 
			
		
		
		
	Add date, hostname, space, username plugins
This commit is contained in:
		
							
								
								
									
										17
									
								
								plugins/date.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								plugins/date.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| function wish_date_start() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_date_end() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_date_set_colors() { | ||||
| 	WISH_DATE_FG=${WISH_DATE_FG:-$WISH_DEFAULT_FG} | ||||
| 	WISH_DATE_BG=${WISH_DATE_BG:-$WISH_DEFAULT_BG} | ||||
| } | ||||
|  | ||||
| function wish_date_main() { | ||||
| 	local date_format=${WISH_DATE_FORMAT:-"%F %T"} | ||||
| 	wish_append $WISH_DATE_BG $WISH_DATE_FG " $(date "+$date_format") " | ||||
| } | ||||
							
								
								
									
										16
									
								
								plugins/hostname.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								plugins/hostname.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| function wish_hostname_start() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_hostname_end() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_hostname_set_colors() { | ||||
| 	WISH_HOSTNAME_FG=${WISH_HOSTNAME_FG:-$WISH_DEFAULT_FG} | ||||
| 	WISH_HOSTNAME_BG=${WISH_HOSTNAME_BG:-$WISH_DEFAULT_BG} | ||||
| } | ||||
|  | ||||
| function wish_hostname_main() { | ||||
| 	wish_append $WISH_HOSTNAME_BG $WISH_HOSTNAME_FG " \h " | ||||
| } | ||||
							
								
								
									
										16
									
								
								plugins/space.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								plugins/space.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| function wish_space_start() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_space_end() { | ||||
| 	return 1 | ||||
| } | ||||
|  | ||||
| function wish_space_set_colors() { | ||||
| 	WISH_SPACE_BG=-1 | ||||
| 	WISH_SPACE_FG=-1 | ||||
| } | ||||
|  | ||||
| function wish_space_main() { | ||||
| 	wish_append -1 -1 " " | ||||
| } | ||||
							
								
								
									
										16
									
								
								plugins/username.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								plugins/username.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| function wish_username_start() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_username_end() { | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| function wish_username_set_colors() { | ||||
| 	WISH_USERNAME_FG=${WISH_USERNAME_FG:-$WISH_DEFAULT_FG} | ||||
| 	WISH_USERNAME_BG=${WISH_USERNAME_BG:-$WISH_DEFAULT_BG} | ||||
| } | ||||
|  | ||||
| function wish_username_main() { | ||||
| 	wish_append $WISH_USERNAME_BG $WISH_USERNAME_FG " \u " | ||||
| } | ||||
		Reference in New Issue
	
	Block a user