Script to try various themes from kitty terminal
Here is the script. Very simple yet very useful script.
#!/bin/bash - #=============================================================================== # # FILE: kitty-theme.sh # # USAGE: ./kitty-theme.sh # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Amit Agarwal (aka), # ORGANIZATION: Individual # CREATED: 12/06/2019 10:15 # Last modified: Fri Dec 06, 2019 10:41AM # REVISION: --- #=============================================================================== set -o nounset # Treat unset variables as an error FOLDER="/git/terminal.sexy/dist/schemes" ### This is git folder where you have terminal.sexy cloned if [[ ! -d $FOLDER ]] then cd $FOLDER/../../../ git clone https://github.com/stayradiated/terminal.sexy fi cd $FOLDER tmp=$(mktemp /tmp/color-XXXXXXXX) echo $tmp files=$(find . -type f -name \*json) for line in $(echo ${files[*]}) do echo "Processing $line" >$tmp echo "# From $line.. processed by Amit Agarwal script" >> $tmp sed -n -e '/color/,/\],/ p' $line | sed -e 1d -e '$d'| \ sed 's/[",]//g'|awk '{count++; print "color"count"\t "$1}' >> $tmp grep ground $line |sed 's/^ *//' |sed 's/[":,]//g' >> $tmp kitty @ set-colors -a $tmp ls --color=auto ~ read -p "If you like the theme, just press l ::" test if [[ $test == "l" ]] then rm -f ~/.config/kitty/theme.conf cp $tmp ~/.config/kitty/theme.conf fi done rm -f $tmp
Related Articles:
- 2019/12/02 i3 – show mapped hotkeys
- 2019/07/08 Add files to dropbox with single curl command
- 2017/01/02 Trello – backup to your linux machine
- 2016/07/10 Get your local IP address like pro
- 2013/11/22 bash – using the vi mode more effectively.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.