bruhtus / dotfiles

A rational insanity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personal Dotfiles

“Simplicity is prerequisite for reliability.”
- Edsger W. Dijkstra

This repo is to backup my linux configuration so that i don't need to re-configure on every new installation. I use sdfm to manage my dotfiles.

Some details about my setup
Category Name
Operating system Arch linux
Window manager i3
Text editor Vim
Neovim (no longer using)
Terminal emulator st
Alacritty (no longer using)
Terminal multiplexer Tmux
Shell Zsh (interactive)
Bash
Shell prompt Custom zsh prompt
Starship (no longer using)
Powerlevel10k (no longer using)
Shell plugin manager Minzsh
Zplug (no longer using)
Package manager Pacman
Yay (AUR helper)
Status bar i3bar
Polybar (no longer using)
Notification daemon Dunst
Launcher Rofi
Dmenu (no longer using)
Compositor Picom (no longer using)
File manager nnn (TUI)
Ranger (TUI) (no longer using)
Pcmanfm (GUI)
Video player Mpv
System monitor Htop
Btop
Bpytop (no longer using)
Gtop (no longer using)
Conky (no longer using)
To-do list manager Taskwarrior
Python venv manager Pyv

Initialize dotfiles git repo using sdfm

We can use sdfm, which is a shell function that i created and you can check on .config/zsh/sdfm in this git repo, to manage our dotfiles.

First, download the file using wget or curl like this:

wget https://raw.githubusercontent.com/bruhtus/dotfiles/master/.config/zsh/sdfm

And then source the file (assuming we are on the same directory as the downloaded file):

. ./sdfm

After that, we can initialize new dotfiles repo using this command:

sdfi

The default dotfiles git repo is in "$HOME/.local/state/sdfm". To change the default dotfiles git repo, we can use this command:

SDFM_GIT_DIR="$HOME/sdfm" sdfi

Don't forget to add the new $SDFM_GIT_DIR env variable into your shell config or edit the sdfm file before sourcing the file.

To add a remote url, we can use this command:

sdfi -u <git-remote-url>

To add a file, we can use this command:

sdfa <file>

To commit the changes, we can use this command:

sdfc

# or
sdfc -m 'commit message'

To push the changes, we can use this command:

sdfp

To check the status of our dotfiles repo, we can use this command:

sdfs

Restore this dotfiles in new system

Install zsh first, and then run the command below per line:

wget https://raw.githubusercontent.com/bruhtus/dotfiles/master/.config/zsh/sdfm
. ./sdfm
sdfi -u https://github.com/bruhtus/dotfiles.git -fa
systemctl --user enable --now updates-notifier.timer
systemctl --user enable --now low-battery-notifier.timer

Linux default application

Linux uses "MIME Types" to determine the type of a file (for example "image/jpeg") and the Freedesktop Specifications (XDG) to determine which software should be used for which MIME Type.

The "database" of associations between types and software is created by looking at mimeapps.list files at several places (global configuration, your specific user configuration, ...), and can be edited through the command line using xdg-mime.

Many softwares (your file explorer for example) will rely on xdg-open to open files, which will query your preferences to know which software to start.

The .desktop in mimeapps.list file can also be seen and changed in ~/.local/share/applications

More info: https://wiki.archlinux.org/index.php/Xdg-utils

Resources

About

A rational insanity.


Languages

Language:Vim Script 65.7%Language:Shell 23.2%Language:Python 8.1%Language:Perl 2.6%Language:CSS 0.2%Language:HTML 0.1%