Skip to content

CSRaghunandan/dot-files

Repository files navigation

dot-files repository

All the dot-files for my Arch Linux installation with i3-gaps as the tiling window manager

Configure ZSH

  • Install and use zsh as the default shell by running chsh -s $(which zsh)
  • Install zimfw by following the instructions in readme
  • After installation, run zimfw install followed by zimfw uninstall, to modify the plugins for zimfw
  • Install alacritty as the default terminal.
    • Configure environment variables for terminals by adding the below lines to .zshenv:
      export TERM="alacritty"
      export TERMINAL="alacritty"
              

Command line tools

Useful command line line tools written in Rust

  • Use fd as an alternative for find
  • Use Ripgrep as an alternative for grep
  • ripgrep_all: rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
  • bingrep: like grep UBER, but for binaries
  • tokei: count lines of code
  • Use bat as an alternative for cat
  • Use exa as a modern alternative to ls
  • Use broot as a modern alternative to tree
  • nomino: batch rename files using regex
  • navi: An interactive cheatsheet tool for the command-line
  • hyperfine: A command-line benchmarking tool
  • hexyl: command-line hex viewer
  • procs: A modern replacement for ps written in Rust
  • bottom: cross platform graphical process/system monitor
  • desed: Debugger for Sed: demystify and debug your sed scripts, from comfort of your terminal.
  • delta: A syntax-highlighter for git and diff output
  • xidlehook: xidlehook is a general-purpose replacement for xautolock. It executes a command when the computer has been idle for a specified amount of time.
    • caffeinate: This will pause xidlehook so that the system will not go to sleep
  • watchexec: Executes commands in response to file modifications
  • i3status-rs: as the bar for i3wm
  • tealdeer: tldr client written in Rust
  • enact: to have automatic configuration of multiple monitors with hotplug support
  • tree-sitter: An incremental parsing system for programming tools https://tree-sitter.github.io
  • dotenv-linter: lint dotenv files
  • paru: AUR helper written in Rust
  • dust: A more intuitive version of du in rust
  • grex: generate regex from user provided test cases

Useful command line utilities

  • kitty: GPU based terminal emulator
  • powerlevel10k: super fast prompt for zsh.
  • tmux: a terminal multiplexer
  • s: search from the command line
  • ncdu: Ncdu is a disk usage analyzer with an ncurses interface.
  • lnav: Watch and analyze your log files from a terminal.
  • minicom: Serial communications program
  • jq: command line JSON processor
  • ffmpeg: A complete, cross-platform solution to record, convert and stream audio and video.
  • imagemagick,graphicsmagick: manipulate images on the command line
  • graphviz: graph visualization software
  • Gstreamer: pipeline based multi-media framework
  • prettyping: is a wrapper around the standard ping tool, making the output prettier, more colorful, more compact, and easier to read.
  • Replace ping with prettyping using an alias:
    alias ping=prettyping  
        
  • yank: yank terminal output to clipboard
  • syncthing: modern cross platform alternative to rsync
  • GNU Stow: GNU Stow is a symlink farm manager which takes distinct packages of software and/or data located in separate directories on the filesystem, and makes them appear to be installed in the same place.
  • aria2: aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
  • nano-syntax-highlighting: Improved Nano Syntax Highlighting Files
  • multitail: MultiTail allows you to monitor logfiles and command output in multiple windows in a terminal, colorize, filter and merge.
  • safe-rm: wrapper around rm to make it prevent accidental delete of important directories that should never be deleted
  • thefuck: correct previous console command
  • fzf: A command-line fuzzy finder
  • github cli GitHub’s official command line tool
  • pre-commit run pre-commit hooks for git

Language specific tools

Shell

C/Cpp

  • LLVM tool-chain: llvm, clang, clang++, clangd, lld, clang-tidy, clang-format
  • ccls: LSP based language server for C and C++
  • CMake: C/C++ build files generator
  • qt5: GUI Framework for C++
  • boost: peer-reviewed portable C++ source libraries which works will with the standard library
  • qt creator: IDE for C++ written by Qt team
  • clazy: Qt oriented code checker based on clang framework
  • ccache: Ccache (or “ccache”) is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again.
  • cppcheck: Cppcheck is an open source static analysis tool for C/C++ code
  • gdb, lldb: debuggers for C/C++ and rust code.
  • doxygen: Generate documentation from source code

Rust

  • rust-analyzer: An experimental Rust compiler front-end for IDEs and text editors. On Arch Linux install rust-analyzer-bin from AUR
  • cargo-audit: Audit Cargo.lock files for crates with security vulnerabilities reported to the RustSec Advisory Database.
  • cargo-bloat: find out what takes the most space in your executable
  • cargo-update: A cargo subcommand for checking and applying updates to installed executables
  • Rustfmt
  • Clippy

Go

  • Gopls
  • Godef

Haskell

  • HIE

Python

  • black: code formatter for python
  • pyright python language server
  • pipenv: brings npm like functionality for python
  • mypy: optional static type checker for python Install it with:
    paru -S mypy
        
  • bandit: for finding common security flaws in python code

yaml

javascript

Configure ntp

  • Install ntp package and enable the ntp service
  • Run the following commands to disable systemd-timesyncd
    systemctl stop systemd-timesyncd
    systemctl disable systemd-timesyncd
    sudo timedatectl set-ntp False
        
  • sudo systemctl enable ntpd.service -> to start ntpd at boot
  • enable logs and statistics for ntp
  • ntpq -pn -> show the status of ntp

Keyboard configuration and mouse:

  • Configure locale for your system by adding the below lines to .zshenv file:
    # locale configuration
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8
        
  • Install xorg-xmodmap for keyboard configuration: Left control is now hyper and Caps Lock is now control
  • Enable sticky keys are enabled without locking using xkbset
  • Add hook to suspend so that xmodmap is run and sticky keys are enabled after computer is resumed. This is necessary because X keyboard settings are reset after suspend.

    Create a file /etc/systemd/system/resume@csraghunandan.service

    [Unit]
    Description=User resume actions
    After=suspend.target
    
    [Service]
    User=csraghunandan
    Type=simple
    Environment=DISPLAY=:0
    ExecStart=/usr/bin/bash /home/csraghunandan/.scripts/system/keeb
    
    [Install]
    WantedBy=suspend.target
        

    And run sudo systemctl enable resume@.service

  • reverse mouse scroll direction in i3, by modifying libinput drivers for mouse/pointer in the file /usr/share/X11/xorg.conf.d/40-libinput.conf:
    Section "InputClass"
    Identifier "libinput pointer catchall"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Option "NaturalScrolling" "on"
    Driver "libinput"
    EndSection
        
  • Add right click option to touchpad for double tap fingers and natural scrolling by adding to the same file above, the line:
    Option "Tapping" "on"                # enables tapping
    Option "ClickMethod" "clickfinger"   # replaces synaptics tapping setup
    Option "NaturalScrolling" "on"
        

Power management:

  • modify the following lines in /etc/systemd/logind.conf:
    HandlePowerKey=suspend
    HandleLidSwitch=lock
        

    This will enable the system to:

    • suspend when pressed the power button instead of shutdown
    • If the laptop lid is closed, lock the system
  • Use i3lock as the lockscreen for i3 and configure it like so:
    • Setup an alias for i3lock:
      alias i3lock="i3lock && echo mem > /sys/power/state"  
              
    • Use xsslock to run i3lock when the system is locked
    • Use xidlehook to lock the screen after 10mins of inactivity and suspend computer after 10more minutes of further inactivity
  • TLP and thermald for power management for laptops:
    • Enable tlp.servce
    • mask the systemd service systemd-rfkill.service and socket systemd-rfkill.socket
    • enable thermald.service. This will reduce the CPU clock if temperature exceeds a threshold
  • copy low-battery-alert.service and low-battery-alert.timer to /etc/systemd/system/ and enable both of them by running sudo systemctl enable low-battery-alert.service and sudo systemctl enable low-battery-alert.timer.
    • Install acpi for fetching laptop battery status

Configure media related applications

  • Run mkdir -p ~/.config/mpd/playlists and enable mpd service by running: sudo systemctl enable mpd.service
  • Use ncmpcpp as the client for mpd
  • Install mpDris2 (from AUR) and enable it by running systemctl --user enable mpDris2
  • Install playerctl and pulseaudio-ctl for media controls. This allows us to add notifications and maximum volume limit for system volume
  • Install alsa and pulseaudio: alsa-utils, alsa-plugins, pluseaudio-alsa
  • Use VLC as the media player for videos. Enable hardware acceleration for decoding by installing: intel-media-driver, libva-utils, xf86-video-intel and selecting the VAAPI backend for hardware decoding in settings for VLC
  • pavucontrol (controlling audio through UI)
  • Other media tools:
    • Gstreamer
    • ffmpeg, libav
    • imagemagick, graphicsmagick
    • graphviz
    • flac, faac
    • x264, x265
    • youtube-dl (download from youtube and other media sites)
    • Bluetooth configuration:
      • Install bluez, bluez-utils and blueman (front end for bluetooth)
      • Enable and start bluetooth service:
        sudo systemctl enable bluetooth.service --now  
                    

Security

  • KeepassXC as the default password manager for linux. Also, enable the browser integration and install plugins for chrome and firefox
  • ufw: simple firewall for linux

    enable ufw.service after installation and run sudo ufw default deny to enable the firewall

  • change the default DNS resolver to 1.1.1.1 by editing the nameserver entry in /etc/resolv.conf and make it unwritable by running the command: chattr +i /etc/resolv.conf
  • SSH config for git
    • Add SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket" to ~/.pam_environment file
    • If you are running openssh verison > 7.2, add these to ~/.ssh/config file: AddKeysToAgent yes. This will instruct the ssh client to always add the key to a running agent, so there’s no need to ssh-add it beforehand.
    • Create a ~/.ssh/config file and change permissions by: chmod 600 ~/.ssh/config
    • Start the ssh-agent service:
      systemctl --user enable ssh-agent --now  
              

Reader applications

  • Use Zathura as the default reader
    • Install the following packages: zathura-pdf-mupdf, zathura-djvu, zathura-cb
    • Enable copy to clipboard by adding to ~/.config/zathura/zathurarc:
    • Make zathura the default PDF reader for opening applications in firefox, or other GUI applications by modifying the mineapps.list
    • Make zathura the default Reader application by adding the following lines in your .zshenv file:
      export READER="zathura"  
              
  • Use libreoffice-fresh package for installing libreoffice
  • Dictionary and thesaurus config:
    • Install artha as the thesarus for linux. Bind its shortcut to Hyper+Alt+t
    • Install goldendict with websters 1828 dictionary by following: this guide . Bind its shortcut to Meta+Alt+t
  • Install hunspell, hunspell-en_US, hunspell-en_GB for spell checker
  • Install dictd for English to other language dictionary translations
  • Install texlive-most and pygments for a complete latex environment
  • Install pdf-tools to be able to view PDF file inside emacs using poppler
  • Install pandoc for converting documents from one format to other

Productivity tools

  • GNU Emacs: My choice of text editor
  • Postman for testing HTTP requests
  • Zeal for offline documentation
  • Source Trail for browsing C/Cpp and Python projects visually
  • Install LibreOffice from libreoffice-fresh (in AUR)
  • Plantuml for creating control flow and other diagrams
  • dbeaver (open source Database viewer)
  • Wireshark for network analyzing. Install it with the following packages: wireshark-qt, wireshark-cli
  • editorconfig: EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
  • foliate: Simple and modern ebook reader

Configuring i3 and tools used

  • Install deadd-notification-center for getting notifications for i3
  • Install rofi as the application launcher
  • Use i3status-rs as the bar for i3wm
  • Use numlockx to enable numlock functionality
  • xbanish: banish the mouse cursor when typing, show it again when the mouse moves
  • Use feh to set the wallpaper background
  • Use i3lock as the locker for i3wm
  • Use picom as the display compositor for i3. Install from git, for Archlinux, install using picom-git from AUR.
    • Use experimental backends option when running picom, otherwise the glx backend will not work.
    • To run picom, copy the systemd user service file(picom.service) to /usr/lib/systemd/user/ and run the below command:
      # this needed as sometimes picom crashes when restarting i3 session
      systemctl --user enable picom.service --now
              
  • Use udiskie to get notifications and manage devices connected to the system.
  • Use maim and xdotool to take desktop screenshots. xdotool is also used to get picture in picture effect using i3. The following are enabled in i3:
    • screenshot of entire screen
    • screenshot of active window
    • screenshot of region
    • copy selected region to clipboard
  • Install xorg-backlight brightness of the screen
  • Install xorg-xinput for enabling/disabling touchpad
  • Use clipmenu as the clipboard manager for Linux:
    • Enable and start the clipmenud service:
      sudo systemctl enable clipmenud --now  
              
    • set CM_LAUNCHER=rofi, so that you can use rofi to view clipboard
  • Use nm-applet which will provide a tray for NetworkManger
  • Set firefox-developer-edition as the default browser by:
    gio mime x-scheme-handler/http firefox-developer-edition.desktop
    gio mime x-scheme-handler/https firefox-developer-edition.desktop
        
  • Run blueman-tray to get a tray icon for bluetooth. This requires blueman to be installed
  • Install xedgewrap to allow mouse to wrap across multiple monitors
  • Install enact to have automatic configuration of multiple monitors with hotplug support:
    # install enact using cargo
    cargo install --git https://github.com/chmln/enact
    
    # to use in i3, add this line to your config:
    exec --no-startup-id enact --pos top --watch &
        
  • Install i3keys to list all the bindings made for i3wm in web or terminal
  • gpick: Advanced color picker written in C++ using GTK+ toolkit
  • sxhkd: Simple X hotkey daemon

System

  • intel-gpu-tools: this will install the application intel-gpu-top, which we can use to monitor Intel GPU usage
  • Nautilus as the default graphical file explorer
  • xorg-xev, xorg-xprop, xorg-xhost, xorg-xrandr: X11 related utilities

Appearance

  • Use nordic as the default GTK theme and paper-icon-theme as the default icons set
  • Font sets for arch: noto-fonts, noto-fonts-extra, noto-fonts-cjk, noto-fonts-emoji, otf-font-awesome, powerline-fonts, awesome-terminal-fonts

    To install all the necessary font packages to fonts from display various langauges and emoji

  • Use Iosevka SS08 Medium as the default monospace font. Install it by running: paru -S ttf-iosevka-ss08
  • Use lxappearence to change the font, icons and theme
  • Install redshift to warn the screen during night times to reduce eye strain
    • Enable and start: redshift by running
      systemctl --user enable redshift-gtk.service --now  
              
    • In order to allow access Redshift to use GeoClue2, add the following lines to /etc/geoclue/geoclue.conf:
      [redshift]
      allowed=true
      system=false
      users=
              
    • Use sddm as the display manager for linux.
  • Nord themes for the following:
    • Emacs using the doom-nord theme
    • Alacritty nord theme colors
    • GTK theme using: nordic-theme-git
    • i3wm, i3bar and i3status-rust Nord themes
    • rg using custom config file
    • broot using custom config file
    • fd, lsd using dir_colors
    • rofi Nord theme using config file
    • procs using custom config file
    • fzf Nord theme by modifying the environment variables
    • bat in built Nord themes
    • Colored man pages using less
    • nano UI Nord theme by modifying nanorc
    • tmux Nord theme using tpm plugin
    • Xresources Nord theme colors by modifying .Xresources file
    • Zathura UI Nord color theme by modifying config file
    • Install Nord theme for qt applications
      • kvantum and install kvantum-theme-nordic-git
      • Open kvantum-manager and change default theme to Nordic-Darker
    • git Nord color theme by modifying .gitconfig
    • delta diff Nord color theme by modifying .gitconfig
    • Colored sudo and grep by modifying env variables
    • ncmpcpp by modifying the config file
    • Firefox Nord color theme

About

All the dot-files for my arch-linux installation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published