mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-10-30 23:56:35 +00:00 
			
		
		
		
	Add script to quickly run arbitrary python code with dmenu
This commit is contained in:
		
							parent
							
								
									977eb985fc
								
							
						
					
					
						commit
						ca0c26b79e
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		
							
								
								
									
										8
									
								
								home/.local/bin/scripts/gui/dmenu/pyrun
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								home/.local/bin/scripts/gui/dmenu/pyrun
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | #!/bin/sh | ||||||
|  | 
 | ||||||
|  | # Simple wrapper to quickly execute a simple python command and have it printed out. | ||||||
|  | # The output is then sent back via notification. | ||||||
|  | # | ||||||
|  | # This already has random imported, since that's a common use-case for this script. | ||||||
|  | 
 | ||||||
|  | echo "" | dmenu -i -p "Python" | xargs -0 -I % python -c "import random;print(%)" | xargs -I % notify-send "Pyrun output:" "%" | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue