/dotfiles

Development environmet config files

Primary LanguageShell

Linux Desktop Environment config files

A collection of config files used to setup and maintain a uniform development environment across different machines.

Contents

  1. bashrc

  2. Conky

    1. Setup dependencies
    2. Autostart conky on startup
    3. Screenshots
  3. i3 tiling WM config

bashrc

.bashrc.aliases.sh, .profile.env.sh: Aliases and Functions

You can either copy one of the two script files to your home directory or soft link it there:

# assuming you cloned this repo in ~/.config/dotfiles
ln -s ~/.config/dotfiles/.bashrc.env.sh ~/.bashrc.env.sh

and add a source line in your ~/.bashrc file:

source .bashrc.env.sh

For changes to take effect either run source ~/.bashrc from terminal or logout and login.

.bashrc.cpwd.sh: Custom Prompt and Aliases

Both files, in addition to custom aliases and functions, print a custom prompt and are differentiated as follows:

  • .bashrc.cpwd.sh prints a shell script based simple prompt

alt text

  • .bashrc.env.sh prints a powerline-shell based prompt that can be installed using pip (python package manager):

    pip install powerline-shell

alt text

For detailed information on bash functions and aliases look at relavent readme file.

Conky

First clone the repo in a directory (say dotfiles) inside ~/.config. Then install and setup all the dependencies for a config of your choice as listed in the following table.

Configuration Dependencies
minimal# X conky (>= 1.10), curl, jq, vnstat
mixCxx conky (>= 1.10), curl, jq, vnstat
SpaceX conky (>= 1.10), Python 3 (for optional apt script)
StarWarp conky (>= 1.10), curl, jq, vnstat, Fonts (FontAwesome, Neuropolitical, Neuropol X)

After setting up dependencies, soft link conky directory in ~/.config.

# assuming you cloned this repo in ~/.config/dotfiles
ln -s ~/.config/dotfiles/conky ~/.config/conky

Setup dependencies

To setup the dependencies on a Debian/Ubuntu based distro, install from upstream repo:

sudo apt-get install conky curl jq vnstat

vnstat initializes a db, for each network interface, in /var/lib/vnstat. To monitor an interface (say eth0), create a new db for it as:

vnstat --create -i eth0

To avoid Permission denied errors while querying vnstat data, change ownership of db files to vnstat user:group pair.

sudo chown vnstat:vnstat /var/lib/vnstat/*

For weather updates and forcasts get an API key from OpenWeatherMap and find city id for city of your choice. Substitute these values against template1 and template2 variables in the config file.

Autostart conky on startup

Edit .conky/conky-startup.sh file and substitute name of the script that launches configuration file of your choice. Add .conky/conky-startup.sh as a autostart application from system settings.

bash -c '/home/user/.config/conky/conky-startup.sh'

Weather API

The configurations that display current weather and forecast depend on some shell variables exported from conky/.env file by the respective startup script (like starwarp-start.sh). These variables are used by the HTTP GET request to the weather API. In order to use this feature, register a free account with OpenWeatherMap and get an API key. Now, write a .env file in conky root directory $HOME/.config/conky. An example .env looks like

#!/usr/bin/env sh

export OWM_APIKEY="1234567890abcdefgh"
export OWM_QUERY="London,uk"
export OWM_CITYID="2643743" # city id for London, GB
export OWM_UNITS="metric"
export OWM_LOCALE="en_GB.UTF-8"	# use your preffered locale e.g. en_US.UTF-8

City ID list is available in the compressed json file from OWMap.

Screenshots

minimal# Hydrogen

alt text

minimal# Helium

alt text

minimal# Hydrogen Icon Mix

alt text

minimal# Carbon

alt text

alt text

alt text

SpaceX

alt text

alt text

StarWarp

alt text

alt text

i3 tiling WM config

This contains config files for my i3 WM setup.

Top