Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2020-10-14 00:35:04 +02:00
parent 7f449df84d
commit 0456d713b6
12 changed files with 37 additions and 19 deletions

1
.local/bin/Logs Symbolic link
View File

@@ -0,0 +1 @@
emerge-logs

View File

@@ -1,5 +1,9 @@
#!/bin/bash
KERNEL=$(uname -sr)
[[ $KERNEL =~ "icrosoft" ]] && "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" "$@"
[[ $KERNEL =~ "gentoo" ]] && GDK_DPI_SCALE="1.2" firefox-bin "$@"
#brave-bin --force-device-scale-factor=1.2 "$@"&
[[ $KERNEL =~ "gentoo" ]] && MOZ_X11_EGL=1 GDK_DPI_SCALE="1.35" firefox "$@"
#[[ $KERNEL =~ "gentoo" ]] && brave-bin --force-device-scale-factor=1.2 "$@"
# Firefox
# media.ffmpeg.vaapi.enabled -> true

View File

@@ -20,11 +20,11 @@ echo -e "$(cat /sys/class/net/w*/operstate | sed "s/down/❌/;s/up/📶/") $(cat
}
print_temp(){
echo -e "🔥 $(sensors | awk '/Core 0/ {print $3}') +$(sudo nvidia-smi -q -d temperature | grep --color=no -i "GPU Current" |egrep --color=no -o '[0-9]*').0°C"
echo -e "🔥 $(sensors | awk '/Core 0/ {print int($3)"°C"}') +$(sudo nvidia-smi -q -d temperature | grep --color=no -i "GPU Current" |egrep --color=no -o '[0-9]*')°C"
}
print_date(){
echo -e "🕛 $(date +"%d/%m %H:%M")"
echo -e "🕛 $(date +"%d/%m %H:%M:%S")"
}
print_mem(){
@@ -62,12 +62,11 @@ print_mail(){
}
print_cpu() {
cpuUse=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}')
cpuUse=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print int(100 - $1)"%"}')
echo -e "💻 $cpuUse"
}
while true
do
xsetroot -name "$(print_temp) $(print_mail) $(print_cpu) $(print_mem) $(print_wifi) $(print_battery) $(print_volume) $(print_date)"
sleep 5
done

View File

@@ -1,4 +1,4 @@
#!/bin/sh -l
#!/bin/bash
# Sync mail and give notification if there is new mail.
# Run only if user logged in (prevent cron errors)
@@ -31,7 +31,7 @@ fi
syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")"
mbsync $opts "$acc"
new=$(find $(ls $HOME/.local/share/mail/$acc/* | grep -i inbox | sed 's/\://')/new -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null)
new=$(find $(ls $HOME/.local/share/mail/$acc/* | grep -i inbox | sed 's/\://')/new -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
if [ "$newcount" -gt "0" ]; then
notify "$acc" "$newcount" &

View File

@@ -2,6 +2,6 @@ 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 &&
rsync -avz --delete $FILE -e "ssh -p 22" 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"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
KERNEL=$(uname -sr)
[[ $KERNEL =~ "icrosoft" ]] && streamlink -p "https://www.twitch.tv/riotgames best" $1 best > /dev/null 2>&1 &
[[ $KERNEL =~ "icrosoft" ]] && nohup streamlink -p "https://www.twitch.tv/riotgames best" $1 best > /dev/null 2>&1 &
[[ $KERNEL =~ "gentoo" ]] && nohup streamlink -p mpv $1 best > /dev/null 2>&1 &

View File

@@ -1 +1,3 @@
rdesktop -u "\LABS\s434812" -g 90% term.wmi.amu.edu.pl
#!/bin/bash
xfreerdp /size:1920:1080 /u:s434812 /d:LABS /v:term.wmi.amu.edu.pl /cert:deny /sound /dynamic-resolution
#rdesktop -u "\LABS\s434812" -g 90% term.wmi.amu.edu.pl

View File

@@ -8,9 +8,9 @@ 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 $TMP_KERNEL $BACKUP/kernel-config
cp -r /etc/portage/* $BACKUP
qlist -I | sort | uniq | tr '\n' ' ' > $BACKUP/list-of-programs-"$(date +"%d-%m-%Y")"
qlist -I | sort | uniq | tr '\n' ' ' > $BACKUP/list-of-programs
}
function selection() {
@@ -84,12 +84,21 @@ else
fi
}
function addgit() {
cd ~/Linux/portage || exit
git add .
git commit -m "Updated: $(date)"
git push
cd ~ || exit
}
function main() {
clear
BEGIN=$(date +"%s")
starting
addgit
selection
compilation