mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 09:16:36 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Desktop File
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Desktop File
		
	
	
	
	
	
[Unit]
 | 
						|
Description=Clipboard history "manager" for Wayland
 | 
						|
After=graphical-session.target
 | 
						|
PartOf=graphical-session.target
 | 
						|
 | 
						|
[Service]
 | 
						|
Type=simple
 | 
						|
ExecStart=/usr/bin/wl-paste --watch /usr/bin/cliphist -max-items 10 store
 | 
						|
Restart=on-failure
 | 
						|
 | 
						|
# Use the background slice rather than the session slice. Cliphist isn't
 | 
						|
# a fundamental part of the graphical session experience.
 | 
						|
Slice=background-graphical.slice
 | 
						|
 | 
						|
CPUQuota=2%
 | 
						|
 | 
						|
# Cliphist allows storng up to 5 MB per item entries, with 10 entries
 | 
						|
# limit, this means 50 MB. Annoyingly, it seems to load all entries
 | 
						|
# even when it's just writing a single new one (during `cliphist store`), 
 | 
						|
# so we need to account for this. See: 
 | 
						|
# https://github.com/sentriz/cliphist/issues/155 to understand
 | 
						|
#
 | 
						|
# If the above issue gets addressed, these limits can likely be lowered.
 | 
						|
MemoryHigh=60M
 | 
						|
MemoryMax=120M
 | 
						|
 | 
						|
# Because of the issue above, significantly increase the likelihood of 
 | 
						|
# this process getting terminated during OOM I don't really care that
 | 
						|
# much about a clipboard manager staying up anyways.
 | 
						|
OOMScoreAdjust=300
 | 
						|
 | 
						|
 | 
						|
[Install]
 | 
						|
WantedBy=graphical-session.target
 |