Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Sublime Text - Install Flatland Theme

Flatland is my favourite theme for Sublime Text Editor (versions 3 and 4) and will make the editor look similar to below:

Script

Run the script to automatically download and install it.

#!/bin/bash
mkdir /tmp/install-sublime-theme
cd /tmp/install-sublime-theme

wget https://github.com/thinkpixellab/flatland/archive/master.zip

unzip master.zip

mv flatland-master "/home/$USER/.config/sublime-text/Packages/Theme - Flatland"

# clean up
rm -rf /tmp/install-sublime-theme

# One day I may get bash to check for and overwrite these attributes 
# but for now just tell the user what to do manually.
echo ""
echo "======================= copy lines below ===================="
echo '"theme": "Flatland Dark.sublime-theme",'
echo '"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme"'
echo "============================================================="
echo "Now update the settings file using the command below and add/overwrite the two properties outlined above"
echo 'subl $HOME/.config/sublime-text/Packages/User/Preferences.sublime-settings'

If the path to the Preferences.sublime-settings file is incorrect, then it may be at $HOME/.config/sublime-text-3/Packages/User/Preferences.sublime-settings instead.

References

Last updated: 8th July 2024
First published: 9th February 2020

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch