Skip to content

codetalker7/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

This repository contains my config for tools which I use in my workflow. Read on if you want to know about how to reproduce it and build from it!

Note: This config has been tested on Ubuntu 22.04 LTS, but I believe it should work out of the box for other distributions as well.

Base directory specification

This config assumes the defaults of the XDG Base Directory specification. Please see the referenced page for details about the default locations.

Use yadm clone

I use yadm to maintain my dotfiles. You'll need to install it on your system to clone use this config. For Ubuntu/Debian, standard package repositories can be used:

sudo apt-get install yadm

After a successfull install, you can clone this repository:

yadm clone https://github.com/codetalker7/dotfiles.git
yadm status

To run the initialization setup, you may use the bootstrap command:

yadm bootstrap

Note: All encrypted files in this repository have been encrypted with git-secret and not yadm encrypt. Essentially, just replace git with yadm.

Keys and other secrets

It's never a good idea to store keys and other private data on cloud (even a private repository on GitHub). For this config, I'm assuming that all private keys (for ssh, gpg or pgp) have been setup already.

Config and installation scripts

All config files can be found either in the project root or in .config/. Installation scripts can be found in .config/yadm. Scripts can either be ran separately (given that their requirements are met), or they can be ran in the correct order using yadm bootstrap.

Details

  • DE: xfce

  • Terminal Emulator: alacritty.

  • WM: i3.

  • Shell: fish.

  • Terminal Multiplexer: tmux.

  • Editor: nvim. I use the bob for version management.

  • Browser: brave-browser.

  • PDF Viewers:

  • Image Viewer: eog or feh.

  • Utils: Here's a list of utilities that I use:

    • git-secret, for managing secrets.

      $ git secret --version
      0.5.0
      
    • git diff tools:

      • nbdime, for diffing jupyter notebooks.
      • odt2txt, for diffing Open Document formats.
    • xclip, clipboards.

    • fzf, a fuzzy-finder.

    • htop and nvtop.

    • pandoc, converting between markup formats.

    • jq, a very handy tool for processing .json data.

    • encfs or cryfs, encrypting filesystems.

      $ cryfs --version
      CryFS Version 0.10.2
      
    • pdftk, working with pdfs.

  • Signing commits: I use my GPG key to sign git commits. More information is available in here and here.

      $ gpg --version
      gpg (GnuPG) 2.2.27
      libgcrypt 1.9.4
      Copyright (C) 2021 Free Software Foundation, Inc.
      License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
    
      Home: /home/codetalker7/.gnupg
      Supported algorithms:
      Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
      Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
              CAMELLIA128, CAMELLIA192, CAMELLIA256
      Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
      Compression: Uncompressed, ZIP, ZLIB, BZIP2
    
  • LaTeX: a texlive distribution. More details are available in my old branch.

    • zathura.
    • latexmk.
    • Overleaf for colabs.
    • Typst, a seemingly faster online LaTeX compiler (also has colabs).
  • Sync: rclone for cloud, syncthing, rsync for device sync.

  • Knowledge Base management: obsidian and papis.

  • Markdown Colabs: for this, I use hackmd.io.

Caution

Make sure to keep track of all crypto-related tools you're using to sign/encrypt/decrypt stuff. It's usually best practice to stick to the same version (so as to prevent any differences across the encryption/decryption algorithm over version changes; if any unforeseen change happens, you might lose your data). Always keep an unencrypted version of your files somewhere safe.

Installing texlive

  1. Follow the steps from the official Tug documentation for texlive. For me, the directory specification was as follows (these are all defaults):

    • TEXDIR: /usr/local/texlive/2024
    • TEXMFLOCAL: /usr/local/texlive/texmf-local
    • TEXMFSYSVAR: /usr/local/texlive/2024/texmf-var
    • TEXMFSYSCONFIG: /usr/local/texlive/2024/texmf-config
    • TEXMFVAR: ~/.texlive2024/texmf-var
    • TEXMFCONFIG: ~/.texlive2024/texmf-config
    • TEXMFHOME: ~/texmf
  2. After the installation is complete, set some paths; since I'm using fish, I did it like this (do all these only once):

    set -U fish_user_paths /usr/local/texlive/2024/bin/x86_64-linux $fish_user_paths
    

    To set the MANPATH, use the local ~/.manpath file (see man man or this post):

    # in ~/.manpath
    MANDATORY_MANPATH /usr/local/texlive/2024/texmf-dist/doc/man
    
  3. Try installing a couple of useful packages:

    sudo $(which tlmgr) install latex latex-bin latexconfig latex-fonts
    sudo $(which tlmgr) install amsmath babel carlisle ec geometry graphics hyperref lm  marvosym oberdiek parskip graphics-def url
    

    Also, install latexmk:

    sudo $(which tlmgr) install latexmk
    

    Use latexmk to automate building and compiling the necessary files.

  4. The installed packages can be found in TEXDIR/texmf-dist/tex/.

termux + syncing between Android and Linux

I've realized that one of the better ways to sync between my Android and Linux devices is via termux. I use ssh to connect my Android client with the Linux server, and then use rsync to syncronize. To do this: just generate an ssh public/private key pair on the Android device and put the public key in ~/.ssh/authorized_keys of the Linux server. This should enable ssh-based logins. Figure out the IP of the Linux host using hostname -I. I put all of this in the ~/.ssh/config file, so that I can just do ssh mylaptop from termux.

Likewise, I put my Linux host's public key in the ~/.ssh/authorized_keys of my Android device so that I can ssh into my Android device from my Linux machine. However, the ssh server on termux has to be started manually. Do the following steps:

  1. Run sshd.
  2. Verify using ps -A | grep sshd.
  3. Figure out the IP of the Android device using ifconfig. Then ssh normally.
  4. Make sure that port you're connecting to is 8022.

Interal Storage

  1. In termux, run termux-setup-storage. This sets up symlinks to allow you to access the Android filesystem easily, creating a new directory ~/storage.

  2. From this storage directory, one can move to the internal storage of the device using cd ~/storage/shared.

Use rsync for syncing

From this point on, it's straightforward to use ssh + rsync to sync between the Linux host and the Android device. Just use the format

rsync -raP src dest