Skip to content

goncalomb/dotfiles

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

dotfiles

My dotfiles and scripts for your favorite Linux environment, I use Mint and Termux on Android.

The install procedure is for bash, usage with other shells is untested, but the scripts should be mostly portable and many are not even shell scripts.

It should work on macOS.

Install

Must be installed on your HOME directory or any directory below!

cd ~
git clone https://github.com/goncalomb/dotfiles.git
./dotfiles/install.sh

The install is quite tame and does not make big changes to your system.

  • it appends to '~/.bashrc' to source 'bashrc' from this repo
  • it changes the git global config '~/.gitconfig' to add 'include include.path' and 'core.excludesfile'

Please do review the 'install.sh' script if you want. Also, you can just add source "$HOME/dotfiles/bashrc" to your init file if you want more control.

Contents

Bash (bashrc)

A custom PS1 with git branch, some aliases and functions, see bashrc. When installed on Android with Termux, some extra bash functions are available, see bashrc_termux.

Git (gitconfig)

A small collection of git aliases gitconfig.

Container Recipes (container-recipes/)

Specialized Docker container images. TODO: more documentation.

Home Spoofing (home-spoofing/)

This is a very old feature that I don't use for a long time. TODO: test, improve documentation.

With home spoofing you can carry your home directory with you!

Clone this repository to an external drive, then run YOUR_DRIVE_LOCATION/dotfiles/home-spoofing/spoof.sh bash this will open a new bash instance with the HOME path set to the external drive (see spoof.sh). It also compiles and preloads a shared library (see preload.c) using LD_PRELOAD, which intercepts some standard C functions to better spoof the HOME directory.

All programs started from that shell will see the spoofed HOME directory and use it to store their config files, making your HOME directory portable.

It's not required to start a shell to spoof the HOME for a specific program, just run YOUR_DRIVE_LOCATION/dotfiles/home-spoofing/spoof.sh your_program some_argument.

If you use GNOME, it's useful to create a open-terminal.desktop file on the external drive to quickly open a spoofed shell or other programs:

[Desktop Entry]
Terminal=true
Name=Terminal
Exec=bash -c "$(dirname -- "%k")/dotfiles/home-spoofing/spoof.sh bash"
Type=Application
Icon=gnome-panel-launcher

Scripts (bin/)

These are not documented extensively, so I recommend that you read them before running. Nevertheless, they don't make changes to your system, except for 'install-*' and 'bashrc-zone' probably...

Scripts Description
android-bak Connect to Android (I use Termux and sshd) and backup some files.
android-ssh Connect to Android (using bcast-ip).
bak-disk Dump disk metadata and contents.
bashrc-zone Manage bashrc zones.
bcast-ip A simple IPv4 broadcaster.
browser-incognito Open an independent browser window in incognito mode (Google Chrome).
browser-socks Create a SOCKS proxy with a remote server and start an incognito Google Chrome instance on that proxy.
composer Run PHP composer (with auto-install).
cryptimg Create/Manage/Mount LUKS encrypted images, for storing files securely.
drive-serial Find the serial number of the physical drive.
estore (src) Encrypted data storage (to store passwords and other data).
gh-clone Clone from GitHub with gh-clone user/repo.
gh-set-user Sets your git name and email based on your GitHub profile.
git-mtime Set the modified date of the files on a git repository to the last commit date that changed the files.
install-applications A utility to install some applications.
install-packages A utility to install some basic packages.
install-extra-packages Installs extra packages using apt-get from external repositories.
logdata A script to log events and notes throughout the day.
mailop Organize emails on imap mailboxes.
phpdoc Run phpDocumentor (with auto-install).
recipes Run container recipes (see ./container-recipes), try recipes rs-osrs.
sftp-upload (src) A hacked together SFTP uploader script (probably not worth using).

License

dotfiles is released under the terms of the MIT License. See LICENSE.txt for details.

About

🍪 My dotfiles and scripts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published