mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 01:16:35 +00:00 
			
		
		
		
	Merge branch 'arch' into gentoo
This commit is contained in:
		
						commit
						1119a0b309
					
				
					 1 changed files with 24 additions and 0 deletions
				
			
		
							
								
								
									
										24
									
								
								home/.local/bin/scripts/lfu
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										24
									
								
								home/.local/bin/scripts/lfu
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
if [ -n "$DISPLAY" ]; then
 | 
			
		||||
  export FIFO_UEBERZUG="${TMPDIR:-/tmp}/lf-ueberzug-$$"
 | 
			
		||||
 | 
			
		||||
  cleanup() {
 | 
			
		||||
    exec 3>&-
 | 
			
		||||
    rm "$FIFO_UEBERZUG"
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  mkfifo "$FIFO_UEBERZUG"
 | 
			
		||||
  ueberzug layer -s <"$FIFO_UEBERZUG" &
 | 
			
		||||
  exec 3>"$FIFO_UEBERZUG"
 | 
			
		||||
  trap cleanup EXIT
 | 
			
		||||
 | 
			
		||||
  if ! [ -d "$HOME/.cache/lf" ]; then
 | 
			
		||||
    mkdir -p "$HOME/.cache/lf"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  lf "$@" 3>&-
 | 
			
		||||
else
 | 
			
		||||
  exec lf "$@"
 | 
			
		||||
fi
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue