Fix zsh config inclusion
This commit is contained in:
		
							
								
								
									
										39
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| # emotty plugin | ||||
|  | ||||
| This plugin returns an emoji for the current $TTY number so it can be used | ||||
| in a prompt. | ||||
|  | ||||
| To use it, add emotty to the plugins array in your zshrc file: | ||||
| ``` | ||||
| plugins=(... emotty) | ||||
| ``` | ||||
|  | ||||
| **NOTE:** it requires the [emoji plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/emoji). | ||||
|  | ||||
| ## Usage | ||||
|  | ||||
| The function `emotty` displays an emoji from the current character set (default: `emoji`), based | ||||
| on the number associated to the `$TTY`. | ||||
|  | ||||
| There are different sets of emoji characters available, to choose a different | ||||
| set, set `$emotty_set` to the name of the set you would like to use, e.g.: | ||||
| ``` | ||||
| emotty_set=nature | ||||
| ``` | ||||
|  | ||||
| ### Character Sets | ||||
|  | ||||
| - emoji | ||||
| - loral | ||||
| - love | ||||
| - nature | ||||
| - stellar | ||||
| - zodiac | ||||
|  | ||||
| Use the `display_emotty` function to list the emojis in the current character set, or | ||||
| the character set passed as the first argument. For example: | ||||
|  | ||||
| ``` | ||||
| $ display_emotty zodiac | ||||
| <list of all the emojis in the zodiac character set> | ||||
| ``` | ||||
							
								
								
									
										50
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty.plugin.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty.plugin.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| # ------------------------------------------------------------------------------ | ||||
| #          FILE: emotty.plugin.zsh | ||||
| #   DESCRIPTION: Return an emoji for the current $TTY number. | ||||
| #        AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) | ||||
| #       VERSION: 1.0.0 | ||||
| #       DEPENDS: emoji plugin | ||||
| #        | ||||
| # There are different sets of emoji characters available, to choose a different | ||||
| # set export emotty_set to the name of the set you would like to use, e.g.: | ||||
| # % export emotty_set=nature | ||||
| # ------------------------------------------------------------------------------ | ||||
|  | ||||
| typeset -gAH _emotty_sets | ||||
| local _emotty_plugin_dir="${0:h}" | ||||
| source "$_emotty_plugin_dir/emotty_stellar_set.zsh" | ||||
| source "$_emotty_plugin_dir/emotty_floral_set.zsh" | ||||
| source "$_emotty_plugin_dir/emotty_zodiac_set.zsh" | ||||
| source "$_emotty_plugin_dir/emotty_nature_set.zsh" | ||||
| source "$_emotty_plugin_dir/emotty_emoji_set.zsh" | ||||
| source "$_emotty_plugin_dir/emotty_love_set.zsh" | ||||
| unset _emotty_plugin_dir | ||||
|  | ||||
| emotty_default_set=emoji | ||||
|  | ||||
| function emotty() { | ||||
|   # Use emotty set defined by user, fallback to default | ||||
|   local emotty=${_emotty_sets[${emotty_set:-$emotty_default_set}]} | ||||
|  | ||||
|   # Parse tty number via prompt expansion. %l equals: | ||||
|   # - N      if tty = /dev/ttyN | ||||
|   # - pts/N  if tty = /dev/pts/N | ||||
|   local tty = ${${(%):-%l}##pts/} | ||||
|   # Normalize it to an emotty set index | ||||
|   (( tty = (tty % ${#${=emotty}}) + 1 )) | ||||
|  | ||||
|   local character_name=${${=emotty}[tty]} | ||||
|   echo "${emoji[${character_name}]}${emoji2[emoji_style]}" | ||||
| } | ||||
|  | ||||
| function display_emotty() { | ||||
|   local name=${1:-$emotty_set} | ||||
|   echo $name | ||||
|   for i in ${=_emotty_sets[$name]}; do | ||||
|     printf "${emoji[$i]}${emoji2[emoji_style]}  " | ||||
|   done | ||||
|   print | ||||
|   for i in ${=_emotty_sets[$name]}; do | ||||
|     print "${emoji[$i]}${emoji2[emoji_style]}  = $i" | ||||
|   done | ||||
| } | ||||
							
								
								
									
										24
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_emoji_set.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_emoji_set.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| #!/usr/bin/env zsh | ||||
| # vim:ft=zsh ts=2 sw=2 sts=2 | ||||
|  | ||||
| _emotty_sets[emoji]=" | ||||
|   crystal_ball | ||||
|   ghost | ||||
|   jack_o_lantern | ||||
|   see_no_evil_monkey | ||||
|   hear_no_evil_monkey | ||||
|   speak_no_evil_monkey | ||||
|   smiling_cat_face_with_open_mouth | ||||
|   extraterrestrial_alien | ||||
|   rocket | ||||
|   billiards | ||||
|   bomb | ||||
|   pill | ||||
|   japanese_symbol_for_beginner | ||||
|   direct_hit | ||||
|   cyclone | ||||
|   diamond_shape_with_a_dot_inside | ||||
|   sparkle | ||||
|   eight_spoked_asterisk | ||||
|   eight_pointed_black_star | ||||
|   " | ||||
							
								
								
									
										18
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_floral_set.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_floral_set.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| #!/usr/bin/env zsh | ||||
| # vim:ft=zsh ts=2 sw=2 sts=2 | ||||
|  | ||||
| _emotty_sets[floral]=" | ||||
|   hibiscus | ||||
|   cherry_blossom | ||||
|   blossom | ||||
|   sunflower | ||||
|   bouquet | ||||
|   tulip | ||||
|   rose | ||||
|   four_leaf_clover | ||||
|   seedling | ||||
|   herb | ||||
|   palm_tree | ||||
|   evergreen_tree | ||||
|   deciduous_tree | ||||
|   " | ||||
							
								
								
									
										34
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_love_set.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_love_set.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| #!/usr/bin/env zsh | ||||
| # vim:ft=zsh ts=2 sw=2 sts=2 | ||||
|  | ||||
| # Note: The heavy_black_heart emoji requires $emoji2[emoji_style] | ||||
| # to be rendered as the emoji red heart. | ||||
| _emotty_sets[love]=" | ||||
|   green_heart | ||||
|   blue_heart | ||||
|   purple_heart | ||||
|   yellow_heart | ||||
|   heavy_black_heart | ||||
|   broken_heart | ||||
|   heart_with_arrow | ||||
|   heart_with_ribbon | ||||
|   sparkling_heart | ||||
|   two_hearts | ||||
|   revolving_hearts | ||||
|   growing_heart | ||||
|   beating_heart | ||||
|   heart_decoration | ||||
|   couple_with_heart | ||||
|   kiss | ||||
|   man_and_woman_holding_hands | ||||
|   two_women_holding_hands | ||||
|   two_men_holding_hands | ||||
|   kiss_mark | ||||
|   smiling_face_with_heart_shaped_eyes | ||||
|   kissing_face | ||||
|   face_throwing_a_kiss | ||||
|   kissing_face_with_smiling_eyes | ||||
|   kissing_face_with_closed_eyes | ||||
|   smiling_cat_face_with_heart_shaped_eyes | ||||
|   kissing_cat_face_with_closed_eyes | ||||
|   " | ||||
							
								
								
									
										58
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_nature_set.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_nature_set.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,58 @@ | ||||
| #!/usr/bin/env zsh | ||||
| # vim:ft=zsh ts=2 sw=2 sts=2 | ||||
|  | ||||
| _emotty_sets[nature]=" | ||||
|   mouse_face | ||||
|   hamster_face | ||||
|   rabbit_face | ||||
|   dog_face | ||||
|   cat_face | ||||
|   tiger_face | ||||
|   bear_face | ||||
|   monkey_face | ||||
|   koala | ||||
|   panda_face | ||||
|   chicken | ||||
|   baby_chick | ||||
|   bird | ||||
|   penguin | ||||
|   cow_face | ||||
|   pig_face | ||||
|   frog_face | ||||
|   boar | ||||
|   wolf_face | ||||
|   horse_face | ||||
|   snail | ||||
|   bug | ||||
|   ant | ||||
|   honeybee | ||||
|   lady_beetle | ||||
|   spouting_whale | ||||
|   dolphin | ||||
|   octopus | ||||
|   fish | ||||
|   tropical_fish | ||||
|   snake | ||||
|   turtle | ||||
|   lemon | ||||
|   tangerine | ||||
|   peach | ||||
|   mushroom | ||||
|   tomato | ||||
|   strawberry | ||||
|   red_apple | ||||
|   cherries | ||||
|   grapes | ||||
|   aubergine | ||||
|   watermelon | ||||
|   banana | ||||
|   pineapple | ||||
|   melon | ||||
|   pear | ||||
|   green_apple | ||||
|   ear_of_maize | ||||
|   sunflower | ||||
|   seedling | ||||
|   herb | ||||
|   four_leaf_clover | ||||
|   " | ||||
							
								
								
									
										25
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_stellar_set.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_stellar_set.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| #!/usr/bin/env zsh | ||||
| # vim:ft=zsh ts=2 sw=2 sts=2 | ||||
|  | ||||
| # NOTE: The following emoji show as $'character' in the title | ||||
| #  white_medium_star | ||||
| #  sparkles | ||||
| #  dizzy_symbol | ||||
|  | ||||
| _emotty_sets[stellar]=" | ||||
|   full_moon_symbol | ||||
|   waning_gibbous_moon_symbol | ||||
|   waning_crescent_moon_symbol | ||||
|   last_quarter_moon_symbol | ||||
|   new_moon_symbol | ||||
|   new_moon_with_face | ||||
|   waxing_crescent_moon_symbol | ||||
|   first_quarter_moon_symbol | ||||
|   waxing_gibbous_moon_symbol | ||||
|   full_moon_with_face | ||||
|   sun_with_face | ||||
|   glowing_star | ||||
|   crescent_moon | ||||
|   first_quarter_moon_with_face | ||||
|   last_quarter_moon_with_face | ||||
|   " | ||||
							
								
								
									
										29
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_zodiac_set.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								zsh/.oh-my-zsh_old/plugins/emotty/emotty_zodiac_set.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env zsh | ||||
| # vim:ft=zsh ts=2 sw=2 sts=2 | ||||
|  | ||||
| _emotty_sets[zodiac]=" | ||||
|   aries | ||||
|   taurus | ||||
|   gemini | ||||
|   cancer | ||||
|   leo | ||||
|   virgo | ||||
|   libra | ||||
|   scorpius | ||||
|   sagittarius | ||||
|   capricorn | ||||
|   aquarius | ||||
|   pisces | ||||
|   rat | ||||
|   ox | ||||
|   tiger | ||||
|   rabbit | ||||
|   dragon | ||||
|   snake | ||||
|   horse | ||||
|   goat | ||||
|   monkey | ||||
|   rooster | ||||
|   dog | ||||
|   pig | ||||
|   " | ||||
		Reference in New Issue
	
	Block a user