first version of the new dotfiles

This commit is contained in:
Enrico Fasoli 2015-08-24 22:05:28 +00:00
commit f8685b5163
7 changed files with 243 additions and 0 deletions

5
.gitconfig Normal file
View File

@ -0,0 +1,5 @@
[user]
email = fazius2009@gmail.com
name = Enrico Fasoli
[push]
default = simple

21
.vimrc Normal file
View File

@ -0,0 +1,21 @@
" Global settings
syntax on
filetype plugin indent on
set showcmd
set ruler
set mouse=a
set backupdir=~/.config/vim/backup/
set directory=~/.config/vim/backup/
set number
" Colors
highlight LineNr ctermfg=cyan
" Indent
set tabstop=2
set shiftwidth=2
set expandtab
" Search
set incsearch
set ignorecase

2
bin/telegram Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
chromium --app=http://web.telegram.org

15
bspwmrc Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
setxkbmap it
bspc config border_width 2
bspc window_gap 24
bspc config focused_border_color '#858585'
bspc config normal_border_color '#2e343D'
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless monocle true
bspc config focus_follows_pointer true
bspc config monitor -d I II III IV
feh --no--fehbg --bg-center ~/images/torvalds.png

56
configuration.nix Normal file
View File

@ -0,0 +1,56 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sdd";
networking.hostName = "Fazo-NixOS"; # Define your hostname.
networking.hostId = "6bc261fc";
i18n = {
consoleFont = "lat9w-16";
consoleKeyMap = "it";
defaultLocale = "en_US.UTF-8";
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
tmux vim sxhkd w3m rxvt_unicode chromium htop atom git zsh dmenu
];
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
gohufont
];
};
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
services.xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
layout = "it";
windowManager.bspwm.enable = true;
};
users.extraUsers.fazo = {
isNormalUser = true;
extraGroups = [ "wheel" ];
uid = 1000;
shell = "/run/current-system/sw/bin/zsh";
openssh.authorizedKeys.keys = [ ];
};
}

29
install Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
echo "Installing dotfiles"
# NixOS Configuration
sudo cp configuration.nix /etc/nixos/
echo "Activating NixOS configuration"
sudo nixos-rebuild switch
# Custom Binaries
sudo cp bin/* /usr/bin/
# Window Manager
mkdir -p ~/.config/bspwm
mkdir -p ~/.config/sxhkd
cp bspwmrc ~/.config/bspwm/
cp sxhkdrc ~/.config/sxhkd/
# Vim
mkdir -p ~/.config/vim/backup
cp .vimrc ~/
# Git
cp .gitconfig ~/
echo "This script does not install prezto"

115
sxhkdrc Executable file
View File

@ -0,0 +1,115 @@
#
# bspwm hotkeys
#
super + alt + Escape
for id in $(bspc query -W); do bspc window $id -c; done; \
bspc quit
super + w
bspc window -c
super + t
bspc desktop -l next
super + b
bspc desktop -B
super + {s,f}
bspc window -t {floating,fullscreen}
super + {grave,Tab}
bspc {window,desktop} -f last
super + apostrophe
bspc window -s last
super + {o,i}
bspc control --record-history off; \
bspc window {older,newer} -f; \
bspc control --record-history on
super + y
bspc window -w last.manual
super + m
bspc window -s biggest
super + {_,shift + }{h,j,k,l}
bspc window -{f,s} {left,down,up,right}
super + {_,shift + }c
bspc window -f {next,prev}
super + {comma,period}
bspc desktop -C {backward,forward}
super + bracket{left,right}
bspc desktop -f {prev,next}
super + ctrl + {h,j,k,l}
bspc window -p {left,down,up,right}
super + ctrl + {_,shift + }space
bspc {window -p cancel,desktop -c}
super + alt + {h,j,k,l}
bspc window -e {left -10,down +10,up -10,right +10}
super + alt + shift + {h,j,k,l}
bspc window -e {right -10,up +10,down -10,left +10}
super + ctrl + {1-9}
bspc window -r 0.{1-9}
super + {_,shift + }{1-9,0}
bspc {desktop -f,window -d} ^{1-9,10}
~button1
bspc pointer -g focus
super + button{1-3}
; bspc pointer -g {move,resize_side,resize_corner}
super + @button{1-3}
bspc pointer -u
#
# wm independent hotkeys
#
super + Return
urxvt
super + space
dmenu_run
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# my stuff
#
# volume controls
F9
amixer set Master 3- unmute
F10
amixer set Master 3+ unmute
F11
amixer set Master toggle
# turn screen off
F12
lock; sleep 2; xset dpms force off
alt + F12
lock
# screenshots
Print
scrot /tmp/screenshot.png -e 'copyq copy image/png - < $f && rm $f'
alt + Print
scrot -s /tmp/screenshot.png -e 'copyq copy image/png - < $f && rm $f'
alt + shift + Print
scrot "$HOME/pictures/screenshots/%d-%m-%Y %H:%M:%S.png"