Add import-env to repo
This commit is contained in:
		
							parent
							
								
									283d26d831
								
							
						
					
					
						commit
						2de8087c3e
					
				
					 3 changed files with 8 additions and 2 deletions
				
			
		
							
								
								
									
										6
									
								
								import-env.zsh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								import-env.zsh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| import-env() { | ||||
| 	SOURCE_PROCESS=$1 | ||||
| 	SOURCE_PID=$(pgrep $SOURCE_PROCESS | head -n 1) | ||||
| 	SOURCE_ENV=("${(@ps:\000:)$(</proc/${SOURCE_PID}/environ)}") | ||||
| 	export ${SOURCE_ENV[@]:#} | ||||
| } | ||||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/zsh | ||||
| source import-env.zsh | ||||
| source ${0:a:h:h}/import-env.zsh | ||||
| import-env awesome | ||||
| exec picom | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #!/bin/zsh | ||||
| source import-env.zsh | ||||
| source ${0:a:h:h}/import-env.zsh | ||||
| import-env awesome | ||||
| exec xss-lock -l -- xsecurelock-wrapper 2>&1 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 crater2150
						crater2150