mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
98 lines
3.5 KiB
Bash
Executable file
98 lines
3.5 KiB
Bash
Executable file
#!/usr/bin/env zsh
|
||
|
||
# Zsh Theme Chooser by fox (fox91 at anche dot no)
|
||
# This program is free software. It comes without any warranty, to
|
||
# the extent permitted by applicable law. You can redistribute it
|
||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||
# http://www.wtfpl.net/txt/copying/ for more details.
|
||
|
||
THEMES_DIR="$ZSH/themes"
|
||
FAVLIST="${HOME}/.zsh_favlist"
|
||
source $ZSH/oh-my-zsh.sh
|
||
|
||
function noyes() {
|
||
read "a?$1 [y/N] "
|
||
if [[ $a == "N" || $a == "n" || $a = "" ]]; then
|
||
return 0
|
||
fi
|
||
return 1
|
||
}
|
||
|
||
function theme_preview() {
|
||
THEME=$1
|
||
THEME_NAME=`echo $THEME | sed s/\.zsh-theme$//`
|
||
print "$fg[blue]${(l.((${COLUMNS}-${#THEME_NAME}-5))..─.)}$reset_color $THEME_NAME $fg[blue]───$reset_color"
|
||
source "$THEMES_DIR/$THEME"
|
||
cols=$(tput cols)
|
||
(exit 1)
|
||
print -P "$PROMPT $RPROMPT"
|
||
}
|
||
|
||
function banner() {
|
||
echo
|
||