mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-23 07:14:30 +01:00
new rice
This commit is contained in:
parent
6bb44f3835
commit
77b96c3749
107
bash/.alias.sh
Normal file
107
bash/.alias.sh
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
# useful dockers
|
||||||
|
alias phpserver='docker run --rm -p 2000:80 -v "$PWD":/var/www/html mastermindzh/php-xdebug'
|
||||||
|
alias nodeserver='docker run --rm -p 3000:3000 -v "$PWD":/app mastermindzh/generic_node'
|
||||||
|
alias reactserver='docker run --rm -p 8080:8080 -v "$PWD":/app mastermindzh/generic_node'
|
||||||
|
|
||||||
|
#upload text to sprunge.us
|
||||||
|
#USAGE cat file.txt | sprunge
|
||||||
|
alias sprunge='curl -F "sprunge=<-" http://sprunge.us'
|
||||||
|
|
||||||
|
## pacman and yaourt
|
||||||
|
alias aur='yaourt --noconfirm'
|
||||||
|
alias update='yaourt -Syyu --noconfirm --aur'
|
||||||
|
|
||||||
|
## systeminfo
|
||||||
|
alias meminfo='free -mth'
|
||||||
|
alias cpuinfo='lscpu'
|
||||||
|
alias hddinfo='df -h'
|
||||||
|
alias temp='watch "sensors | grep Core"'
|
||||||
|
alias internalip=$'ip route get 8.8.8.8 | awk \'NR==1 {print $NF}\''
|
||||||
|
|
||||||
|
#show 5 most memory consuming apps
|
||||||
|
alias psmem='ps auxf | sort -nr -k 5 | head -n 5'
|
||||||
|
|
||||||
|
#git
|
||||||
|
alias gitdiff='git diff --name-only --diff-filter=U'
|
||||||
|
alias status='git status'
|
||||||
|
alias push='git push'
|
||||||
|
alias add='git add .'
|
||||||
|
|
||||||
|
##utility
|
||||||
|
alias nmapscan='nmap -n -sP'
|
||||||
|
|
||||||
|
# show file content without comment lines
|
||||||
|
alias nocomment='grep -Ev '\''^(#|$)'\'''
|
||||||
|
|
||||||
|
#show directories
|
||||||
|
alias dirs='ls -FlA | grep :*/'
|
||||||
|
|
||||||
|
#show executables
|
||||||
|
alias execx='ls -FlA | grep -v \*'
|
||||||
|
|
||||||
|
#ls -al
|
||||||
|
alias la='ls -al'
|
||||||
|
|
||||||
|
# show external ip
|
||||||
|
alias cmyip='curl -s http://ipecho.net/plain; echo'
|
||||||
|
|
||||||
|
## default command fixes :P
|
||||||
|
alias mkdir='mkdir -p'
|
||||||
|
alias wget='wget -c'
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
|
||||||
|
# function to cd up a couple of times
|
||||||
|
# USAGE: up 3 (goes up 3 directories)
|
||||||
|
up(){
|
||||||
|
DEEP=$1;
|
||||||
|
[ -z "${DEEP}" ] && { DEEP=1; };
|
||||||
|
for i in $(seq 1 ${DEEP}); do
|
||||||
|
cd ../;
|
||||||
|
done;
|
||||||
|
}
|
||||||
|
# function to extract ... well anything really
|
||||||
|
extract () {
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xvjf $1 ;;
|
||||||
|
*.tar.gz) tar xvzf $1 ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) unrar x $1 ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xvf $1 ;;
|
||||||
|
*.tbz2) tar xvjf $1 ;;
|
||||||
|
*.tgz) tar xvzf $1 ;;
|
||||||
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1 ;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*) echo "don't know how to extract '$1'..." ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid file!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# function to return uptime in a human readable format
|
||||||
|
myuptime () {
|
||||||
|
uptime | awk '{ print "Uptime:", $3, $4, $5 }' | sed 's/,//g'
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# function to check whether a specific host is up
|
||||||
|
isup(){
|
||||||
|
if ! [ -z "$1" ]; then
|
||||||
|
ping -c 3 $1 > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "$1 Seems to be offline";
|
||||||
|
else
|
||||||
|
echo "$1 Seems to be online";
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# function to print a line across the screen
|
||||||
|
printLine(){
|
||||||
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -
|
||||||
|
}
|
17
bash/.bashrc
Normal file
17
bash/.bashrc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# ~/.bashrc
|
||||||
|
#
|
||||||
|
|
||||||
|
source ~/.alias
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
|
||||||
|
eval $(thefuck --alias)
|
||||||
|
|
||||||
|
#... :P fancy stuffs
|
||||||
|
screenfetch -t -A "UBUNTU"
|
||||||
|
PS1='[\u@\h \W]\$ '
|
||||||
|
|
16
config/gtk-3.0/settings.ini
Normal file
16
config/gtk-3.0/settings.ini
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
gtk-application-prefer-dark-theme=0
|
||||||
|
gtk-theme-name=Arc
|
||||||
|
gtk-icon-theme-name=Numix
|
||||||
|
gtk-font-name=System San Francisco Display 12
|
||||||
|
gtk-cursor-theme-name=Breeze
|
||||||
|
gtk-cursor-theme-size=0
|
||||||
|
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||||
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||||
|
gtk-button-images=1
|
||||||
|
gtk-menu-images=1
|
||||||
|
gtk-enable-event-sounds=1
|
||||||
|
gtk-enable-input-feedback-sounds=1
|
||||||
|
gtk-xft-antialias=1
|
||||||
|
gtk-xft-hinting=1
|
||||||
|
gtk-xft-hintstyle=hintfull
|
||||||
|
gtk-xft-rgba=rgb
|
@ -4,16 +4,16 @@ arandr
|
|||||||
chromium
|
chromium
|
||||||
xfce4-terminal
|
xfce4-terminal
|
||||||
nautilus
|
nautilus
|
||||||
gnome-sushi
|
sushi
|
||||||
compton
|
compton
|
||||||
lxappearance
|
lxappearance
|
||||||
arc-gtk-theme
|
arc-gtk-theme
|
||||||
rofi
|
rofi
|
||||||
rofi-dmenu
|
|
||||||
i3blocks
|
i3blocks
|
||||||
gnome-screenshot
|
gnome-screenshot
|
||||||
wmctrl
|
wmctrl
|
||||||
x11-xserver-utils
|
|
||||||
zenity
|
zenity
|
||||||
xrandr
|
xorg-xrandr
|
||||||
nm-applet
|
networkmanager
|
||||||
|
notify-osd
|
||||||
|
eog
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# This file has been auto-generated by i3-config-wizard(1).
|
||||||
|
# It will not be overwritten, so edit it as you like.
|
||||||
|
#
|
||||||
# i3 config file (v4)
|
# i3 config file (v4)
|
||||||
#
|
#
|
||||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
@ -35,7 +38,6 @@ set $workspace11 " Enpass"
|
|||||||
############################################
|
############################################
|
||||||
# i3 management keys #
|
# i3 management keys #
|
||||||
############################################
|
############################################
|
||||||
# use the interactive tool xev to find the keycode
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
@ -210,8 +212,6 @@ for_window [class="Eog"] floating enable
|
|||||||
assign [class="Google Play Music Desktop Player"] $workspace10
|
assign [class="Google Play Music Desktop Player"] $workspace10
|
||||||
assign [class="Franz"] $workspace9
|
assign [class="Franz"] $workspace9
|
||||||
assign [class="Enpass-Desktop"] $workspace11
|
assign [class="Enpass-Desktop"] $workspace11
|
||||||
assign [class="robo3t"] $workspace8
|
|
||||||
assign [class="Mysql-workbench-bin"] $workspace8
|
|
||||||
|
|
||||||
# database stuff
|
# database stuff
|
||||||
assign [class="MongoDB Compass"] $workspace8
|
assign [class="MongoDB Compass"] $workspace8
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
71
install.sh
Normal file
71
install.sh
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# =======================================
|
||||||
|
# Functions
|
||||||
|
# =======================================
|
||||||
|
|
||||||
|
# Ask a question and return true or false based on the users input
|
||||||
|
function yes_or_no {
|
||||||
|
while true; do
|
||||||
|
read -p "$* [y/n]: " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]*) return 0 ;;
|
||||||
|
[Nn]*) echo "Aborted" ; return 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# moves all fonts into the fonts directory (overwriting existing files)
|
||||||
|
function install_fonts {
|
||||||
|
yes | cp -rf ./fonts/*.ttf ~/.fonts
|
||||||
|
}
|
||||||
|
|
||||||
|
# install basic rice files
|
||||||
|
function install_rice {
|
||||||
|
mkdir ~/.config/i3
|
||||||
|
yes | cp -rf ../* ~/.config/i3
|
||||||
|
}
|
||||||
|
|
||||||
|
# install other configs
|
||||||
|
function install_config {
|
||||||
|
rsync -av ./config ~/.config
|
||||||
|
}
|
||||||
|
|
||||||
|
# Installs the dependencies on Arch Linux
|
||||||
|
function install_dependencies {
|
||||||
|
sudo pacman -S $(cat dependencies.txt | sed ':a;N;$!ba;s/\n/ /g')
|
||||||
|
}
|
||||||
|
|
||||||
|
# list the dependencies file
|
||||||
|
function list_dependencies {
|
||||||
|
echo ""
|
||||||
|
echo "=========================="
|
||||||
|
echo ""
|
||||||
|
cat dependencies.txt
|
||||||
|
echo ""
|
||||||
|
echo "=========================="
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run the intro bit
|
||||||
|
function intro {
|
||||||
|
echo "This will install my i3rice".
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# =======================================
|
||||||
|
# Main loop
|
||||||
|
# =======================================
|
||||||
|
|
||||||
|
# Run the intro function
|
||||||
|
intro
|
||||||
|
|
||||||
|
# Ask for dependency installation
|
||||||
|
list_dependencies
|
||||||
|
yes_or_no "Do you want to install the list of applications above?" && install_dependencies
|
||||||
|
|
||||||
|
# Ask for font installation
|
||||||
|
yes_or_no "Do you want to install the fonts?" && install_fonts
|
||||||
|
|
||||||
|
# Ask the user whether it wants to continue
|
||||||
|
yes_or_no "Are you sure you want to install my rice?" && install_rice
|
Loading…
Reference in New Issue
Block a user