Script to try various themes from kitty terminal

2019-12-16 1 min read Bash Learning

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

Gnome Icons, themes and window decorator.

2010-07-14 1 min read Fedora Linux

Yesterday, I had tried fusion theme, but that did not work our that good for me. Reasons multifold:

  1. I like the features of GNome
  2. I am used to GNome
  3. Other window managers did not look that lucarative to me.
  4. Compiz was chocking my CPU..
    and so on..

So I went back to my GNome but wanted to change the looks so searched enough today to get the right set of Icons and themes. I think I finally got some decent ones and here are the links for the icons that I liked:
<a href="http://www.junauza.com/2008/08/10-really-cool-icon-sets-for.html" target="_blank">http://www.junauza.com/2008/08/10-really-cool-icon-sets-for.html
and this one <a href="http://www.ubuntu-unleashed.com/2008/05/ultimate-gnome-icon-theme.html" target="_blank">here.

Continue reading

bash script to change icon theme to check out all the installed themes (personal)

2010-05-19 2 min read Fedora GNOME Linux

I am really annoyed with the time that is required and the number of clicks that it takes to change the gnome icon theme. So here&#8217;s a small script that I wrote to quickly check out all the icon themes that I have in my ~/.icons folder.

#!/bin/bash
[[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1
[[ &#8221;$2&#8221; == &#8221;&#8221; ]] && (
cd ~/.icons
cont=&#8221;y&#8221;
echo &#8221;Select one of the icon themes&#8221;
echo &#8221;When you like some theme just press Ctrl+c&#8221;
for i in *
do
[[ -d $i/cursors ]] || (
echo &#8221;Now trying …. : $i&#8221;
gconftool-2 –type string -s  /desktop/gnome/interface/icon_theme &#8221;$i&#8221;
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/interface/icon_theme &#8221;$2&#8221;

Continue reading

bash script to periodically change the cursor theme.

2010-05-07 1 min read Fedora GNOME

#!/bin/bash
[[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1
[[ &#8221;$2&#8221; == &#8221;&#8221; ]] && (
cd ~/.icons
cont=&#8221;y&#8221;
echo &#8221;Select one of the icon themes&#8221;
echo &#8221;When you like some theme just press Ctrl+c&#8221;
for i in *
do
[[ -d $i/cursors ]] && (
echo &#8221;Now trying …. : $i&#8221;
gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme &#8221;$i&#8221;
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme &#8221;$2&#8221;

Continue reading

Spruce up your firefox with lightweight themes – Personas

2010-04-29 2 min read Fedora Linux

Head over to Firefox addons site  for persona <a href="https://addons.mozilla.org/en-US/firefox/addon/10900" target="_blank">here. This addon will give you the ability to change the look and feel of the browser without restarting it. Though it is not completely like themes and does not change the look and feel of the buttons and plenty of other things but this does make the browser a lot better. Here are some screenshots to show you how it feels like:

Continue reading

bash – change theme for gtk in gnome and take screenshot from script.

2010-03-24 1 min read Bash Fedora GNOME

I wrote a blog on bash script to change the icon/cursor theme using a bash script. Lets extend the same concept a little more and use the script to change the gtk theme for gnome and at the same time take a screenshot also.

#!/bin/bash
path=&#8221;/tmp/screenshot&#8221;
[[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1
[[ &#8221;$2&#8221; == &#8221;&#8221; ]] && (
cd ~/.themes
cont=&#8221;y&#8221;
echo &#8221;Select one of the icon themes&#8221;
echo &#8221;When you like some theme just press Ctrl+c&#8221;
for i in *
do
[[ -d $i/cursors ]] || (
echo &#8221;Now trying …. : $i&#8221;
gconftool-2 –type string -s  /desktop/gnome/interface/gtk_theme &#8221;$i&#8221;
sleep 1
j=$(echo &#8221;$path/$i&#8221;).jpg
import -window root -quality 95 &#8221;$j&#8221;
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/interface/gtk_theme &#8221;$2&#8221;

Continue reading

Bash styling(themeing), the stylist way.

2010-02-04 1 min read Bash

For last couple of days, I have been looking for solutions to make stlying my bash easier. So, first a screenshot of the effort:

<img class="size-full wp-image-703" title="bash style" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/a.jpg" alt="bash style" width="511" height="332" />

I was looking for the simplest solutions to do this. So, I installed two packages to make my life easier :  bashstyle and fortune.

sudo yum install fortune\*

For bash-style you can download the source files <a href="http://www.nanolx.org/bashstyle-ng/" target="_blank">here. Download the file, then do the following:

Continue reading
Older posts