mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-22 06:44:41 +01:00
massive installer update , a new screenie and work-xps settings
This commit is contained in:
parent
9fd93cd929
commit
889139a906
11
README.md
11
README.md
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
This repository holds my Linux config files.
|
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)
|
[![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
|
## Tools
|
||||||
|
|
||||||
| Purpose | Tool |
|
| Purpose | Tool |
|
||||||
@ -23,3 +25,10 @@ This repository holds my Linux config files.
|
|||||||
| Music | Google Play Music Desktop Player |
|
| 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.
|
@ -32,6 +32,10 @@ alias status='git status'
|
|||||||
alias push='git push'
|
alias push='git push'
|
||||||
alias add='git add .'
|
alias add='git add .'
|
||||||
|
|
||||||
|
#dotnet core
|
||||||
|
alias efupdate="dotnet ef database update"
|
||||||
|
alias efmigrate="dotnet ef migrations add"
|
||||||
|
|
||||||
##utility
|
##utility
|
||||||
alias nmapscan='nmap -n -sP'
|
alias nmapscan='nmap -n -sP'
|
||||||
alias pia='nohup sh /opt/pia/run.sh &>/dev/null & disown'
|
alias pia='nohup sh /opt/pia/run.sh &>/dev/null & disown'
|
||||||
|
@ -12,10 +12,15 @@ source ~/.alias
|
|||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
eval $(thefuck --alias)
|
|
||||||
|
|
||||||
source ~/.custom
|
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
|
#... :P fancy stuffs
|
||||||
#screenfetch -t -A "UBUNTU"
|
#screenfetch -t -A "UBUNTU"
|
||||||
neofetch
|
neofetch
|
||||||
|
@ -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"
|
|
3
computers/dev-pc/install.sh
Normal file
3
computers/dev-pc/install.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#/bin/bash
|
||||||
|
|
||||||
|
# no changes yet.
|
4
computers/work-xps/Xresources.docked
Normal file
4
computers/work-xps/Xresources.docked
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Xft.dpi: 108
|
||||||
|
Xft.antialias: 1
|
||||||
|
rofi.dpi: 150
|
||||||
|
Xcursor.size: 12
|
@ -1,3 +1,4 @@
|
|||||||
Xft.dpi: 200
|
Xft.dpi: 200
|
||||||
Xft.antialias: 1
|
Xft.antialias: 1
|
||||||
rofi.dpi: 275
|
rofi.dpi: 250
|
||||||
|
Xcursor.size: 18
|
3
computers/work-xps/custom-bashrc.sh
Normal file
3
computers/work-xps/custom-bashrc.sh
Normal 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
3
computers/work-xps/docked.sh
Executable 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
|
16
computers/work-xps/install.sh
Normal file
16
computers/work-xps/install.sh
Normal 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
3
computers/work-xps/undocked.sh
Executable 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
|
18
computers/work-xps/xprofile.sh
Normal file
18
computers/work-xps/xprofile.sh
Normal 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
5
config/.gitconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[user]
|
||||||
|
email = info@rickvanlieshout.com
|
||||||
|
name = Mastermindzh
|
||||||
|
[alias]
|
||||||
|
tree = log --graph --decorate --pretty=format:'%ar [%h] %an <%ae> - %s'
|
@ -1 +0,0 @@
|
|||||||
xrdb -merge ~/.Xresources
|
|
2
dependencies/pacman.txt
vendored
2
dependencies/pacman.txt
vendored
@ -20,7 +20,6 @@ zenity
|
|||||||
xorg-xrandr
|
xorg-xrandr
|
||||||
networkmanager
|
networkmanager
|
||||||
eog
|
eog
|
||||||
thefuck
|
|
||||||
screenfetch
|
screenfetch
|
||||||
python
|
python
|
||||||
python-pip
|
python-pip
|
||||||
@ -41,3 +40,4 @@ alsa-utils
|
|||||||
ntp
|
ntp
|
||||||
xclip
|
xclip
|
||||||
openssh
|
openssh
|
||||||
|
nodejs
|
BIN
dotfiles2.png
Normal file
BIN
dotfiles2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 MiB |
58
install.sh
58
install.sh
@ -93,21 +93,15 @@ function install_config {
|
|||||||
ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json
|
ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json
|
||||||
ln -sf "$PWD"/wallpapers/space.jpg ~/Pictures/Wallpapers/wallpaper.jpg
|
ln -sf "$PWD"/wallpapers/space.jpg ~/Pictures/Wallpapers/wallpaper.jpg
|
||||||
ln -sf "$PWD"/config/rofi ~/.config/rofi/config
|
ln -sf "$PWD"/config/rofi ~/.config/rofi/config
|
||||||
|
ln -sf "$PWD"/config/.gitconfig ~/.gitconfig
|
||||||
|
|
||||||
# link system files
|
# link system files
|
||||||
sudo ln -sf "$PWD"/config/package-managers/pacman.conf /etc/pacman.conf
|
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/package-managers/makepkg.conf /etc/makepkg.conf
|
||||||
sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf
|
sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf
|
||||||
|
|
||||||
# Copy pc specific config files
|
# create empty .custom alias file
|
||||||
copyToDir "$PWD"/bash/.custom ~/.custom
|
echo "" > ~/.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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Installs the dependencies on Arch Linux
|
# Installs the dependencies on Arch Linux
|
||||||
@ -159,11 +153,30 @@ function intro {
|
|||||||
echo ""
|
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
|
# Main loop
|
||||||
# =======================================
|
# =======================================
|
||||||
|
|
||||||
|
clear
|
||||||
# Run the intro function
|
# Run the intro function
|
||||||
intro
|
intro
|
||||||
|
|
||||||
@ -180,18 +193,33 @@ if ask "Do you want to install the config files?" Y; then
|
|||||||
install_config
|
install_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ask for HiDPI installation
|
|
||||||
if ask "Do you want to install the HiDPI patches?" N; then
|
|
||||||
install_HiDPI
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ask for font installation
|
# Ask for font installation
|
||||||
if ask "Do you want to install the fonts?" Y; then
|
if ask "Do you want to install the fonts?" Y; then
|
||||||
install_fonts
|
install_fonts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ask to enable gdm
|
# ask to enable gdm
|
||||||
if ask "Do you want to enable GDM?" Y; then
|
if ask "Do you want to enable GDM?" Y; then
|
||||||
sudo systemctl enable gdm.service
|
sudo systemctl enable gdm.service
|
||||||
fi
|
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 :)"
|
||||||
|
Loading…
Reference in New Issue
Block a user