Giter VIP home page Giter VIP logo

dotfiles's Introduction

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

dotfiles's People

Contributors

bruhtus avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.