adapted configuration to macbook

This commit is contained in:
Enrico Fasoli 2015-09-03 13:33:15 +02:00
parent d76d940e90
commit 7135e33d24
5 changed files with 68 additions and 37 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

14
bspwmrc
View File

@ -4,19 +4,21 @@
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 144
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
# 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 36 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 +27,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,41 @@
# 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;
};
};
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;
# 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.enable = true;
fileSystems."/mnt/Dati" = {
device = "/dev/sdd3";
options = "nofail,relatime,defaults";
};
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
# Networking
networking.hostName = "ape"; # Networking
networking.hostId = "6bc261fc"; networking.hostName = "warren";
networking.firewall.enable = false; networking.hostId = "476783f8";
networking.wireless.enable = true; networking.wireless.enable = true;
networking.connman.enable = true; networking.connman.enable = true;
@ -65,7 +75,7 @@
# 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 steam dwarf_fortress
# Applications # Applications
@ -77,15 +87,14 @@
# Media # Media
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 xlibs.xbacklight acpi
# Other stuff
]; ];
fonts = { fonts = {
enableFontDir = true; enableFontDir = true;
enableGhostscriptFonts = true; enableGhostscriptFonts = true;
fonts = with pkgs; [ fonts = with pkgs; [
gohufont gohufont inconsolata dejavu_fonts
]; ];
}; };
@ -103,13 +112,23 @@
# 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";
windowManager.default = "bspwm"; windowManager.default = "bspwm";
multitouch = {
enable = true;
invertScroll = true;
}; };
synaptics = {
enable = true;
};
};
logind.extraConfig = "handleLidSwitch=suspend";
upower.enable = true;
tlp.enable = true;
mpd = { mpd = {
enable = true; enable = true;
@ -138,13 +157,6 @@
longitude = "45.47"; longitude = "45.47";
}; };
transmission = {
enable = true;
settings = {
download-dir = "/mnt/Dati/Download/";
};
};
syncthing = { syncthing = {
enable = true; enable = true;
user = "fazo"; user = "fazo";

View File

@ -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 1
done done
} }
buildBar | lemonbar -p -g "1872x20+24+8" -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"

View File

@ -82,13 +82,17 @@ 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 20
XF86MonBrightnessDown
xbacklight -dec 20
XF86AudioRaiseVolume XF86AudioRaiseVolume
amixer set Master 3+ unmute amixer set Master 3+ unmute
XF86AudioLowerVolume XF86AudioLowerVolume