Skip to content
/ dotfiles Public

Dotfiles and scripts

Notifications You must be signed in to change notification settings

babab/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My dotfiles and scripts

These configurations and scripts are ultimately optimized for Zsh on Archlinux and support combinations of Bash or Zsh with Archlinux and Debian (or its derivatives: Ubuntu, Linux Mint, etc.).

Index

Code hosting / Links

Dotfiles for Vim (~/.vim) are kept in a separate repository called vim-config.

Small programs and utility scripts

afkfish

  • AFK fishing clicker script for Minecraft using xdotool.

afkmine

  • AFK mining clicker script for Minecraft using xdotool.

baraction.sh

  • Statusbar script for spectrwm (my favorite WM).

check-programs

  • Check to see what programs are installed on the system

ctb

  • Create temporary backup (create timestamped tar/gz archives of files/directories.

duh

  • A fancy alias for du -h | sort -h that tees output before showing a sorted version at the end, paged with less.

envtest

  • Check paths of python, pip and virtual environment

git-remote-gh

  • Clone or configure remotes (of) a Github repo with favourable urls (using https for fetch / ssh for push by default).

htmlcount

  • Count html elements in a html files or stdin.

loadavg

  • Show loadavg as a percentage of cores available.

loop

  • Run a command every second.

make-php-ctags

  • Create ctags for a PHP project.

metainfo

  • Show information like mimetype and SHA1/MD5 checksums of a file.

mkscript

  • Quickly create an executable script in python, node or shell script with some minimal boilerplate.

php-lintr

  • search recursively for scripts and only show output when there are errors.

random-wallpaper

  • Select a random wallpaper from ~/Pictures/wallpapers and set it using feh.

runserver

  • Run a http.server, Django or Werkzeug development server depending on project context.

screen-off

  • Blank the screen using xset.

screenshot.sh

  • Save a screenshot of a window or full screen in a timestamped file using scrot.

slowcate

  • Wrapper for sudo find / | grep "searchtext"

sysupgrade

  • Do a system upgrade, clean package cache and reboot/shutdown/return

termwidth

  • Get terminal width and/or print rulers to help set window size.

tmux-swprefix

  • Helper for using tmux over ssh in tmux (over ssh in tmux)

touchpad-toggle

  • Toggle touchpad depending on current status using synclient.

urxvt-modeline

  • Modeline script for rxvt-unicode terminal.

vbvmconn

  • SSH connect with a Windows Hosted VirtualBox VM from within Cygwin, starting the VM first if needed.

vii

  • Edit files in emacs/vim using a tab/pane layout and sudo if needed.

wmtoggle

  • Switch between using spectrwm or openbox when startx is executed.

wschemaspy

  • Wrapper for wschemaspy MySQL db graphviz dumps

xs

  • Alias for $@ > /dev/null 2>&1 & to start programs in X from the terminal.

youtube-dl-clipboard

  • Send URL in clipboard to youtube-dl (using xclip).

Cloning dotfiles repository

This repository should be cloned somewhere down the path in HOME. The default location is ~/git/dotfiles.

Some config files will directly refer to files in this repository using the env var BABABDOT_ROOT. If you use a location other the ~/git/dotfiles, this var should be changed to point to the right location. It is defined at the top of dotfiles/.profile.

The install script is then used to create the correct symlinks pointing to the dotfiles and shell scripts.

Clone the git repository somewhere in HOME:

mkdir -p ~/git
cd ~/git

# Download / clone from either Github or Codeberg
git clone https://codeberg.org/babab/dotfiles.git
git clone https://github.com/babab/dotfiles.git

Linking dotfiles

Before any linking is done, you can compare these dotfiles with the ones in your userdir. It will show if the files are symlinked and shows if the files/symlinks exists but differ with these repo.

To check status, use:

./install.sh --status

Default install - preserving existing configuration

Change to the created directory and run install.sh from that directory:

cd ~/git/dotfiles
./install.sh             # shows help information
./install.sh --confirm   # install files

By default, the install script will not create symlinks for any files/directories that already exist.

Complete install

If you don't care about any existing dotfiles and scripts (e.g.: ~/bin/, ~/.profile and ~/.bashrc) you can install everything. This makes sure there are no clashes with existing configurations and is recommended. Optionally create a (temporary) new user account to check it out and test it. The following command will remove existing dotfiles:

cd ~/git/dotfiles
./install.sh --force