first commit
This commit is contained in:
commit
e53c625e08
1
.local/bin/backup-mc
Executable file
1
.local/bin/backup-mc
Executable file
@ -0,0 +1 @@
|
||||
sudo mkdir -p /mnt/backup/mcserver/$(/bin/date +%Y-%m-%d); sudo chown yorune:yorune -R /mnt/backup/mcserver/$(/bin/date +%Y-%m-%d); sudo cp -rv /home/yorune/mcserver/* /mnt/backup/mcserver/$(/bin/date +%Y-%m-%d)
|
8
.local/bin/bin-cp
Executable file
8
.local/bin/bin-cp
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
chmod +x *
|
||||
chown -R yorune: *
|
||||
sudo cp -pr * /bin/
|
||||
#sudo cp /etc/bash.bashrc ../configs
|
||||
#cp /home/yorune/Arch/configs/zshrc /home/yorune/.zshrc
|
||||
#cp /home/yorune/Arch/configs/vimrc /home/yorune/.vimrc
|
||||
echo DONE!!
|
15
.local/bin/cleaner
Executable file
15
.local/bin/cleaner
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
sudo rm -rf /var/tmp/portage/*
|
||||
sudo rm -rf /var/tmp/binpkgs/*
|
||||
sudo rm -rf /var/tmp/genkernel/*
|
||||
sudo rm -rf /tmp/*
|
||||
sudo rm -rf /var/cache/genkernel/*
|
||||
sudo emerge -a --depclean
|
||||
sudo emerge -a @preserved-rebuild
|
||||
sudo eclean -C -q packages
|
||||
sudo eclean -C -q -d -t1w distfiles
|
||||
sudo revdep-rebuild
|
||||
sudo perl-cleaner --all
|
||||
sudo etc-update
|
||||
sudo env-update
|
||||
source /etc/profile
|
5
.local/bin/cleanertmp
Executable file
5
.local/bin/cleanertmp
Executable file
@ -0,0 +1,5 @@
|
||||
sudo rm -rf /var/tmp/portage/*
|
||||
sudo rm -rf /var/tmp/binpkgs/*
|
||||
sudo rm -rf /var/tmp/genkernel/*
|
||||
sudo rm -rf /tmp/*
|
||||
sudo rm -rf /var/cache/genkernel/*
|
4
.local/bin/cmus-shell
Executable file
4
.local/bin/cmus-shell
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
if ! screen -r -D cmus >/dev/null ; then
|
||||
screen -S cmus /usr/bin/cmus "$@"
|
||||
fi
|
59
.local/bin/dmenumount
Executable file
59
.local/bin/dmenumount
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
# Gives a dmenu prompt to mount unmounted drives.
|
||||
# If they're in /etc/fstab, they'll be mounted automatically.
|
||||
# Otherwise, you'll be prompted to give a mountpoint from already existsing directories.
|
||||
# If you input a novel directory, it will prompt you to create that directory.
|
||||
|
||||
getmount() { \
|
||||
[ -z "$chosen" ] && exit 1
|
||||
mp="$(find $1 | dmenu -i -p "Type in mount point.")"
|
||||
[ "$mp" = "" ] && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?")
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
||||
sudo -A mount "$chosen" && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
|
||||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \( -path *%s -prune \) \ \n",$3}')
|
||||
getmount "/mnt /media -maxdepth 5 -type d $alreadymounted"
|
||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||
case "$partitiontype" in
|
||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
|
||||
esac
|
||||
notify-send "💻 USB mounting" "$chosen mounted to $mp."
|
||||
}
|
||||
|
||||
mountandroid() { \
|
||||
chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1)
|
||||
getmount "/media -maxdepth 3 -type d"
|
||||
sudo simple-mtpfs --device "$chosen" "$mp"
|
||||
notify-send "🤖 Android Mounting" "Android device mounted to $mp."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
case $(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?") in
|
||||
USB) mountusb ;;
|
||||
Android) mountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
|
||||
|
||||
if [ -z "$usbdrives" ]; then
|
||||
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
|
||||
echo "Android device(s) detected."
|
||||
mountandroid
|
||||
else
|
||||
if [ -z "$anddrives" ]; then
|
||||
echo "USB drive(s) detected."
|
||||
mountusb
|
||||
else
|
||||
echo "Mountable USB drive(s) and Android device(s) detected."
|
||||
asktype
|
||||
fi
|
||||
fi
|
41
.local/bin/dmenuumount
Executable file
41
.local/bin/dmenuumount
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
# A dmenu prompt to unmount drives.
|
||||
# Provides you with mounted partitions, select one to unmount.
|
||||
# Drives mounted at /, /boot and /home will not be options to unmount.
|
||||
|
||||
unmountusb() {
|
||||
[ -z "$drives" ] && exit
|
||||
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
|
||||
[ -z "$chosen" ] && exit
|
||||
sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted."
|
||||
}
|
||||
|
||||
unmountandroid() { \
|
||||
chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")
|
||||
[ -z "$chosen" ] && exit
|
||||
sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
case "$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" in
|
||||
USB) unmountusb ;;
|
||||
Android) unmountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$2=="part"&&$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
|
||||
|
||||
if ! grep simple-mtpfs /etc/mtab; then
|
||||
[ -z "$drives" ] && echo "No drives to unmount." && exit
|
||||
echo "Unmountable USB drive detected."
|
||||
unmountusb
|
||||
else
|
||||
if [ -z "$drives" ]
|
||||
then
|
||||
echo "Unmountable Android device detected."
|
||||
unmountandroid
|
||||
else
|
||||
echo "Unmountable USB drive(s) and Android device(s) detected."
|
||||
asktype
|
||||
fi
|
||||
fi
|
18
.local/bin/dmenuunicode
Executable file
18
.local/bin/dmenuunicode
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Give dmenu list of all unicode characters to copy.
|
||||
# Shows the selected character in dunst if running.
|
||||
|
||||
# Must have xclip installed to even show menu.
|
||||
xclip -h >/dev/null || exit
|
||||
|
||||
chosen=$(grep -v "#" ~/dwm/emoji | dmenu -i -l 20 -fn Monospace-18)
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
c=$(echo "$chosen" | sed "s/ .*//")
|
||||
echo "$c" | tr -d '\n' | xclip -selection clipboard
|
||||
notify-send "'$c' copied to clipboard." &
|
||||
|
||||
s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
|
||||
echo "$s" | tr -d '\n' | xclip
|
||||
notify-send "'$s' copied to primary." &
|
2
.local/bin/eix-repos-sync
Executable file
2
.local/bin/eix-repos-sync
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
for i in /usr/repos/*/.git; do ( echo $i; cd $i/..; sudo git pull; ); done
|
8
.local/bin/f2py
Executable file
8
.local/bin/f2py
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/python3.6
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from numpy.f2py.f2py2e import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
8
.local/bin/f2py3
Executable file
8
.local/bin/f2py3
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/python3.6
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from numpy.f2py.f2py2e import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
8
.local/bin/f2py3.6
Executable file
8
.local/bin/f2py3.6
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/python3.6
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from numpy.f2py.f2py2e import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
3
.local/bin/geoip
Executable file
3
.local/bin/geoip
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
curl -s ipinfo.io/$1
|
15
.local/bin/getforecast
Executable file
15
.local/bin/getforecast
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Updates weather forecast
|
||||
|
||||
FILE="$HOME/.config/.weatherreport.tmp"
|
||||
FILER="$HOME/.config/weatherreport"
|
||||
|
||||
curl -s --max-time 10 "wttr.in/$location" > $FILE
|
||||
|
||||
if [ -s "$FILE" ]
|
||||
then
|
||||
mv $FILE $FILER
|
||||
# notify-send " Weather" "The weather forecast has been updated."
|
||||
else
|
||||
rm $FILE
|
||||
fi
|
11
.local/bin/git-init-folder
Executable file
11
.local/bin/git-init-folder
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir $1
|
||||
cd $1
|
||||
git init
|
||||
touch README.md
|
||||
git add README.md
|
||||
git commit -m "first commit"
|
||||
curl -u 'linux923344' https://api.github.com/user/repos -d '{"name":"'$1'"}'
|
||||
git remote add origin git@github.com:linux923344/$1.git
|
||||
git push -u origin master
|
11
.local/bin/hosts-update
Executable file
11
.local/bin/hosts-update
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
rm -rf /tmp/steven /tmp/luke /tmp/hosts
|
||||
wget -O /tmp/steven https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
|
||||
|
||||
wget -O /tmp/luke https://raw.githubusercontent.com/LukeSmithxyz/etc/master/ips
|
||||
|
||||
cat /tmp/luke >> /tmp/steven
|
||||
|
||||
cat /tmp/steven | sort | uniq -d | sed '/^#/d' >> /tmp/hosts
|
||||
|
||||
sudo mv /tmp/hosts /etc/hosts
|
26
.local/bin/mailsync
Executable file
26
.local/bin/mailsync
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env sh
|
||||
# Sync mail and give notification if there is new mail.
|
||||
|
||||
# Checks for internet connection and set notification script.
|
||||
ping -q -c 1 1.1.1.1 > /dev/null || exit
|
||||
command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script."
|
||||
|
||||
export DISPLAY=:0.0
|
||||
# IKONKA SYNC ##echo " 🔃" > /tmp/imapsyncicon_$USER
|
||||
pkill -RTMIN+12 i3blocks
|
||||
|
||||
# Run mbsync. You can feed this script different settings.
|
||||
mbsync -a
|
||||
|
||||
# IKONKA SYNC #rm -f /tmp/imapsyncicon_$USER
|
||||
pkill -RTMIN+12 i3blocks
|
||||
|
||||
RESULT=$(echo "$(du -a ~/.mailbox/*/inbox/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)")
|
||||
#if [ -z $RESULT ]; then
|
||||
# echo ""
|
||||
#else
|
||||
# notify-send "mutt-wizard" "📬 new mail(s)"
|
||||
#fi
|
||||
|
||||
#Create a touch file that indicates the time of the last run of mailsync
|
||||
touch "$HOME/.mutt/.mailsynclastrun"
|
1
.local/bin/minecraft-launcher
Executable file
1
.local/bin/minecraft-launcher
Executable file
@ -0,0 +1 @@
|
||||
java -Xmx1024M -Xms1024M -jar /home/yorune/Linux/apps/TLauncher-MCL.jar
|
10
.local/bin/mouse-set
Executable file
10
.local/bin/mouse-set
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
choices="Off\nCycle"
|
||||
chosen=$(echo -e "$choices" | dmenu -i)
|
||||
|
||||
mouse=$(sudo ratbag-command list | awk '{print $1}' | sed 's/://')
|
||||
|
||||
case "$chosen" in
|
||||
Off) sudo ratbag-command led 0 set mode off $mouse ;;
|
||||
Cycle) sudo ratbag-command led 0 set mode cycle $mouse && sudo ratbag-command led 0 set rate 25000 $mouse ;;
|
||||
esac
|
2
.local/bin/night
Executable file
2
.local/bin/night
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
redshift -l 52.2327:18.3036 -t 6500:3200&
|
22
.local/bin/obsh
Executable file
22
.local/bin/obsh
Executable file
@ -0,0 +1,22 @@
|
||||
#! /bin/bash
|
||||
broadcast=$(ip a | awk '$1 == "inet" && $4 !~ /^127/ { print $4"/24" }' | uniq)
|
||||
|
||||
RED='\033[0;31m'
|
||||
GRAY='\033[0;37m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
clear
|
||||
printf "${GRAY}Executing nmap on the subnets: ${RED}\n$broadcast\n"
|
||||
candidates=$(
|
||||
for brdip in ${broadcast}; do
|
||||
nmap -sP $brdip | awk '$2 == "scan" { print $5 }'
|
||||
done)
|
||||
printf "${GRAY}\nFound the following candidates: ${GREEN}\n$candidates\n"
|
||||
for ip in ${candidates}; do
|
||||
printf "${GRAY}\nProbing $ip...\n${NC}"
|
||||
ssh -q root@$ip
|
||||
done
|
||||
clear
|
||||
echo "Nothing found"
|
||||
|
5
.local/bin/rasp
Executable file
5
.local/bin/rasp
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
sudo chown yorune: /mnt/rasp
|
||||
sshfs root@192.168.0.222:/mnt/ /mnt/rasp/
|
||||
sleep 10
|
||||
cd /mnt/rasp
|
12
.local/bin/screen-switcher
Executable file
12
.local/bin/screen-switcher
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
choices="Left\nRight\nDuplicated\nHDMI\nMonitor\n"
|
||||
|
||||
chosen=$(echo -e "$choices" | dmenu -i)
|
||||
|
||||
case "$chosen" in
|
||||
Monitor) mons -o ;;
|
||||
Duplicated) mons -d ;;
|
||||
Left) mons -e left ;;
|
||||
Right) mons -e right ;;
|
||||
HDMI) mons -s
|
||||
esac
|
7
.local/bin/screenshot
Executable file
7
.local/bin/screenshot
Executable file
@ -0,0 +1,7 @@
|
||||
FILE="/tmp/`date +%Y%m%d-%H.%M.%S.png`"
|
||||
NAME=$(date +%s | sha256sum | base64 | head -c 20 ; echo)
|
||||
|
||||
gnome-screenshot -f "$FILE"
|
||||
rsync -avz --delete $FILE -e "ssh -p 2223" root@209.250.255.224:/var/www/yorune.pl/u/$NAME.png &&
|
||||
|
||||
echo -e "https://yorune.pl/u/$NAME.png" | xclip -selection clipboard && notify-send "Screenshot has been updated"
|
7
.local/bin/screenshot-area
Executable file
7
.local/bin/screenshot-area
Executable file
@ -0,0 +1,7 @@
|
||||
FILE="/tmp/`date +%Y%m%d-%H.%M.%S.png`"
|
||||
NAME=$(date +%s | sha256sum | base64 | head -c 20 ; echo)
|
||||
|
||||
gnome-screenshot --area -f "$FILE"
|
||||
rsync -avz --delete $FILE -e "ssh -p 2223" root@209.250.255.224:/var/www/yorune.pl/u/$NAME.png &&
|
||||
|
||||
echo -e "https://yorune.pl/u/$NAME.png" | xclip -selection clipboard && notify-send "Screenshot has been updated"
|
7
.local/bin/set-wallpaper
Executable file
7
.local/bin/set-wallpaper
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp $1 ~/.wall.jpg
|
||||
#feh --bg-scale /home/yorune/.wall.jpg
|
||||
feh --bg-fill /home/yorune/.wall.jpg
|
||||
#wal -i $1 -o wal-set
|
||||
notify-send "Wallpaper changed"
|
13
.local/bin/shut-sup-rest
Executable file
13
.local/bin/shut-sup-rest
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
choices="Lock\nSuspend\nReboot\nShutdown"
|
||||
|
||||
chosen=$(echo -e "$choices" | dmenu -i)
|
||||
|
||||
case "$chosen" in
|
||||
Lock) slock ;;
|
||||
Suspend) sudo pm-suspend && slock ;;
|
||||
#Suspend) sudo systemctl suspend && slock ;;
|
||||
#Suspend) sudo systemctl suspend && locki3 ;;
|
||||
Reboot) sudo reboot ;;
|
||||
Shutdown) sudo shutdown -h now ;;
|
||||
esac
|
1944
.local/bin/speedtest-cli
Executable file
1944
.local/bin/speedtest-cli
Executable file
File diff suppressed because it is too large
Load Diff
10
.local/bin/ssh-permissions
Executable file
10
.local/bin/ssh-permissions
Executable file
@ -0,0 +1,10 @@
|
||||
chmod 700 ~/.ssh
|
||||
chmod 644 ~/.ssh/authorized_keys
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/config
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
chmod 644 ~/.ssh/id_rsa.pub
|
||||
chmod 600 ~/.ssh/github_rsa
|
||||
chmod 644 ~/.ssh/github_rsa.pub
|
||||
chmod 600 ~/.ssh/mozilla_rsa
|
||||
chmod 644 ~/.ssh/mozilla_rsa.pub
|
2
.local/bin/stream-twitch
Executable file
2
.local/bin/stream-twitch
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
nohup streamlink -p mpv https://www.twitch.tv/$1 best > /dev/null 2>&1 &
|
2
.local/bin/stream-youtube
Executable file
2
.local/bin/stream-youtube
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
nohup streamlink -p mpv $1 best > /dev/null 2>&1 &
|
15
.local/bin/suspend-at-time
Executable file
15
.local/bin/suspend-at-time
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
#./suspend-at-time 0:00
|
||||
|
||||
RUNAT="$1"
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
DATE=`/bin/date +%H:%M`
|
||||
if [ $DATE. = $RUNAT. ]
|
||||
then
|
||||
sudo systemctl suspend
|
||||
echo ""DONE" at "$(date)""
|
||||
pkill suspend-at-time
|
||||
fi
|
||||
done
|
3
.local/bin/temp
Executable file
3
.local/bin/temp
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -e "CPU: $(sensors | awk '/Core 0/ {print $3}'| egrep --color=no -o '[0-9]+\.' | sed 's/\.//')"; echo -e "GPU: $(sudo nvidia-smi -q -d temperature | grep --color=no -i "GPU Current" |egrep --color=no -o '[0-9]*')"
|
1
.local/bin/term-wmi
Executable file
1
.local/bin/term-wmi
Executable file
@ -0,0 +1 @@
|
||||
rdesktop -u "\LABS\s434812" -g 90% term.wmi.amu.edu.pl
|
2
.local/bin/twitch
Executable file
2
.local/bin/twitch
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
nohup streamlink -p mpv https://www.twitch.tv/$1 best > /dev/null 2>&1 &
|
2
.local/bin/update
Executable file
2
.local/bin/update
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo eix-repos-sync; sudo emerge-webrsync; sudo emerge --sync; sudo eix-sync -a; sudo eix-update; sudo emaint sync -a; sudo emerge -auDN @world
|
108
.local/bin/update-kernel
Executable file
108
.local/bin/update-kernel
Executable file
@ -0,0 +1,108 @@
|
||||
#!/bin/bash
|
||||
|
||||
BACKUP="/home/yorune/Linux/portage"
|
||||
LOG_FILE="/tmp/update-kernel.log"
|
||||
TMP_KERNEL="/tmp/kernel-config-`uname -r`"
|
||||
DEFAULT_KERNEL="/usr/src/linux/.config"
|
||||
|
||||
function starting() {
|
||||
echo -e "\e[93m----------------------COMPILING------------------------------\e[0m"
|
||||
sudo cp -rv $DEFAULT_KERNEL $TMP_KERNEL
|
||||
cp -r $TMP_KERNEL $BACKUP
|
||||
cp -r /etc/portage/* $BACKUP
|
||||
qlist -I | sort | uniq | tr '\n' ' ' > $BACKUP/list-of-programs-"$(date +"%d-%m-%Y")"
|
||||
}
|
||||
|
||||
function selection() {
|
||||
echo -e "\e[93m----------------------SELECTION-----------------------------\e[0m"
|
||||
sudo eselect kernel list
|
||||
echo
|
||||
echo
|
||||
read -p "New kernel is: " KERVER
|
||||
echo
|
||||
echo -e "Your kernel now is \e[91m$(uname -sr)\e[0m"
|
||||
echo -e "Your selected kernel is \e[91m"$KERVER"\e[0m"
|
||||
sudo eselect kernel set $KERVER
|
||||
sudo eselect kernel list | grep "*"
|
||||
echo
|
||||
}
|
||||
|
||||
function compilation() {
|
||||
read -p "Do you want to accept and compile (Y/N): " agreed
|
||||
echo
|
||||
if [ "$agreed" == "y" ] || [ "$agreed" == "Y" ]
|
||||
then
|
||||
echo -e "\e[91m----------------------\e[5mSTARTING\e[0m\e[91m------------------------------\e[0m" && sleep 10
|
||||
$NOW > /tmp/compiling-starting
|
||||
NEW_KERNEL="/tmp/new-kernel-config"
|
||||
sudo cp -r $TMP_KERNEL $DEFAULT_KERNEL
|
||||
cd /usr/src/linux; sudo make menuconfig; sleep 2; sudo cp -r $DEFAULT_KERNEL $NEW_KERNEL
|
||||
sudo genkernel all --makeopts=-j$(nproc --all) --kernel-config=$NEW_KERNEL --callback="emerge nvidia-drivers::gentoo"
|
||||
elif [ "$agreed" == "N" ] || [ "$agreed" == "n" ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
function ending() {
|
||||
echo
|
||||
echo
|
||||
echo -e "\e[93m----------------------CHECKING-----------------------------\e[0m"
|
||||
checking
|
||||
echo
|
||||
echo
|
||||
echo -e "\e[93m----------------------REMEMBER-----------------------------\e[0m"
|
||||
echo "You can remove:"
|
||||
echo "* /lib/modules/OLD_KERNEL"
|
||||
echo "* /boot/initramfs-genkernel-OLD_KERNEL"
|
||||
echo "* /boot/vmlinuz-OLD_KERNEL"
|
||||
echo "* /boot/System.map-OLD_KERNEL"
|
||||
echo "* /boot/initramfs-OLD_KERNEL"
|
||||
echo "* /usr/src/linux-OLD_KERNEL"
|
||||
echo
|
||||
echo -e "AFTER EVERYTHING YOU MUST WRITE COMMAND \e[91m"sudo grub-mkconfig -o /boot/grub/grub.cfg"\e[0m"
|
||||
}
|
||||
|
||||
function checking() {
|
||||
KERNEL=`eselect kernel list | awk '{print $2}' | egrep -o '[0-9]+.[0-9]+.[0-9]+' | tail -n1`
|
||||
|
||||
INITRANFS="initramfs-$KERNEL-gentoo-x86_64.img"
|
||||
SYSTEMMAP="System.map-$KERNEL-gentoo-x86_64"
|
||||
VMLINUZ="vmlinuz-$KERNEL-gentoo-x86_64"
|
||||
|
||||
ifchecking $INITRANFS
|
||||
ifchecking $SYSTEMMAP
|
||||
ifchecking $VMLINUZ
|
||||
}
|
||||
|
||||
function ifchecking () {
|
||||
FILE=/boot/$1
|
||||
if test -f "$FILE"; then
|
||||
echo "$FILE exist in the /boot folder ;)"
|
||||
else
|
||||
echo "$FILE NOT exist in the /boot folder ;)"
|
||||
fi
|
||||
}
|
||||
|
||||
function main() {
|
||||
clear
|
||||
|
||||
BEGIN=$(date +"%s")
|
||||
|
||||
starting
|
||||
selection
|
||||
compilation
|
||||
|
||||
echo -e "\e[31mI am leaving! Thank You!\e[0m" && sleep 3
|
||||
|
||||
TERMIN=$(date +"%s")
|
||||
DIFFTLPS=$(($TERMIN-$BEGIN))
|
||||
|
||||
echo -e "\e[93m------------------TIME COMPILATION-------------------------\e[0m"
|
||||
echo -e "\e[93m$(($DIFFTLPS / 60)) minutes and $(($DIFFTLPS % 60)) seconds \e[0m elapsed for Script Execution." && sleep 3
|
||||
ending
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
main
|
54
.local/bin/welcomer
Executable file
54
.local/bin/welcomer
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
MEMTOTAL=`awk '$3=="kB"{$2=$2/1024**2;$3="GB";} 1' /proc/meminfo | column -t | grep "MemTotal" | awk '{print $2}'`
|
||||
MEMFREE=`awk '$3=="kB"{$2=$2/1024**2;$3="GB";} 1' /proc/meminfo | column -t | grep "MemAvailable" | awk '{print $2}'`
|
||||
NETE=`ip a | awk {'print $2'} | grep -i en | sed 's/://g'`
|
||||
NETW=`ip a | awk {'print $2'} | grep -i wl | sed 's/://g'`
|
||||
BACKUP_SDA8=`df -h | grep -i sda8 | awk '{print $5", " $2 " (Total), " $3" (Usage)"}'`
|
||||
BACKUP_EL=`df -h | grep /run/media/jaqu3/ELEMENTS | awk '{print $5", " $2 " (Total), " $3" (Usage)"}'`
|
||||
BACKUP_EV=`df -h | grep /run/media/jaqu3/BACKUP_EVERYTHING | awk '{print $5", " $2 " (Total), " $3" (Usage)"}'`
|
||||
|
||||
|
||||
if [ -z "$NETW" ]; then
|
||||
NETD=$NETE
|
||||
else
|
||||
NETD=$NETW
|
||||
fi
|
||||
|
||||
if [ -z "$BACKUP_SDA8" ]; then
|
||||
BACKUPSDA8=`echo NOT MOUNTED`
|
||||
else
|
||||
BACKUPSDA8=$BACKUP_SDA8
|
||||
fi
|
||||
|
||||
if [ -z "$BACKUP_EL" ]; then
|
||||
BACKUPEL=`echo NOT MOUNTED`
|
||||
else
|
||||
BACKUPEL=$BACKUP_EL
|
||||
fi
|
||||
|
||||
if [ -z "$BACKUP_EV" ]; then
|
||||
BACKUPEV=`echo NOT MOUNTED`
|
||||
else
|
||||
BACKUPEV=$BACKUP_EV
|
||||
fi
|
||||
|
||||
echo -e "
|
||||
\033[0;35m+++++++++++++++++++: \033[0;37mInfo\033[0;35m :+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+
|
||||
+ \033[0;37mHostname \033[0;35m= \033[1;32m `hostname`
|
||||
\033[0;35m+ \033[0;37mAddress \033[0;35m= \033[1;32m `/sbin/ip addr show $NETD | grep "inet " | awk '{print $2}' | cut -d'/' -f1`
|
||||
\033[0;35m+ \033[0;37mKernel \033[0;35m= \033[1;32m `uname -r`
|
||||
\033[0;35m+ \033[0;37mUptime \033[0;35m= \033[1;32m`uptime | sed 's/.*up ([^,]*), .*/1/'`
|
||||
\033[0;35m+ \033[0;37mMemory \033[0;35m= \033[1;32m $MEMTOTAL GB (free $MEMFREE GB)\033[0;35m
|
||||
\033[0;35m+ \033[0;37mUsername \033[0;35m= \033[1;32m `whoami`\033[0;35m
|
||||
+
|
||||
\033[0;35m++++++++++++++++++: \033[0;37mStorage\033[0;35m :+++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+
|
||||
+ \033[0;37m/ \033[0;35m= \033[1;32m `df -h / | sed '1,1d' | awk '{print $5\", \"$2\" (Total), \"$3\" (Usage)\"}'`\033[0;35m
|
||||
+ \033[0;37mSDA8 \033[0;35m= \033[1;32m $BACKUPSDA8 \033[0;35m
|
||||
+ \033[0;37mELEMENTS \033[0;35m= \033[1;32m $BACKUPEL \033[0;35m
|
||||
+ \033[0;37mBACKUP_EVERYTHING \033[0;35m= \033[1;32m $BACKUPEV \033[0;35m
|
||||
+
|
||||
\033[0;35m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \033[0m"
|
||||
echo ""
|
33
.local/bin/welcomer-serwer
Executable file
33
.local/bin/welcomer-serwer
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copy this file to /bin/welcomer and change permisson +x
|
||||
# sudo bash -c $'echo "/bin/welcomer" >> /etc/profile.d/mymotd.sh && chmod +x /etc/profile.d/mymotd.sh'
|
||||
|
||||
|
||||
MEMTOTAL=`awk '$3=="kB"{$2=$2/1024**2;$3="GB";} 1' /proc/meminfo | column -t | grep "MemTotal" | awk '{print $2}'`
|
||||
MEMFREE=`awk '$3=="kB"{$2=$2/1024**2;$3="GB";} 1' /proc/meminfo | column -t | grep "MemAvailable" | awk '{print $2}'`
|
||||
NETE=`ip a | awk {'print $2'} | grep -i en | sed 's/://g'`
|
||||
NETW=`ip a | awk {'print $2'} | grep -i wl | sed 's/://g'`
|
||||
|
||||
if [ -z "$NETW" ]; then
|
||||
NETD=$NETE
|
||||
else
|
||||
NETD=$NETW
|
||||
fi
|
||||
|
||||
echo -e "
|
||||
\033[0;35m+++++++++++++++++++: \033[0;37mInfo\033[0;35m :+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+
|
||||
+ \033[0;37mHostname \033[0;35m= \033[1;32m `hostname`
|
||||
\033[0;35m+ \033[0;37mAddress \033[0;35m= \033[1;32m `/sbin/ip addr show $NETD | grep "inet " | awk '{print $2}' | cut -d'/' -f1`
|
||||
\033[0;35m+ \033[0;37mKernel \033[0;35m= \033[1;32m `uname -r`
|
||||
\033[0;35m+ \033[0;37mUptime \033[0;35m= \033[1;32m`uptime | sed 's/.*up ([^,]*), .*/1/'`
|
||||
\033[0;35m+ \033[0;37mMemory \033[0;35m= \033[1;32m $MEMTOTAL GB (free $MEMFREE GB)\033[0;35m
|
||||
\033[0;35m+ \033[0;37mUsername \033[0;35m= \033[1;32m `whoami`\033[0;35m
|
||||
+
|
||||
\033[0;35m++++++++++++++++++: \033[0;37mStorage\033[0;35m :+++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+
|
||||
+ \033[0;37m/ \033[0;35m= \033[1;32m `df -h / | sed '1,1d' | awk '{print $5\", \"$2\" (Total), \"$3\" (Usage)\"}'`\033[0;35m
|
||||
+
|
||||
\033[0;35m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \033[0m"
|
||||
echo ""
|
8
.local/bin/wheel
Executable file
8
.local/bin/wheel
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/python3.6
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from wheel.cli import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
5
.local/bin/wylaczoff
Executable file
5
.local/bin/wylaczoff
Executable file
@ -0,0 +1,5 @@
|
||||
xset b off
|
||||
xset s off && xset -dpms
|
||||
set bell-style none
|
||||
#/usr/bin/amixer -c 0 sset "Auto-Mute Mode" Disabled
|
||||
|
1
.local/bin/yatqa
Executable file
1
.local/bin/yatqa
Executable file
@ -0,0 +1 @@
|
||||
wine "C:/Program Files (x86)/YaTQA/yatqa.exe"
|
2
.local/bin/yt-mp3
Executable file
2
.local/bin/yt-mp3
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
youtube-dl --extract-audio --audio-format mp3 $1
|
2
.local/bin/yt-video
Executable file
2
.local/bin/yt-video
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
youtube-dl $1
|
36
.tmux.conf
Normal file
36
.tmux.conf
Normal file
@ -0,0 +1,36 @@
|
||||
set -g prefix C-a
|
||||
set-option -g default-shell /bin/zsh
|
||||
unbind C-b
|
||||
bind-key C-a send-prefix
|
||||
unbind q
|
||||
bind q confirm kill-window
|
||||
set -g status on
|
||||
bind-key -n C-f copy-mode \; send-key ?
|
||||
set -g default-terminal "st-256color"
|
||||
set -g history-limit 20000
|
||||
set-option -sg escape-time 0
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
setw -g automatic-rename on # rename window to reflect current program
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
set -g set-titles on # set terminal title
|
||||
set -g display-panes-time 800 # slightly longer pane indicators display time
|
||||
set -g display-time 1000 # slightly longer status messages display time
|
||||
set -g status-interval 10 # redraw status line every 10 seconds
|
||||
set -g status-style bg=blue
|
||||
set -g status-style fg=white
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
bind C-c new-session
|
||||
bind C-f command-prompt -p find-session 'switch-client -t %%'
|
||||
bind - split-window -v
|
||||
bind _ split-window -h
|
||||
bind > swap-pane -D # swap current pane with the next one
|
||||
bind < swap-pane -U # swap current pane with the previous one
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 3
|
||||
bind -r L resize-pane -R 2
|
||||
bind -r C-h previous-window # select previous window
|
||||
bind -r C-l next-window # select next window
|
||||
bind Tab last-window # move to last active window
|
3
.vim/.netrwhist
Normal file
3
.vim/.netrwhist
Normal file
@ -0,0 +1,3 @@
|
||||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhistcnt =1
|
||||
let g:netrw_dirhist_1='/home/yorune'
|
2591
.vim/autoload/plug.vim
Normal file
2591
.vim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
1
.vim/plugged/goyo.vim
Submodule
1
.vim/plugged/goyo.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6b6ed2734084fdbb6315357ddcaecf9c8e6f143d
|
1
.vim/plugged/nerdtree
Submodule
1
.vim/plugged/nerdtree
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1ab85e33bef8763a618c505ee5a0611519f81e5a
|
1
.vim/plugged/vim-latex-live-preview
Submodule
1
.vim/plugged/vim-latex-live-preview
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit bba71ac83358829295553a1f540dce4a7ebfd59b
|
1
.vim/plugged/vimtex
Submodule
1
.vim/plugged/vimtex
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7c08bf73aa15bc794c79b1e8750df3c18066c6fb
|
115
.vimrc
Normal file
115
.vimrc
Normal file
@ -0,0 +1,115 @@
|
||||
" settings
|
||||
set laststatus=2
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set tabstop=4
|
||||
au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
|
||||
|
||||
" plugins
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'scrooloose/nerdtree', "{ 'on': 'NERDTreeToggle' }
|
||||
Plug 'nmante/vim-latex-live-preview'
|
||||
Plug 'lervag/vimtex'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
call plug#end()
|
||||
|
||||
" Status-line
|
||||
set statusline=
|
||||
set statusline+=%#IncSearch#
|
||||
set statusline+=\ %y
|
||||
set statusline+=\ %r
|
||||
set statusline+=%#CursorLineNr#
|
||||
set statusline+=\ %F
|
||||
set statusline+=%= "Right side settings
|
||||
set statusline+=%#Search#
|
||||
set statusline+=\ %l/%L
|
||||
set statusline+=\ [%c]
|
||||
|
||||
set nocompatible
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set noshowmode
|
||||
set cursorline
|
||||
set cmdheight=1
|
||||
let g:livepreview_previewer = 'mupdf'
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
set encoding=utf-8
|
||||
|
||||
" line numbers
|
||||
set number
|
||||
set ruler
|
||||
set title
|
||||
|
||||
" indent
|
||||
set backspace=indent,eol,start
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" editing
|
||||
runtime! macros/matchit.vim
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" visual feedback
|
||||
set laststatus=2
|
||||
set showmode
|
||||
set showcmd
|
||||
|
||||
" disable pcspkr beep
|
||||
set visualbell
|
||||
set t_vb=
|
||||
|
||||
" searching
|
||||
set incsearch
|
||||
set smartcase
|
||||
|
||||
" colors
|
||||
colorscheme desert
|
||||
hi CursorLine cterm=NONE term=NONE ctermbg=NONE guibg=NONE
|
||||
hi CursorLine ctermbg=235
|
||||
|
||||
" map
|
||||
nnoremap ee :!mupdf $(echo % \| sed 's/tex$/pdf/') & disown<CR><CR>
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
nnoremap <silent> <C-t> :tabnew <CR>
|
||||
nnoremap <F11> :Goyo <CR>
|
||||
nnoremap <F7> :tabprevious<CR>
|
||||
nnoremap ww :w!<CR><CR>
|
||||
nnoremap <F8> :tabnext<CR>
|
||||
nnoremap <F2> :GoRun<CR>
|
||||
|
||||
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
|
||||
|
||||
" latex
|
||||
autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!latexmk -pdf -silent % > /dev/null" | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!sudo rm -rf *.fls *.ilg *.nav *.snm *.toc *.idx *.lof *.lot *.synctex.gz *.aux *.fdb_latexmk *.fls *.log *.out > /dev/null" | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!sudo pkill -HUP mupdf > /dev/null" | redraw!
|
||||
autocmd FileType tex inoremap ,fr \begin{frame}<Enter>\frametitle{}<Enter><Enter><++><Enter><Enter>\end{frame}<Enter><Enter><++><Esc>6kf}i
|
||||
autocmd FileType tex inoremap ,fi \begin{fitch}<Enter><Enter>\end{fitch}<Enter><Enter><++><Esc>3kA
|
||||
autocmd FileType tex inoremap ,exe \begin{exe}<Enter>\ex<Space><Enter>\end{exe}<Enter><Enter><++><Esc>3kA
|
||||
autocmd FileType tex inoremap ,bf \textbf{}<Esc>T{i
|
||||
autocmd FileType tex inoremap ,co \coun{}\\<Esc>T{i
|
||||
autocmd FileType tex inoremap ,nbf \noindent\textbf{}\\<Esc>T{i
|
||||
autocmd FileType tex inoremap ,noi \noindent<Esc>T{i
|
||||
autocmd FileType tex inoremap ,ln \par\noindent \line(1,0){400}\<Esc>T{i
|
||||
autocmd FileType tex vnoremap , <ESC>`<i\{<ESC>`>2la}<ESC>?\\{<Enter>a
|
||||
autocmd FileType tex inoremap ,it \textit{}<++><Esc>T{i
|
||||
autocmd FileType tex inoremap ,ct \textcite{}<++><Esc>T{i
|
||||
autocmd FileType tex inoremap ,glos {\gll<Space><++><Space>\\<Enter><++><Space>\\<Enter>\trans{``<++>''}}<Esc>2k2bcw
|
||||
autocmd FileType tex inoremap ,x \begin{xlist}<Enter>\ex<Space><Enter>\end{xlist}<Esc>kA<Space>
|
||||
autocmd FileType tex inoremap ,ol \begin{enumerate}<Enter><Enter>\end{enumerate}<Enter><Enter><++><Esc>3kA\item<Space>
|
||||
autocmd FileType tex inoremap ,ul \begin{itemize}<Enter><Enter>\end{itemize}<Enter><Enter><++><Esc>3kA\item<Space>
|
||||
autocmd FileType tex inoremap ,li <Enter>\item<Space>
|
||||
autocmd FileType tex inoremap ,ref \ref{}<Space><++><Esc>T{i
|
||||
autocmd FileType tex inoremap ,tab \begin{tabular}<Enter><++><Enter>\end{tabular}<Enter><Enter><++><Esc>4kA{}<Esc>i
|
||||
autocmd FileType tex inoremap ,a \href{}{<++>}<Space><++><Esc>2T{i
|
||||
autocmd FileType tex inoremap ,chap \chapter{}<Enter><Enter><++><Esc>2kf}i
|
||||
autocmd FileType tex inoremap ,sec \section{}<Enter><Enter><++><Esc>2kf}i
|
||||
autocmd FileType tex inoremap ,ssec \subsection{}<Enter><Enter><++><Esc>2kf}i
|
||||
autocmd FileType tex inoremap ,sssec \subsubsection{}<Enter><Enter><++><Esc>2kf}i
|
||||
autocmd FileType tex inoremap ,st <Esc>F{i*<Esc>f}i
|
||||
autocmd FileType tex inoremap ,tt \texttt{}<Space><++><Esc>T{i
|
||||
autocmd FileType tex inoremap ,bt {\blindtext}
|
||||
autocmd FileType tex inoremap ,rn (\ref{})<++><Esc>F}i
|
86
.zshrc
Normal file
86
.zshrc
Normal file
@ -0,0 +1,86 @@
|
||||
cd $HOME
|
||||
parse_git_branch() {
|
||||
git symbolic-ref --short HEAD 2> /dev/null
|
||||
}
|
||||
|
||||
[ -f /etc/gentoo-release ] && export ZSH="/usr/share/zsh/site-contrib/oh-my-zsh"
|
||||
[ -f /etc/centos-release ] && export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
HISTFILE=$HOME/.history_zsh
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000000
|
||||
autoload -U colors && colors
|
||||
setopt PROMPT_SUBST
|
||||
PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%m %{$fg[magenta]%}%~%{$fg[red]%} $(parse_git_branch)]%{$reset_color%}$%b '
|
||||
plugins=(rake ruby vagrant knife knife_ssh kitchen )
|
||||
|
||||
ZSH_DISABLE_COMPFIX=true
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
source $HOME/.sshservers
|
||||
source $HOME/Linux/configs/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh &>> /dev/null
|
||||
source $HOME/Linux/configs/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh &>> /dev/null
|
||||
[ ! -d $HOME/.config/fzf ] && git clone https://github.com/junegunn/fzf.git $HOME/.config/fzf
|
||||
[ -f $HOME/.config/fzf/shell/key-bindings.zsh ] && source $HOME/.config/fzf/shell/key-bindings.zsh
|
||||
FPATH=/usr/local/share/zsh/site-functions:$FPATH
|
||||
xset s off -dpms &>> /dev/null
|
||||
xset b off &>> /dev/null
|
||||
xset s off &>> /dev/null
|
||||
xset -dpms &>> /dev/null
|
||||
set bell-style none &>> /dev/null
|
||||
setxkbmap pl &>> /dev/null
|
||||
|
||||
export TERM=xterm-256color
|
||||
export SHELL=/bin/bash
|
||||
export GTK_IM_MODULE=ibus
|
||||
export XMODIFIERS=@im=ibus
|
||||
export QT_IM_MODULE=ibus
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export CCACHE_DIR="/mnt/backup/ccache"
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export BROWSER=/usr/bin/firefox
|
||||
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse'
|
||||
export EIX_LIMIT_COMPACT=0
|
||||
export TERMINAL="st"
|
||||
export QT_SCALE_FACTOR=1.5
|
||||
export VISUAL='vim'
|
||||
export EDITOR='vim'
|
||||
alias svm="sudo vim /etc/portage/make.conf"
|
||||
alias svr="sudo vim /etc/portage/repos.conf"
|
||||
alias svp="sudo vim /etc/portage/package.use"
|
||||
alias emerge="sudo emerge"
|
||||
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
|
||||
alias grep="grep --color=always"
|
||||
alias egrep="egrep --color=always"
|
||||
alias ls='ls -h --color=auto'
|
||||
alias ll='ls -lha'
|
||||
alias myip="curl ipinfo.io/ip"
|
||||
alias logi="journalctl -f"
|
||||
alias pl="setxkbmap pl"
|
||||
alias graphic-card="glxinfo|egrep 'OpenGL vendor|OpenGL renderer'"
|
||||
alias mylaptop-components="inxi -Fxz"
|
||||
alias r="ranger"
|
||||
alias v="vim"
|
||||
alias feh="feh --scale-down"
|
||||
alias changefont="figlet"
|
||||
alias gmaster="git checkout master"
|
||||
alias gcommit="git commit --author='Marcin Woźniak <y0rune@aol.com>'"
|
||||
alias gcommitwork="git commit --author='Marcin Woźniak <marcin.wozniak@cognifide.com>'"
|
||||
alias gadd="git add"
|
||||
alias gpush="git push"
|
||||
alias gpull="git pull"
|
||||
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches"
|
||||
alias gfg="git checkout master && git fetch upstream && git pull upstream master"
|
||||
alias cal="cal -3"
|
||||
alias code="vscodium"
|
||||
alias vpn="sudo /root/.local/bin/protonvpn c -f"
|
||||
alias vpnch="sudo /root/.local/bin/protonvpn c --cc CH"
|
||||
alias vpnd="sudo /root/.local/bin/protonvpn d"
|
||||
alias vpnstatus="sudo /root/.local/bin/protonvpn status"
|
||||
alias prolog="swipl"
|
||||
|
||||
# Cleaning-up
|
||||
export KODI_DATA="$HOME/.config/kodi"
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
XDG_DATA_DIRS="$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:$XDG_DATA_DIRS"
|
Loading…
Reference in New Issue
Block a user