Updated config comments for theme locations and added check for correct paths
							parent
							
								
									190814200c
								
							
						
					
					
						commit
						a21fac6b84
					
				
							
								
								
									
										12
									
								
								README.md
								
								
								
								
							
							
						
						
									
										12
									
								
								README.md
								
								
								
								
							| 
						 | 
				
			
			@ -295,21 +295,25 @@ Config files stored in "$HOME/.config/bashtop" folder
 | 
			
		|||
#### bashtop.cfg: (auto generated if not found)
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
#? Config file for bashtop v. 0.9.9
 | 
			
		||||
#? Config file for bashtop v. 0.9.21
 | 
			
		||||
 | 
			
		||||
#* Color theme, looks for a .theme file in "$HOME/.config/bashtop/themes" and "$HOME/.config/bashtop/user_themes", "Default" for builtin default theme
 | 
			
		||||
#* Color theme, looks for a .theme file in "$HOME/.config/bashtop/themes" and "$HOME/.config/bashtop/user_themes"
 | 
			
		||||
#* Should be prefixed with either "themes/" or "user_themes/" depending on location, "Default" for builtin default theme
 | 
			
		||||
color_theme="Default"
 | 
			
		||||
 | 
			
		||||
#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs
 | 
			
		||||
update_ms="2500"
 | 
			
		||||
 | 
			
		||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive" "tree"
 | 
			
		||||
#* "cpu lazy" updates sorting over time, "cpu responsive" updates sorting directly at a cpu usage cost
 | 
			
		||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive"
 | 
			
		||||
#* "cpu lazy" updates sorting over time, "cpu responsive" updates sorting directly
 | 
			
		||||
proc_sorting="cpu lazy"
 | 
			
		||||
 | 
			
		||||
#* Reverse sorting order, "true" or "false"
 | 
			
		||||
proc_reversed="false"
 | 
			
		||||
 | 
			
		||||
#* Show processes as a tree
 | 
			
		||||
proc_tree="false"
 | 
			
		||||
 | 
			
		||||
#* Check cpu temperature, only works if "sensors", "vcgencmd" or "osx-cpu-temp" commands is available
 | 
			
		||||
check_temp="true"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										5
									
								
								bashtop
								
								
								
								
							
							
						
						
									
										5
									
								
								bashtop
								
								
								
								
							| 
						 | 
				
			
			@ -122,7 +122,8 @@ read tty_height tty_width < <(${stty} size)
 | 
			
		|||
#? Any changes made here will be ignored if config file exists
 | 
			
		||||
aaa_config() { : ; } #! Do not remove this line!
 | 
			
		||||
 | 
			
		||||
#* Color theme, looks for a .theme file in "$HOME/.config/bashtop/themes" and "$HOME/.config/bashtop/user_themes", "Default" for builtin default theme
 | 
			
		||||
#* Color theme, looks for a .theme file in "$HOME/.config/bashtop/themes" and "$HOME/.config/bashtop/user_themes"
 | 
			
		||||
#* Should be prefixed with either "themes/" or "user_themes/" depending on location, "Default" for builtin default theme
 | 
			
		||||
color_theme="Default"
 | 
			
		||||
 | 
			
		||||
#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs
 | 
			
		||||
| 
						 | 
				
			
			@ -492,7 +493,7 @@ color_init_() { #? Check for theme file and set colors
 | 
			
		|||
	done
 | 
			
		||||
 | 
			
		||||
	#* Check if theme set in config exists and source it if it does
 | 
			
		||||
	if [[ -n ${color_theme} && ${color_theme} != "Default" && -e "${config_dir}/${color_theme%.theme}.theme" ]]; then
 | 
			
		||||
	if [[ -n ${color_theme} && ${color_theme} != "Default" && ${color_theme} =~ (themes/)|(user_themes/) && -e "${config_dir}/${color_theme%.theme}.theme" ]]; then
 | 
			
		||||
		# shellcheck source=/dev/null
 | 
			
		||||
		source "${config_dir}/${color_theme%.theme}.theme"
 | 
			
		||||
		sourced=1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue