summaryrefslogtreecommitdiff
path: root/.config/kitty/kitty-themes/.tools/previews.sh
diff options
context:
space:
mode:
authorIndrajith K L2023-09-08 14:43:41 +0530
committerIndrajith K L2023-09-08 14:43:41 +0530
commit0f144c1ef9d831b1c663ef998f40e22c33156d9e (patch)
treedd20b22ce18b5e6e0b00b43d1b5a2699792563f1 /.config/kitty/kitty-themes/.tools/previews.sh
downloadDotFiles-0f144c1ef9d831b1c663ef998f40e22c33156d9e.tar.gz
DotFiles-0f144c1ef9d831b1c663ef998f40e22c33156d9e.tar.bz2
DotFiles-0f144c1ef9d831b1c663ef998f40e22c33156d9e.zip
Initial CommitHEADmaster
* Adds Basic dot files configs
Diffstat (limited to '.config/kitty/kitty-themes/.tools/previews.sh')
-rwxr-xr-x.config/kitty/kitty-themes/.tools/previews.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/.config/kitty/kitty-themes/.tools/previews.sh b/.config/kitty/kitty-themes/.tools/previews.sh
new file mode 100755
index 0000000..c39c2c7
--- /dev/null
+++ b/.config/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