mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-11-03 22:11:16 +01:00 
			
		
		
		
	statusbar: fixed memory padding error
This commit is contained in:
		@@ -2,8 +2,5 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
icon="^b#282828^^c#dfdfdf^  ^d^ "
 | 
					icon="^b#282828^^c#dfdfdf^  ^d^ "
 | 
				
			||||||
total=$(free -h | awk '/^Mem:/ {print  $3/$2}')
 | 
					total=$(free -h | awk '/^Mem:/ {print  $3/$2}')
 | 
				
			||||||
percent=$(printf %-4s $total | tr ' ' '0')
 | 
					percent=$(printf %3s $(printf %-4s $total | tr ' ' '0' | cut -c1-4 | sed -e 's/\.//g' | sed -e 's/^0//g') | tr ' ' ' ')%
 | 
				
			||||||
percent=$(echo $percent | sed -e 's/^0//g')
 | 
					echo "$icon$percent"
 | 
				
			||||||
percent=$(echo $percent | sed -e 's/\.//g')
 | 
					 | 
				
			||||||
percent=$(printf %3s $(echo $percent | cut -c1-2) | tr ' ' ' ')%
 | 
					 | 
				
			||||||
echo "$icon $percent"
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user