A collection of config files used to setup and maintain a uniform development environment across different machines and distros (hopefully! 😜 )
The shell coustomizations comprise of three files in sh/
directory:
.bashrc.env.sh
: paths and env vars.bashrc.aliases.sh
: aliases.bashrc.functions.sh
: functions for task automation
You can either copy these script files to your home directory or soft link there:
# assuming you cloned this repo in ~/.config/dotfiles
ln -s $HOME/.config/dotfiles/.bashrc.env.sh ~/.bashrc.env.sh
and source these files in ~/.bashrc
file:
if [ -f "~/.bashrc.env.sh" ]; then
source "~/.bashrc.env.sh"
fi
For changes to take effect either run source ~/.bashrc
from terminal or logout and login.
Both files, in addition to custom aliases and functions, print a custom prompt and are differentiated as follows:
For detailed information on bash functions and aliases look at relavent readme file.
.bashrc.cpwd.sh
prints a shell script based simple prompt
-
.bashrc.env.sh
prints astarship
prompt that can be installed using pip (python package manager):cargo install starship --locked
There are scripts for inital setup of a fresh install:
setup_init.sh
: initial setup for cli and conkysetup_env.sh
: setup a base dev env (python, node, rust, go, alacritty, starship prompt, latex)
The shell script directory also contains configuration files to setup a functional zsh
environment.
.zshrc.min.zsh
: minimalzsh
configuration.zshrc.min.zsh
: a relatively robustzsh
configuration usingzim
framework.zshrc.env.sh
: paths and env vars.zshrc.aliases.sh
: aliases.zshrc.functions.sh
: functions andzle
widgets for task automationsetup_zsh.sh
: a script to setup thezsh
configuration
The information on terminal configurations can be found here.
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
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.
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'
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.
The wm/i3
directory contains config files for my i3 WM setup.