mirror of
				https://git.davidovski.xyz/dot.git
				synced 2024-08-15 00:43:28 +00:00 
			
		
		
		
	removed shaders
This commit is contained in:
		
							parent
							
								
									bcdb3419af
								
							
						
					
					
						commit
						74452dfb17
					
				
					 52 changed files with 3 additions and 18006 deletions
				
			
		|  | @ -1,45 +0,0 @@ | |||
| "Script: Pickachu | ||||
| "Version: 0.0.1 | ||||
| "Copyright: Copyright (C) 2018 Doug Beney | ||||
| "Licence:  | ||||
| "Website: https://dougie.io | ||||
| 
 | ||||
| if !has('python3') | ||||
| 	echo "You need Vim Python3 support to use this plugin. If you're using NeoVim, try running `pip3 install neovim` to resolve this issue." | ||||
| endif | ||||
| 
 | ||||
| if !exists('g:pickachu_default_app') | ||||
| 	let g:pickachu_default_app = "color" | ||||
| endif | ||||
| 
 | ||||
| if !exists("g:pickachu_default_command") | ||||
| 	let g:pickachu_default_command = "zenity" | ||||
| endif | ||||
| 
 | ||||
| if !exists("g:pickachu_default_date_format") | ||||
| 	let g:pickachu_default_date_format = "%m/%d/%Y" | ||||
| endif | ||||
| 
 | ||||
| if !exists("g:pickachu_default_color_format") | ||||
| 	let g:pickachu_default_color_format = "hex" | ||||
| endif | ||||
| 
 | ||||
| function! s:pickachuCompletion(ArgLead, CmdLine, CursorPos) | ||||
| 	let options = ['color', 'date', 'file'] | ||||
| 	return options | ||||
| endfunction | ||||
| 
 | ||||
| command! -nargs=* -complete=customlist,<SID>pickachuCompletion Pickachu call Pickachu(<f-args>) | ||||
| 
 | ||||
| python3 import sys | ||||
| python3 import vim | ||||
| python3 sys.path.append(vim.eval('expand("<sfile>:h")')) | ||||
| 
 | ||||
| function! Pickachu(...) | ||||
| python3 << EOF | ||||
| from pickachu.main import MainFunction | ||||
| MainFunction() | ||||
| EOF | ||||
| endfunction | ||||
| 
 | ||||
| " vim: noexpandtab | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -1,68 +0,0 @@ | |||
| import vim | ||||
| import subprocess | ||||
| from . import processors | ||||
| 
 | ||||
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | ||||
| # name:        apps.py | ||||
| # description: this function contains a dictionary object | ||||
| #              where you can easily add new apps with processor | ||||
| #              functions to handle their output. Note: a | ||||
| #              processor is optional. | ||||
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | ||||
| 
 | ||||
| ZENITY_COMMAND = vim.eval("g:pickachu_default_command") | ||||
| # Note: This is not the final date format that displays on | ||||
| #       the users' buffer. This is the format we force | ||||
| #       Zenity/Qarma to provide us. | ||||
| RETURNED_DATE_FORMAT = "%m/%d/%Y" | ||||
| if ZENITY_COMMAND == 'qarma': | ||||
| 	RETURNED_DATE_FORMAT = "MM/dd/yy" | ||||
| 
 | ||||
| apps = { | ||||
| 	'date': { | ||||
| 		'cmd': ZENITY_COMMAND, | ||||
| 		'processor': processors.dateProcessor, | ||||
| 		'options': [ | ||||
| 			'--calendar', | ||||
| 			'--date-format=' + RETURNED_DATE_FORMAT | ||||
| 		] | ||||
| 	}, | ||||
| 	'file': { | ||||
| 		'cmd': ZENITY_COMMAND, | ||||
| 		'options': [ | ||||
|             '--file-selection' | ||||
|         ] | ||||
| 	}, | ||||
| 	'color': { | ||||
| 		'cmd': ZENITY_COMMAND, | ||||
| 		'options': [ | ||||
| 			'--color-selection' | ||||
|     ], | ||||
| 		'processor': processors.colorProcessor | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| def runApp(choosenApp, format=None): | ||||
| 	app = apps.get(choosenApp, None) | ||||
| 	if app: | ||||
| 		output = None | ||||
| 		try: | ||||
| 			command_array = [app['cmd']] | ||||
| 			if app.get('options', False): | ||||
| 				for option in app['options']: | ||||
| 					command_array.append(option) | ||||
| 			# Logging | ||||
| 			command_array.append('2> /tmp/pickachu_log') | ||||
| 			output = subprocess.check_output(command_array).decode('utf-8') | ||||
| 		except: | ||||
| 			return None | ||||
| 
 | ||||
| 		if app.get('processor', None): | ||||
| 			if format: | ||||
| 				return app['processor'](output.rstrip(), format) | ||||
| 			else: | ||||
| 				return app['processor'](output.rstrip()) | ||||
| 		else: | ||||
| 			return output.rstrip() | ||||
| 	else: | ||||
| 		print("App does not exist.") | ||||
|  | @ -1,36 +0,0 @@ | |||
| import vim | ||||
| from . import apps | ||||
| 
 | ||||
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | ||||
| # name:        main.py | ||||
| # description: This file evaluates the command arguments | ||||
| #              provided by the user, calls the runApp function, | ||||
| #              and inserts valid output to the user's buffer. | ||||
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | ||||
| 
 | ||||
| DEFAULT_APP = vim.eval('g:pickachu_default_app') | ||||
| 
 | ||||
| 
 | ||||
| def MainFunction(): | ||||
| 	# This section is for getting the | ||||
| 	# arguments from the user's Vim | ||||
| 	# command. | ||||
| 	arglength = int(vim.eval('a:0')) | ||||
| 	CHOOSEN_APP = DEFAULT_APP | ||||
| 	CHOOSEN_FORMAT = None | ||||
| 	if arglength > 0: | ||||
| 		CHOOSEN_APP = vim.eval('a:1') | ||||
| 	if arglength > 1: | ||||
| 		CHOOSEN_FORMAT = vim.eval('a:2') | ||||
| 
 | ||||
| 	# We run apps.py's runApp function to get an output. | ||||
| 	output = apps.runApp(CHOOSEN_APP, CHOOSEN_FORMAT) | ||||
| 
 | ||||
| 	# Now, if runApp gave us an output, we can use the | ||||
| 	# Vim API to print the output to the user's buffer. | ||||
| 	if output: | ||||
| 		pos_y, pos_x = vim.current.window.cursor | ||||
| 		vim.current.line = vim.current.line[:pos_x+1] + output + vim.current.line[pos_x+1:] | ||||
| 		vim.current.window.cursor = (pos_y, pos_x + len(output)) | ||||
| 	else: | ||||
| 		print('Pickachu - Canceled') | ||||
|  | @ -1,80 +0,0 @@ | |||
| import vim | ||||
| from datetime import datetime | ||||
| 
 | ||||
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | ||||
| # name:				 processors.py | ||||
| # description: this file contains functions that process data | ||||
| #							 from the runapp function (in app.py). | ||||
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | ||||
| 
 | ||||
| DEFAULT_DATE_FORMAT = vim.eval("g:pickachu_default_date_format") | ||||
| DEFAULT_COLOR_FORMAT = vim.eval("g:pickachu_default_color_format") | ||||
| 
 | ||||
| def dateProcessor(input, format=DEFAULT_DATE_FORMAT): | ||||
| 	try: | ||||
| 		dateObj = datetime.strptime(input, '%m/%d/%Y') | ||||
| 	except(ValueError): | ||||
| 		dateObj = datetime.strptime(input, '%m/%d/%y') | ||||
| 	return dateObj.strftime(format) | ||||
| 
 | ||||
| def colorProcessor(input, format=DEFAULT_COLOR_FORMAT): | ||||
| 	# The system color picker returned an rgba value | ||||
| 	if 'rgba' in input: | ||||
| 		strip = input.strip('rgba)(') | ||||
| 		array = strip.split(',') | ||||
| 		# Round the alpha value to two decimal placed | ||||
| 		array[3] = round(float(array[3]), 2) | ||||
| 		rgba_string = "rgba(" | ||||
| 		values = ",".join(str(x) for x in array) | ||||
| 		rgba_string += values + ")" | ||||
| 		return rgba_string | ||||
| 	# The system color picker returned an rgb value | ||||
| 	elif 'rgb' in input: | ||||
| 		# RGB as input | ||||
| 		if format == 'rgb': | ||||
| 			return input | ||||
| 		else: | ||||
| 			# Strip 'rgb' and parenthesis | ||||
| 			strip = input.strip('rgb)(') | ||||
| 			array = strip.split(',') | ||||
| 
 | ||||
| 			if format == 'hex': | ||||
| 				hex = '#%02x%02x%02x' % (int(array[0]), int(array[1]), int(array[2])) | ||||
| 				return hex.upper() | ||||
| 			elif format == 'rgba': | ||||
| 				rgba_string = "rgba(" | ||||
| 				array.append(1) | ||||
| 				values = ",".join(str(x) for x in array) | ||||
| 				rgba_string += values + ")" | ||||
| 				return rgba_string | ||||
| 		return array | ||||
| 	# The system olor picker returned a hex | ||||
| 	elif '#' in input: | ||||
| 		# If there is a '#' in input, | ||||
| 		# they are most likely using Qarma instead of Zenity | ||||
| 		# or any other program that outputs hex | ||||
| 		if format == 'hex': | ||||
| 			return input | ||||
| 		else: | ||||
| 			hex = input.lstrip('#') | ||||
| 			rgb_array = tuple(int(hex[i:i+2], 16) for i in (0, 2 ,4)) | ||||
| 
 | ||||
| 			if format == 'rgb': | ||||
| 				rgb_string = "rgb(" | ||||
| 				for i in range(0, len(rgb_array)): | ||||
| 					rgb_string += str(rgb_array[i]) | ||||
| 					if i < len(rgb_array) - 1: | ||||
| 						rgb_string += ", " | ||||
| 					else: | ||||
| 						rgb_string += ")" | ||||
| 				return rgb_string | ||||
| 			elif format == 'rgba': | ||||
| 				rgba_string = "rgba(" | ||||
| 				for i in range(0, len(rgb_array)): | ||||
| 					rgba_string += str(rgb_array[i]) | ||||
| 					if i < len(rgb_array) - 1: | ||||
| 						rgba_string += ", " | ||||
| 					else: | ||||
| 						rgba_string += ", 1)" | ||||
| 				return rgba_string | ||||
| 	return None | ||||
|  | @ -1,13 +0,0 @@ | |||
| "============================================================================== | ||||
| "  Description: Rainbow colors for parentheses, based on rainbow_parenthsis.vim | ||||
| "               by Martin Krischik and others. | ||||
| "============================================================================== | ||||
| "  GetLatestVimScripts: 3772 1 :AutoInstall: rainbow_parentheses.zip | ||||
| 
 | ||||
| com! RainbowParenthesesToggle       cal rainbow_parentheses#toggle() | ||||
| com! RainbowParenthesesToggleAll    cal rainbow_parentheses#toggleall() | ||||
| com! RainbowParenthesesActivate     cal rainbow_parentheses#activate() | ||||
| com! RainbowParenthesesLoadRound    cal rainbow_parentheses#load(0) | ||||
| com! RainbowParenthesesLoadSquare   cal rainbow_parentheses#load(1) | ||||
| com! RainbowParenthesesLoadBraces   cal rainbow_parentheses#load(2) | ||||
| com! RainbowParenthesesLoadChevrons cal rainbow_parentheses#load(3) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue