diff options
author | Indrajith K L | 2024-06-27 17:51:18 +0530 |
---|---|---|
committer | Indrajith K L | 2024-06-27 17:51:18 +0530 |
commit | 57eb70137b5bbcdabdc0f02eea5477b3e5f845a1 (patch) | |
tree | e78187146c506d5a640545dee99cc3e9860e25dc /kitty/kitty-themes/.tools/previews.sh | |
download | dots-57eb70137b5bbcdabdc0f02eea5477b3e5f845a1.tar.gz dots-57eb70137b5bbcdabdc0f02eea5477b3e5f845a1.tar.bz2 dots-57eb70137b5bbcdabdc0f02eea5477b3e5f845a1.zip |
Adds Arch Linux dotfiles
Diffstat (limited to 'kitty/kitty-themes/.tools/previews.sh')
-rwxr-xr-x | kitty/kitty-themes/.tools/previews.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kitty/kitty-themes/.tools/previews.sh b/kitty/kitty-themes/.tools/previews.sh new file mode 100755 index 000000000..c39c2c787 --- /dev/null +++ b/kitty/kitty-themes/.tools/previews.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# @author: @vrdhn on github + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd $SCRIPT_DIR/.. + +set_theme () { + cat themes/$1.conf | awk 'BEGIN {printf("kitty @ set-colors ")} {printf( "%s=%s ",$1,$2 )} END{printf("\n")}' | sh +} + +list=$(find themes -type f | grep "$1" | xargs basename | cut -d. -f1) + +for x in $list ; +do + kitty +kitten icat "previews/$x.png" + read -n 1 -p "$x : Next / Set / Quit :" ans + echo + + case $ans in + n ) ;; + s ) set_theme $x ; exit ;; + q ) exit ;; + esac +done |