Skip to content

My system configuration dotfiles managed with a git --bare repository. @noncog does dotfiles!

License

Notifications You must be signed in to change notification settings

noncog/.dotfiles

Repository files navigation

~/.dotfiles

This repository holds my system configuration files. Take what you like or use as is!

For a tutorial on managing your dotfiles with git -bare see More Information!

Overview

This system follows my philosophy of how a system should be built, maintained, and interacted with.

Philosophy

Everyone has one on Linux ... these are mine.

  • Stability

    I don’t need or use the latest and greatest.

    • I would rather it just work.
    • Often, older tools are better supported and more powerful than “the next big thing.”
    • I use Debian Stable to get long term support instead of something like a “rolling release” distribution.
      • Run like the wind, Bullseye!

  • Minimalism

    I try to do the most with what I’ve got.

    • I prefer to use the tools I already have to accomplish what another tool could.
    • Sometimes I break this convention for the sake of aesthetics. e.g. rofi > dmenu
    • I use a minimal install of Debian and build my entire system from a TTY to a full desktop environment.
    • I avoid excess. For example, I have no desktop manager, only a window manager. I am the only user of the system and anything more would be bloat.
    • Order of preference: Emacs > TUI > GUI.

  • Customizability

    All software I use must be highly configurable and not force the user into limiting conventions.

    • Configuration must be text-based.
    • Colors must be configurable.
    • Keybinds must be configurable.

    Thankfully, most popular software for Linux easily meets these needs.

  • Automation

    I don’t want to waste time building a system again.

    • I automate the installation and versioning of my system software, setup, and dotfiles using my debian-autosetup script.
    • My configurations are version controlled and managed through GitHub using a git -bare repository.
    • This allows my configuration files to be easily versioned from and automatically installed to their appropriate location, just by cloning this repository! This means no copying/moving or symlinks.

    To understand my system or setup your own dotfiles managed with git -bare see More Information below!

  • Sharing

    Foremost, I believe in empowering others by sharing information.

    • Otherwise, you wouldn’t be reading this.
    • For all the information about my system, using it, or building your own:
      See More Information below.

Features

  • Dracula theme everywhere!
  • Fira Code font.
  • Font Awesome 5 font based icons!.
  • Floating YouTube player!
  • Integrated Windowing - i3 and Emacs use the same keybinds for window controls.
  • CPU Thermometer - A reactive icon, with warning colors.
  • Xmodmap - System level keyboard mapping. Caps lock bound to control!
  • Custom Menus - Powered by Rofi!

    • Cogmenu - My custom system menu.
      • Screenshots
        • Screen
        • Area
        • Window
        • uses scrot
      • Brightness
        • Up
        • Down
        • uses xrandr
      • Backups
      • Controls
        • Desktop mode - For laptop docking
        • Reload i3
        • Reload Xmodmap
        • i3 Keybinds Viewer
      • System Menu
        • Power off
        • Restart
        • Logout i3
    • rofi-chemacs - My custom Emacs menu based on Chemacs2.
      • Profiles
      • Daemons
      • Configs
      • Kill Emacs
  • Editors!
    • Cogmacs - My vanilla Emacs configuration.
    • Doom - My evil Emacs configuration, powered by Vim binds!.
    • Vim - Everyone’s favorite modal editor… even though Emacs has modes.

Software
PurposeSoftwareConfig
OSDebian 11 
WMi3.config/i3
LauncherRofi.config/rofi
NotificationsDunst.config/dunst
Status BarPolybar.config/polybar
CompositorPicom.config/picom
WallpapersNitrogen.config/nitrogen
ScreenshotsScrot 
Network MenuNetwork-Manager-Gnome 
TerminalKitty.config/kitty
ShellBash.bashrc
EditorEmacs.config/cogmacs
EditorDoom Emacs.config/doom
EditorVim 
File ManagerRanger.config/ranger
Ebook ReaderZathura.config/zathura
Image ViewerSXIV 
Video PlayerVLC 
Keybinds

I try to control everything primarily with the keyboard.

Modifiermod
Drag Floating Windowsmod
Make Window Floatmod+Shift+space
Toggle Focus Tiling/Floatingmod+space
Hide Visible Scratchpad Windowsmod+semicolon
Cycle Scratchpad Windowsmod+apostrophe
Tabbed Layout Modemod+Tab
Split Layout Modemod+grave
Fullscreenmod+F11
Emergency Shutdownmod+Control+Delete
Window Focus Leftmod+h
Window Focus Downmod+j
Window Focus Upmod+k
Window Focus Rightmod+l
Move Window Leftmod+Shift+h
Move Window Downmod+Shift+j
Move Window Upmod+Shift+k
Move Window Rightmod+Shift+l
Resize Modemod+r
Split Window Verticallymod+v
Split Window Horizontallymod+s
Kill Windowmod+Shift+q
Workspace 1mod+1
Workspace 2mod+2
Workspace 3mod+3
Move Window to Workspace 1mod+Shift+1
Move Window to Workspace 2mod+Shift+2
Move Window to Workspace 3mod+Shift+3
Launch Rofimod+BackSpace
Cogmenu / System Menumod+Escape
ScreenKeymod+Shift+question
Extreme Coolingmod+Shift+z
Move Window to Emacs Workspacemod+Control+Shift+e
Rofi-Chemacs / Launch Emacsmod+Shift+e
Focus Emacsmod+e
Move Window to FireFox Workspacemod+Control+Shift+f
Launch Firefoxmod+Shift+f
Focus Firefoxmod+f
Move Window to Code Workspacemod+Control+Shift+c
Launch CLionmod+Shift+c
Focus CLionmod+c
Move Window to Code Workspacemod+Control+Shift+p
Launch Pycharmmod+Shift+p
Focus Pycharmmod+p
Move Window to Code Workspacemod+Control+Shift+i
Launch IntelliJmod+Shift+i
Focus IntelliJmod+i
Move Window to Anki Workspacemod+Control+Shift+a
Launch Ankimod+Shift+a
Focus Ankimod+a
Launch Gimpmod+Shift+g
Focus Gimpmod+g
Launch Terminalmod+Shift+Return
Focus Terminalmod+Return
Launch Tormod+Shift+t
Focus Tormod+t
Launch Disordmod+Shift+d
Focus Discordmod+d
Launch Spotifymod+Shift+m
Focus Spotifymod+m
Launch YouTube Playermod+Shift+y
Focus YouTube Playermod+y

Disclaimer: This is not a community framework or distribution. It’s a private configuration and an ongoing experiment that may change without warning.

However, if you would like to use my system, then see More Information below.

More Information

System

It’s actually very simple. The software I use and their configurations are installed by debian-autosetup.

Use Mine

If you want to use my system as is, just follow the instructions for debian-autosetup.

  • Note I use Nvidia and Intel wifi drivers, remove those from the apt package list if you don’t.

Build Your Own

You may not want to use my system, because it’s custom to me. But you can still use my tools and techniques to save yourself a lot of work.

The configurations are managed in a git -bare repository. And debian-autosetup can install software and configurations managed with git -bare repositories.

Therefore, to have a fully version controlled system with an automatic installer, all you must do is:

  1. Fork debian-autosetup
  2. Manage your dotfiles with a git -bare repository. See guide below.
  3. Customize debian-autosetup with your software and point it to your dotfiles repository.

Git -Bare Setup Guide

This is the absolute bare minimum guide one could use to start managing their dotfiles with a bare repository. For more information, there are numerous other guides on the internet, that make the topic seem more complex than it is…

A word of advice:

  • See Recommendations section below for important GitHub practices before beginning.
  • You do not need a .gitignore, so long as you never add .dotfiles to your .dotfiles.

Initial Setup

Create a bare repository and an alias command to control it. Then hide all untracked files.

git init --bare $HOME/.dotfiles
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc
dotfiles config --local status.showUntrackedFiles no

Adding Files

dotfiles add .bashrc
dotfiles commit -m "Added .bashrc"

First Push / Remote Setup

dotfiles remote add origin <your dotfiles repo> 
dotfiles push -u origin master

Commands

After everything is setup, you can use all git commands with the dotfiles alias.

# common commands
dotfiles push
dotfiles status
dotfiles log

Cloning

To get your configurations (or these) on a fresh system, you simply clone the bare repository, checkout, and they’re automatically installed!

I reccomend you let the cloning be done by debian-autosetup.

If you want to know how it’s done though…

Simple Clone
git clone --bare <your dotfiles repo> $HOME/.dotfiles
  
# alias only in this shell instance
# assumes you back up your .bashrc with the permanent alias,
# which will be installed momentarily.
  
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

dotfiles checkout

If you have configs already in place, the above will likely fail, and ask you to remove the config files before dotfiles can be cloned in.

If this is the case, you can manually solve conflicts or use the following automatic cloning script:

  • WARNING: This will backup your dotfiles and replace them.
  • NOTE This is the same script used in debian-autosetup.
Automated Cloning Script
# clone dotfiles
git clone --bare <your dotfiles repo> $HOME/.dotfiles

# checkout will backup dotfiles in the way
cd ${HOME}
mkdir -p .dotfiles-backup && \
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .dotfiles-backup/{}

# now check out
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout

# hide untracked files
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME config --local status.showUntrackedFiles no

Recommendations For GitHub Users

Use the private noreply email provided by GitHub to prevent leaking your personal email in git commits.

  • Provided by GitHub here.
- set on the command line using:
git config --global user.email <noreply-email>
- check it was set using:
git config --global user.email

Use personal access tokens or ssh keys when commiting from the command line.

  • Access tokens provided by GitHub here.
- generate a token for repository changes.
- save it locally to your system, it will not be accessible again.
- enter the token when prompted for your password during a push.
  • ssh setup guide provided by GitHub here.