Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

dotfiles

Powered by:

What are dotfiles?

In the Unix world programs are configured either via shell arguments or plain-text files known as "dotfiles". They are called "dotfiles" because the file name begings with a dot . and are therefore hidden. You might find that many of the dotfiles contain an rc such as .bashrc or .zshrc, those are runcom files that contain an application's startup instructions.

The goal of this setup is to create a minimal distraction free work environment using the least amount of hardware ressources (350 Mb memory usage at idle proves it well). Ricing and visual improvements are a secondary goal.

Preview


Nord Wallpapers

The wallpaper shown in preview images: here
The following repositories contains a multitude of Nord-themed wallpapers: [1, 2]


Dependencies

Operating System

This setup could be reproduced on any GNU/Linux distribution using Systemd. It could however not be could not be fully reproduced on macOs or Bsd systems.

An initial minimal installation of the operating system is recommended. This means an installation without a desktop environment (such as Xfce, Gnome or Kde) as the window manager and the hotkey deamon might interfere with the desktop environment (another reason why ricers use Arch BTW).

Programs

RoleProgram
Display ServerX11 (Xorg)
Window ManagerBspwm
Hotkey daemonSxhkd
RandRxorg-xrandr
CompositorPicom
BarsPolybar
Terminal EmulatorKitty
ShellZsh
Music Player ServerMPD
MPD client (Cli)ncmpcpp
MPD client (Gui)Ario
Lockscreenthis fork of betterlockscreen
Wallpaper setter for XNitrogen and feh
Dmenu replacement (Window switcher, application launcher, etc.)rofi
Audio visualizerGlava
File manager (Cli)ranger
File manager (Gui)Thunar
Document viewerZathura

Fonts

Some fonts will need to be installed to achieve the same results as in the screenshots.
Free Sans Regular
ttf-nerd-fonts-symbols
FiraCode Nerd Font
ttf-font-awesome

  • The default font used globally in GTK and qt5 applications as well as in the polybar bar is the Free Sans Regular font. This font could be found in the gnu-free-fonts package available in most distribution official repositories.

  • The terminal emulator (kitty) and Vim use the following fonts for text, symbols, icons and powerline glyphs: ttf-nerd-fonts-symbolsand FiraCode Nerd Font.

  • Polybar requires ttf-font-awesometo display bar glyphs.

Icons

The papirus icon theme is used in the screenshots. The color of "places" and folders have been changed using the papirus folders script.


Sxhkd key bindings

Key BindingAssociated ActionCategory
super + returnopen terminal (kitty)General
super + spacerun rofi as program launcherGeneral
super + alt + spacerun rofi as window switcherGeneral
super + escapereload sxhkd configuration filesGeneral
super + alt + qlogout of Xorg (return to TTY)BSPWM
super + alt + rrestart bspwmBSPWM
super + wclose focused windowBSPWM
super + shift + wkill focused windowBSPWM
super + mswitch between monocle and tiled layoutsBSPWM
super + ysend the newest selected node to the newest preselected nodeBSPWM
super + gswap the focused node with the biggest windowBSPWM
super + tset window state to "tiled"States
super + shift + tset window state to "pseudo tiled"States
super + sset window state to "floating"States
super + fset window state to "fullscreen"States
super + ctrl + mset node flag to "marked"Flags
super + ctrl + xset node flag to "locked"Flags
super + ctrl + yset node flag to "sticky"Flags
super + ctrl + zset node flag to "private"Flags
super + (h l, j, k)focus the node in the (west, east, south, north) direction (Vim directions)Focusing
super + commafocus the first selected node when multiple are selectedFocusing
super + periodfocus the last selected node when multiple are selectedFocusing
super + (shift) + ccycle through next/(previous) windows in a workspaceFocusing
super + gravefocus the last nodeFocusing
super + tabfocus the last workspaceFocusing
super + {focus the previous workspaceFocusing
super + }focus the next workspaceFocusing
super + ofocus the older node in the focus historyFocusing
super + ifocus the newer node in the focus historyFocusing
super + pselect multiple nodes in a workspaceSelecting
super + bselect the brother node in a workspaceMoving
super + rrotate all windows clockwise by 90 degreesMoving
super + shift + (1,2,..,0)focus or send window to the given workspaceMoving
super + shift + rrotate all windows counterclockwise by 90 degreesMoving
super + alt + shift + rflip desktop (What is on the right/top moves to the left/bottom)Moving
super + (left, down, up, right)move a floating windowMoving
super + alt + (h, j, k, l)expand a window by moving its side outward (Vim keys)Resizing
super + alt + shift + (h, j, k, l)contract a window by moving its side inward (Vim keys)Resizing
super + ctl + (h,j,k,l)preselect the direction (Vim directions)Preselection
super + ctl + (1,2,..,9)preselect the ratioPreselection
super + ctl + (shift) + spacecancel preselection for focused node (desktop)Preselection
super + shift + yremove all gapsGaps
super + shift + uset gaps t 5 pixelsGaps
super + shift + iset gaps to 10 pixelsGaps
super + shift + oset gaps to 20 pixelsGaps
super + minusmake the gaps smaller by 2 pixelsGaps
super + equalmake the gaps larger by 2 pixelsGaps
super + alt + 1lock the screen (dimblur mode)Power
super + alt + 2lock and suspend (dimblur mode)Power
super + alt + 3rebootPower
super + alt + 4poweroffPower
super + alt + stake a screenshot using gnome-screenshotApplications
super + alt + flaunch FirefoxApplications
super + alt + mlaunch ArioApplications
super + alt + tlaunch thunarApplications
super + alt + zdistract mode (open a bunch of random windows)Applications

Managing dotfiles

There are many way people manage their dotfiles. A naive approach would be to create a git repository in the $HOME directory. This is obviously a bad idea because you could no longer have nested git repositories in your home directory. A second still naive approach would be to create a git repository in a directory and copy all dotfiles from the $HOME directory to it. This is again not a good idea as you will have to remember to copy all files to the created git directory at every change. After using the second approach, you might stumble upon an article about symbolic links (symlinks) and think that symlinking the files into your initialized git repositry is a good idea. This third method is a huge improvement compared to the first method but symlinks can get out of hand after a while. Soon you will realize that you are not SystemD and you don't want to bother with symlinking.

So here's what I now do to manage my dotfiles after going through all those steps:

  1. create a bare git repository. Git bare repositories, contain no working or checked out copy of your source files and the revision history of your repo in the root folder of your repository instead of in a .git subfolder.

git init --bare $HOME/dotfiles

  1. Set an alias for managing the bare repository we just created. You can name your alias dot or config. Let's call it dot. (change .bashrc to .zshrc if you use zsh.

echo "alias dot='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

  1. There will be a lot of files in our $HOME directory that won't be dotfiles. So let's also ignore all those untracked files.

dot config --local status.showUntrackedFiles no

Here you have it! You can now use the new git dotfiles repo like any other git repo.

dot add /path/to/file
dot commit -m "A short message"
dot push

Note: Many people use GNU Stow which is also a good option.


Installation

The best way of installing dotfiles is to copy files or part of the files that you like into their respective directories.
But if you want to install them all of once, first make sure you have all the dependencies listed above. Then:

mv ~/.config ~/.config-bak
mv ~/.bash_profile ~/.bash_profile-bak
mkdir -p ~/.config/ ~/.dotfiles/ echo 'alias dot="/usr/bin/git --git-dir=$HOME/.dotfiles/dotfiles/ --work-tree=$HOME"' >> $HOME/.bashrc source ~/.bashrc && mv ~/.bashrc ~/.bashrc-bak
echo ".dotfiles/dotfiles" >> .gitignore
git clone --bare https://github.com/yazdanz/dotfiles.git $HOME/.dotfiles/dotfiles
dot checkout
dot config --local status.showUntrackedFiles no

Releases

Contributors

Languages