massive installer update , a new screenie and work-xps settings

This commit is contained in:
Rick van Lieshout 2018-07-20 22:12:59 +02:00
parent 9fd93cd929
commit 889139a906
18 changed files with 123 additions and 26 deletions

View File

@ -2,10 +2,12 @@
This repository holds my Linux config files.
## Mandatory unixporn screenshot
## Mandatory unixporn screenshots
[![dotfiles](dotfiles.png)](https://raw.githubusercontent.com/Mastermindzh/dotfiles/master/dotfiles.png)
[![dotfiles2](dotfiles2.png)](https://raw.githubusercontent.com/Mastermindzh/dotfiles/master/dotfiles2.png)
## Tools
| Purpose | Tool |
@ -23,3 +25,10 @@ This repository holds my Linux config files.
| Music | Google Play Music Desktop Player |
| | |
## computer specifc setup
Nowadays I use a few different computers and I'd used to apply the base config and configure each pc on its own.
I've grown tired of this approach however so I added a "pc specific" setup in the installer.
The pc specific setup bit will read the folder names in computers, offer you a choice, and execute the install.sh inside that folder.
This allows me to get pc specific settings synced with git and applied easily.

View File

@ -32,6 +32,10 @@ alias status='git status'
alias push='git push'
alias add='git add .'
#dotnet core
alias efupdate="dotnet ef database update"
alias efmigrate="dotnet ef migrations add"
##utility
alias nmapscan='nmap -n -sP'
alias pia='nohup sh /opt/pia/run.sh &>/dev/null & disown'

View File

@ -12,10 +12,15 @@ source ~/.alias
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
eval $(thefuck --alias)
source ~/.custom
# Fix .netcore paths if dotnet is installed
if hash dotnet 2>/dev/null; then
export PATH="$PATH:~/.dotnet/tools"
export DOTNET_ROOT=$(dirname $(realpath $(which dotnet)))
fi
#... :P fancy stuffs
#screenfetch -t -A "UBUNTU"
neofetch

View File

@ -1,4 +0,0 @@
# PC specific stuff goes here
# example
# alias vm="export QT_AUTO_SCREEN_SCALE_FACTOR= QT_SCREEN_SCALE_FACTORS= QT_SCALE_FACTOR= QT_DEVICE_PIXEL_RATIO= && VBoxManage setextradata Windows10 GUI/HiDPI/UnscaledOutput 1 && sudo VBoxManage startvm Windows10"

View File

@ -0,0 +1,3 @@
#/bin/bash
# no changes yet.

View File

@ -0,0 +1,4 @@
Xft.dpi: 108
Xft.antialias: 1
rofi.dpi: 150
Xcursor.size: 12

View File

@ -1,3 +1,4 @@
Xft.dpi: 200
Xft.antialias: 1
rofi.dpi: 275
rofi.dpi: 250
Xcursor.size: 18

View File

@ -0,0 +1,3 @@
alias vm='su -c "export QT_AUTO_SCREEN_SCALE_FACTOR= QT_SCREEN_SCALE_FACTORS= QT_SCALE_FACTOR= QT_DEVICE_PIXEL_RATIO= && VBoxManage setextradata Windows10 GUI/HiDPI/UnscaledOutput 1 && sudo VBoxManage startvm Windows10" && exit'
alias dock='bash ~/.docked.sh && i3-msg restart'
alias undock='bash ~/.undocked.sh && i3-msg restart'

3
computers/work-xps/docked.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
xrandr --output eDP-1 --mode 2560x1440 --pos 0x0 --rotate normal --output DP-1-2 --off --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --off --output DP-1-3 --off --output DP-2 --off --output DP-1-1 --primary --mode 2560x1440 --pos 2560x0 --rotate normal
xrdb -merge ~/.Xresources.docked

View File

@ -0,0 +1,16 @@
#/bin/bash
MYPATH=$PWD/computers/work-xps
# set up hiDPI
sudo ln -sf "$MYPATH/environment" /etc/environment
# set up docking
ln -sf "$MYPATH/Xresources.docked" ~/.Xresources.docked
ln -sf "$MYPATH/Xresources.undocked" ~/.Xresources.undocked
ln -sf "$MYPATH/docked.sh" ~/.docked.sh
ln -sf "$MYPATH/undocked.sh" ~/.undocked.sh
ln -sf "$MYPATH/xprofile" ~/.xprofile
# custom (laptop specific) bashrc thingies :)
ln -sf "$MYPATH/custom-bashrc.sh" ~/.custom

3
computers/work-xps/undocked.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
xrandr --output eDP-1 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-1-2 --off --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --off --output DP-1-3 --off --output DP-2 --off --output DP-1-1 --off
xrdb -merge /home/mastermindzh/.Xresources.undocked

View File

@ -0,0 +1,18 @@
if [ `xrandr | grep -c ' connected '` -eq 2 ]; then
source ~/.docked.sh
else
source ~/.undocked.sh
fi
# startup stuffs
displays=($(xrandr | awk '/ connected /{print $1}'))
selected_display="${displays[0]}"
xrandr --output "$selected_display" --brightness 0.75
# power savings
echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy';
echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
echo 'auto' > '/sys/bus/usb/devices/1-9/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control';

5
config/.gitconfig Normal file
View File

@ -0,0 +1,5 @@
[user]
email = info@rickvanlieshout.com
name = Mastermindzh
[alias]
tree = log --graph --decorate --pretty=format:'%ar [%h] %an <%ae> - %s'

View File

@ -1 +0,0 @@
xrdb -merge ~/.Xresources

View File

@ -20,7 +20,6 @@ zenity
xorg-xrandr
networkmanager
eog
thefuck
screenfetch
python
python-pip
@ -40,4 +39,5 @@ pavucontrol
alsa-utils
ntp
xclip
openssh
openssh
nodejs

BIN
dotfiles2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -93,21 +93,15 @@ function install_config {
ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json
ln -sf "$PWD"/wallpapers/space.jpg ~/Pictures/Wallpapers/wallpaper.jpg
ln -sf "$PWD"/config/rofi ~/.config/rofi/config
ln -sf "$PWD"/config/.gitconfig ~/.gitconfig
# link system files
sudo ln -sf "$PWD"/config/package-managers/pacman.conf /etc/pacman.conf
sudo ln -sf "$PWD"/config/package-managers/makepkg.conf /etc/makepkg.conf
sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf
# Copy pc specific config files
copyToDir "$PWD"/bash/.custom ~/.custom
}
function install_HiDPI {
ln -sf "$PWD"/config/hidpi/xorg/xinitrc ~/.xinitrc
ln -sf "$PWD"/config/hidpi/xorg/Xresources ~/.Xresources
sudo ln -sf "$PWD"/config/hidpi/environment /etc/environment
# create empty .custom alias file
echo "" > ~/.custom
}
# Installs the dependencies on Arch Linux
@ -159,11 +153,30 @@ function intro {
echo ""
}
function computer {
echo " /\ "
echo " / \ "
echo " /_ %%==O=% _____________ "
echo " % - -% | '\\\\\\\\\\"
echo " _____c% > __ | ' ____|_ "
echo " (_|. . % \` % .' | + '||:::::: "
echo " ||. ___)%%%%_.' | '||_____| "
echo " ||.( \ ~ / ,)' \'_______|_____| "
echo " || /| \'/ |\ ___/____|___\___ "
echo " _,,,;!___*_____\_| _ ' <<<:| "
echo " / /| |_________'___o_o| "
echo " /_____/ / "
echo " |:____|/ \"Boy, I LOVE this stuff\". "
echo ""
echo ""
}
# =======================================
# Main loop
# =======================================
clear
# Run the intro function
intro
@ -180,18 +193,33 @@ if ask "Do you want to install the config files?" Y; then
install_config
fi
# Ask for HiDPI installation
if ask "Do you want to install the HiDPI patches?" N; then
install_HiDPI
fi
# Ask for font installation
if ask "Do you want to install the fonts?" Y; then
install_fonts
fi
# ask to enable gdm
if ask "Do you want to enable GDM?" Y; then
sudo systemctl enable gdm.service
fi
echo "Enjoy using my rice! Do not forget to select \"i3\" in GDM :)"
clear
computer
# ask for pc specific install
prompt=`echo $'\n> ' Please select a specific computer to install or q to finish the install`
PS3="$prompt: "
select opt in "$PWD/computers"/*; do
if (( REPLY == "q" )) ; then
break
elif (( REPLY > 0 )) ; then
bash "$opt/install.sh"
break
else
echo "Invalid option. Try another one."
fi
done
clear
echo "Enjoy using my rice! Do not forget to select i3 in GDM :)"