Compare commits

..

13 Commits

Author SHA1 Message Date
Enrico Fasoli
bda8e86613 use correct font for hidpi 2015-10-01 13:40:25 +02:00
Enrico Fasoli
29f69be89b automute audio on system start 2015-10-01 13:40:25 +02:00
Enrico Fasoli
29ab476fbe fix mistake 2015-10-01 13:40:25 +02:00
Enrico Fasoli
04e9bd588d fixed mouse, added aircrack, removed steam 2015-10-01 13:40:25 +02:00
Enrico Fasoli
3b972f638d more mouse fixes 2015-10-01 13:40:25 +02:00
Enrico Fasoli
fb9dacde66 more desktops for macbook 2015-10-01 13:40:25 +02:00
Enrico Fasoli
eb0750e1b5 add powertop and exfat 2015-10-01 13:40:25 +02:00
Enrico Fasoli
161cbe19f4 fixed mouse 2015-10-01 13:40:24 +02:00
Enrico Fasoli
16d43ed542 use higher dpi 2015-10-01 13:40:24 +02:00
Enrico Fasoli
1d1f878bcc more powersaving for macbook 2015-10-01 13:40:24 +02:00
Enrico Fasoli
589db2d35d added more synaptics conf 2015-10-01 13:40:24 +02:00
Enrico Fasoli
fa92e4a0f8 updates for mac 2015-10-01 13:40:24 +02:00
Enrico Fasoli
7135e33d24 adapted configuration to macbook 2015-10-01 13:40:24 +02:00
11 changed files with 125 additions and 110 deletions

View File

@ -49,8 +49,12 @@ URxvt*scrollstyle: rxvt
URxvt*internalBorder: 18 URxvt*internalBorder: 18
! font ! font
*font: -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1 xft.dpi: 144
URxvt*LetterSpace: -1 xft.hinting: 1
xft.antialias: 1
xft.hintstyle: hintfull
xft.rgba: rgb
*font: xft:DejaVu Sans Mono:pixelsize=24
! cursor ! cursor
URxvt*cursorBlink: true URxvt*cursorBlink: true
@ -76,7 +80,7 @@ URxvt*scrollTtyKeypress: true
!! SCRIPTS !! SCRIPTS
URxvt.perl-lib: /usr/lib/urxvt/perl/ URxvt.perl-lib: /run/current-system/sw/lib/urxvt/perl/
URxvt.perl-ext-common: default,matcher,clipboard,url-select,keyboard-select URxvt.perl-ext-common: default,matcher,clipboard,url-select,keyboard-select
! clipboard ! clipboard

58
.nvimrc
View File

@ -1,36 +1,14 @@
" Global settings " Global settings
syntax on
set showcmd set showcmd
set ruler set ruler
set wildmenu
set lazyredraw
set showmatch
set mouse=a set mouse=a
set nofoldenable
set backupdir=~/.config/neovim/backup/ set backupdir=~/.config/neovim/backup/
set directory=~/.config/neovim/backup/ set directory=~/.config/neovim/backup/
set number set number
set relativenumber
" Colors " Colors
set t_Co=16 highlight LineNr ctermfg=cyan
highlight Keyword ctermfg=06
highlight Define ctermfg=06
highlight Comment ctermfg=03
highlight Type ctermfg=08
highlight Operator ctermfg=05
highlight Identifier ctermfg=13
highlight Constant ctermfg=11
highlight Function ctermfg=01
highlight Include ctermfg=06
highlight Statement ctermfg=06
highlight String ctermfg=03
highlight Search ctermbg=14
highlight NonText ctermfg=00
highlight VertSplit ctermfg=08 cterm=none
highlight LineNr ctermfg=07
highlight Visual ctermbg=08 ctermfg=15
set fillchars+=vert:│
" Indent " Indent
set tabstop=2 set tabstop=2
@ -48,46 +26,22 @@ set rtp+=~/.config/neovim/bundle/Vundle.vim
call vundle#begin('~/.config/neovim/bundle') call vundle#begin('~/.config/neovim/bundle')
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
" Plugins
Plugin 'kien/ctrlp.vim' Plugin 'kien/ctrlp.vim'
Plugin 'itchyny/lightline.vim'
" Languages " Languages
Plugin 'kchmck/vim-coffee-script' Plugin 'kchmck/vim-coffee-script'
Plugin 'fatih/vim-go' Plugin 'fatih/vim-go'
Plugin 'wting/rust.vim' Plugin 'wting/rust.vim'
Plugin 'jgertm/nix.vim' Plugin 'godlygeek/tabular' " dependency for markdown
Plugin 'plasticboy/vim-markdown'
call vundle#end() call vundle#end()
filetype plugin indent on filetype plugin indent on
syntax on
" CtrlP " CtrlP
let g:ctrlp_map = '<c-p>' let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP' let g:ctrlp_cmd = 'CtrlP'
" StatusLine
set laststatus=2 " Markdown
set noshowmode
let s:p = {'normal': {}, 'inactive': {},
\'insert': {}, 'replace' : {},
\'visual': {}, 'tabline' : {}}
let s:p.normal.left = [ [ 07, 14 ], [ 08, 00 ] ] let g:vim_markdown_folding_disabled=1
let s:p.insert.left = [ [ 07, 05 ], [ 14, 00 ] ]
let s:p.visual.left = [ [ 00, 03 ], [ 14, 00 ] ]
let s:p.replace.left = [ [ 00, 02 ], [ 14, 00 ] ]
let s:p.inactive.left = [ [ 12, 00 ], [ 15, 00 ] ]
let s:p.tabline.left = [ [ 14, 00 ] ]
let s:p.normal.right = [ [ 12, 00 ], [ 03, 00 ] ]
let s:p.tabline.right = [ [ 12, 00 ], [ 03, 00 ] ]
let s:p.inactive.right = [ [ 12, 00 ], [ 13, 00 ] ]
let s:p.normal.middle = [ [ 12, 00 ] ]
let s:p.inactive.middle = [ [ 12, 00 ] ]
let s:p.tabline.middle = [ [ 14, 00 ] ]
let s:p.tabline.tabsel = [ [ 14, 00 ] ]
let s:p.normal.error = [ [ 00, 05 ] ]
let s:p.normal.warning = [ [ 00, 02 ] ]
let g:lightline#colorscheme#default#palette = lightline#colorscheme#fill(s:p)

View File

@ -1,2 +0,0 @@
#!/bin/sh
curl http://canihazip.com/s

2
bin/refreship Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
rm -f /tmp/myip

17
bspwmrc
View File

@ -4,19 +4,24 @@
setxkbmap it setxkbmap it
# Dont show ugly X shaped cursor # Dont show ugly X shaped cursor
xsetroot -cursor_name left_ptr xsetroot -cursor_name left_ptr
# Set DPI
xrandr --dpi 196
# Mute audio by default
amixer set Master 0 mute
udiskie & udiskie &
# Start lemonbar # Start lemonbar
sh ~/.config/bspwm/lemonbar.sh & sh ~/.config/bspwm/lemonbar.sh &
# Set up desktops on monitors # Set up desktops
bspc monitor DVI-I-0 -d 1 2 3 4 5 bspc monitor -d 1 2 3 4 5 6 7
bspc monitor HDMI-0 -d 6 7 8 9 bspc monitor -d 1 2 3 4 5 6 7
# Set up bspwm theme # Set up bspwm theme
bspc config border_width 2 bspc config border_width 2
bspc window_gap 24 bspc window_gap 48
bspc config -m DVI-I-0 top_padding 20 bspc config top_padding 46
bspc config focused_border_color '#858585' bspc config focused_border_color '#858585'
bspc config normal_border_color '#2e343D' bspc config normal_border_color '#2e343D'
bspc config split_ratio 0.52 bspc config split_ratio 0.52
@ -25,4 +30,4 @@ bspc config gapless monocle true
bspc config focus_follows_pointer true bspc config focus_follows_pointer true
# Show desktop background # Show desktop background
feh --no-fehbg --bg-center ~/Pictures/background.png feh --no-fehbg --bg-center ~/Pictures/background.*

View File

@ -8,31 +8,51 @@
# System # System
boot.loader.grub.enable = true; boot = {
boot.loader.grub.version = 2; loader = {
boot.loader.grub.device = "/dev/sdd"; grub.enable = false;
gummiboot.enable = true;
generationsDir = {
enable = false;
copyKernels = false;
};
};
kernel = {
sysctl = {
"kernel.nmi_watchdog" = 0; # Disable watchdog
"vm.swappiness" = 0; # Avoid swapping as much as possible
"vm.laptop_mode" = 5; # Use laptop mode (Knob at 5)
"vm.dirty_writeback_centisecs" = 6000; # Aggregate disk IO
};
};
extraModprobeConfig = ''
options libata.force=noncq
options resume=/dev/sda5
options snd_hda_intel index=0 model=intel-mac-auto id=PCH
options snd_hda_intel index=1 model=intel-mac-auto id=HDMI
options snd-hda-intel model=mbp101
options hid_apple fnmode=2
'';
};
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
virtualisation.virtualbox.host.enable = true;
# SSD # SSD
boot.tmpOnTmpfs = true; # save some writes boot.tmpOnTmpfs = true; # save some writes
fileSystems."/".options = "discard,noatime"; fileSystems."/".options = "discard,noatime";
fileSystems."/boot".options = "discard,noatime,defaults";
# Mount Data disk powerManagement = {
fileSystems."/mnt/Dati" = { enable = true;
device = "/dev/sdd3";
options = "nofail,relatime,defaults";
}; };
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
virtualisation.virtualbox.host.enable = true;
# Networking # Networking
networking.hostName = "warren";
networking.hostName = "ape"; networking.hostId = "476783f8";
networking.hostId = "6bc261fc";
networking.firewall.enable = false;
networking.wireless.enable = true; networking.wireless.enable = true;
networking.connman.enable = true; networking.connman.enable = true;
@ -65,9 +85,9 @@
# Libs and Tools # Libs and Tools
xsel urxvt_perls xclip python34Packages.udiskie encfs xsel urxvt_perls xclip python34Packages.udiskie encfs
# Desktop Environment helpers # Desktop Environment helpers
dmenu bar i3lock sxhkd dmenu bar-xft i3lock sxhkd
# Games # Games
minecraft steam dwarf_fortress minecraft dwarf_fortress
# Applications # Applications
neovim ranger weechat bc w3m gnupg zathura go14Packages.ipfs.bin neovim ranger weechat bc w3m gnupg zathura go14Packages.ipfs.bin
tmux htop rxvt_unicode pandoc mosh ncdu cv pv tree screenfetch tmux htop rxvt_unicode pandoc mosh ncdu cv pv tree screenfetch
@ -78,14 +98,14 @@
beets mpd mpc_cli ncmpcpp popcorntime mpv beets mpd mpc_cli ncmpcpp popcorntime mpv
# Drivers, file systems and other compatibility-aimed packages # Drivers, file systems and other compatibility-aimed packages
ntfs3g exfat utillinuxCurses gptfdisk encfs ntfs3g exfat utillinuxCurses gptfdisk encfs
# Other stuff xlibs.xbacklight acpi powertop
]; ];
fonts = { fonts = {
enableFontDir = true; enableFontDir = true;
enableGhostscriptFonts = true; enableGhostscriptFonts = true;
fonts = with pkgs; [ fonts = with pkgs; [
gohufont gohufont inconsolata dejavu_fonts
]; ];
}; };
@ -103,18 +123,43 @@
# Desktop Environment # Desktop Environment
xserver = { xserver = {
enable = true; enable = true;
videoDrivers = [ "nvidia" ];
layout = "it"; layout = "it";
windowManager.bspwm.enable = true; windowManager.bspwm.enable = true;
desktopManager.xterm.enable = false; desktopManager.xterm.enable = false;
desktopManager.default = "none"; desktopManager.default = "none";
displayManager.desktopManagerHandlesLidAndPower = false;
windowManager.default = "bspwm"; windowManager.default = "bspwm";
displayManager.slim.theme = pkgs.fetchurl { synaptics = {
url = "https://github.com/rnhmjoj/nix-slim/archive/0.2.0.tar.gz"; enable = true;
sha256 = "08m6ks6crdyr02ll50gy3vpn3rzq6rp5jm2bli526r432xacdmj1"; buttonsMap = [1 3 2];
tapButtons = false;
maxSpeed = "3";
minSpeed = "0.5";
accelFactor = "0.06";
palmDetect = true;
twoFingerScroll = true;
additionalOptions = ''
Option "LockedDrags" "true"
Option "AccelerationProfile" "-111"
Option "VertScrollDelta" "-111"
Option "HorizScrollDelta" "-111"
'';
}; };
}; };
logind.extraConfig = ''
HandlePowerKey="ignore"
'';
upower.enable = true;
tlp = {
enable = true;
extraConfig = ''
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
'';
};
mpd = { mpd = {
enable = true; enable = true;
user = "fazo"; user = "fazo";
@ -142,18 +187,12 @@
longitude = "45.47"; longitude = "45.47";
}; };
transmission = {
enable = false;
settings = {
download-dir = "/mnt/Dati/Download/";
};
};
syncthing = { syncthing = {
enable = true; enable = true;
user = "fazo"; user = "fazo";
dataDir = "/home/fazo/.config/syncthing"; dataDir = "/home/fazo/.config/syncthing";
}; };
}; };
# Custom Services # Custom Services
@ -174,10 +213,11 @@
enable = true; enable = true;
shellInit = "export ZDOTDIR=~/.config/zsh"; shellInit = "export ZDOTDIR=~/.config/zsh";
}; };
programs.kbdlight.enable = true;
users.extraUsers.fazo = { users.extraUsers.fazo = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "transmission" "vboxusers" ]; extraGroups = [ "wheel" "vboxusers" ];
uid = 1000; uid = 1000;
shell = "/run/current-system/sw/bin/zsh"; shell = "/run/current-system/sw/bin/zsh";
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIqHaL0uH1ko/jLI3JeetD4bITUF34IE9HTEvF2Go8JYbhk3YSsG0/EoNu8dhA35S45Y7TXUk/K0axcqmFUePVwY271b7L+9I7/ehUg1wHOaNLCf/ueAyRfo5ZUHuH1YnTg9TinwVi0dynjVMaaVDR1YWVgzuw0KTEDW5em5m+jRbDvFrrq72D2GD/fYqkc2Z/cmnRijMi26PCF1xTq4g6BlIUYloCN+ZlDRvkSWiqCcFD3a/QOZXsUBVg80K4QrHVwj4+Bu2M1KDLhmW+8fzMkbwzKumUFt9SwcQh5Tq/MQfzSWOO2wtn1sys0BDKGazJwn9gMFNkcFbRsD5Uqcgh fazo@mac.lan" ]; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIqHaL0uH1ko/jLI3JeetD4bITUF34IE9HTEvF2Go8JYbhk3YSsG0/EoNu8dhA35S45Y7TXUk/K0axcqmFUePVwY271b7L+9I7/ehUg1wHOaNLCf/ueAyRfo5ZUHuH1YnTg9TinwVi0dynjVMaaVDR1YWVgzuw0KTEDW5em5m+jRbDvFrrq72D2GD/fYqkc2Z/cmnRijMi26PCF1xTq4g6BlIUYloCN+ZlDRvkSWiqCcFD3a/QOZXsUBVg80K4QrHVwj4+Bu2M1KDLhmW+8fzMkbwzKumUFt9SwcQh5Tq/MQfzSWOO2wtn1sys0BDKGazJwn9gMFNkcFbRsD5Uqcgh fazo@mac.lan" ];

View File

@ -28,11 +28,6 @@ cp ./.Xresources ~/
mkdir -p ~/.config/neovim/backup mkdir -p ~/.config/neovim/backup
cp .nvimrc ~/ cp .nvimrc ~/
if [ ! -d "~/.config/neovim/bundle" ]; then
echo "Installing Vundle for NeoVim"
git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/neovim/bundle/Vundle.vim
fi
# Tmux # Tmux
cp .tmux.conf ~/ cp .tmux.conf ~/

View File

@ -2,14 +2,9 @@
echo "Installing prezto" echo "Installing prezto"
if [ -z "$ZDOTDIR" ]; then
echo "ZDOTDIR not set."
exit 1
fi
mkdir -p $ZDOTDIR mkdir -p $ZDOTDIR
git clone --recursive https://maxwell.ydns.eu:44333/fazo96/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" git clone --recursive https://github.com/fazo96/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
setopt EXTENDED_GLOB setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do

View File

@ -9,7 +9,7 @@ GREEN2="#6d6137"
BROWN="#776049" BROWN="#776049"
buildClock() { buildClock() {
echo -n "%{F$WHITE2}$(date "+%A, %e %B, %k:%M:%S")" echo -n "%{F$WHITE2}$(date "+%A, %e %B, %k:%M")"
} }
getVolume() { getVolume() {
@ -84,13 +84,22 @@ getMEM(){
echo -n "%{F$BLUE}$USEDMEM MB" echo -n "%{F$BLUE}$USEDMEM MB"
} }
getBAT(){
BAT=$(acpi -b | cut -d ' ' -f4)
if [ $BAT != "100" ]; then
BAT=$(echo "$BAT" | cut -d '%' -f1)
fi
echo -n "%{F$GREY}$BAT $(echo $BAT 0 100 | spark | cut -b 1-3)"
}
buildBar () { buildBar () {
while true while true
do do
echo " $(getMPD) %{c}$(buildClock) %{r} $(getLOAD) $(separator) $(getMEM) $(separator) $(getDISK) $(separator) $(getNET) $(separator) $(getVolume) " echo " $(getMPD) %{c}$(buildClock) %{r} $(getLOAD) $(separator) $(getMEM) $(separator) $(getDISK) $(separator) $(getNET) $(separator) $(getVolume) $(separator) $(getBAT) "
sleep 1 sleep 5
done done
} }
buildBar | lemonbar -p -g "1920x20" -B "$BLACK" -F "$GREY" -f -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1 SCREENX=$(echo "$(xrandr --current | grep \* | cut -b 4-7) - 48" | bc)
buildBar | lemonbar -p -g "$SCREENX+24+8" -B "$BLACK" -F "$GREY" -f "xft:DejaVu Sans Mono:pixelsize=24"

17
sxhkdrc
View File

@ -82,13 +82,25 @@ super + Return
urxvt urxvt
super + space super + space
dmenu_run -fn "-gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1" dmenu_run -fn "xft:DejaVu Sans Mono:pixelsize=24"
# make sxhkd reload its configuration files: # make sxhkd reload its configuration files:
#super + Escape #super + Escape
# pkill -USR1 -x sxhkd # pkill -USR1 -x sxhkd
# media # media
XF86MonBrightnessUp
xbacklight -inc 10
XF86MonBrightnessDown
xbacklight -dec 10
XF86KbdBrightnessUp
kbdlight up 10
XF86KbdBrightnessDown
kbdlight down 10
XF86AudioNext
mpc next
XF86AudioPrev
mpc prev
XF86AudioRaiseVolume XF86AudioRaiseVolume
amixer set Master 3+ unmute amixer set Master 3+ unmute
XF86AudioLowerVolume XF86AudioLowerVolume
@ -107,7 +119,8 @@ XF86Mail
# lock # lock
XF86Sleep XF86Sleep
i3lock -u -c 1d1f21 -i ~/Pictures/background.png XF86LaunchB
i3lock -u -c 1d1f21 -i ~/Pictures/background.*
# screenshots # screenshots
Print Print

View File

@ -1,5 +1,5 @@
# general # general
set font "gohufont normal 11" set font "xft:DejaVu Sans Mono pixelsize=24"
set default-bg "#181b20" set default-bg "#181b20"
set statusbar-fg "#cdcdcd" set statusbar-fg "#cdcdcd"