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

View File

@ -1,6 +1,6 @@
auto-reload yes
refresh-on-startup yes
reload-time 10
reload-time 3600
notify-program "/home/yorune/.local/bin/notify-program"
notify-always yes

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)

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

View File

@ -1,5 +1,6 @@
set -g prefix C-a
set-option -g default-shell /bin/zsh
bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer'
unbind C-b
bind-key C-a send-prefix
unbind q

View File

@ -21,9 +21,11 @@ dunst -config&
browser-x&
password-manager&
/usr/local/bin/st -e /bin/sh -c "tmux new-session -s BASE -n HOME '/bin/zsh'\; split-window 'htop'\; new-window -n MAIL 'neomutt'\; new-window -n NEWSBOAT 'newsboat -r '\; new-window -n MUSIC 'cmus'"&
(sleep 30 && getforecast)&
#(sleep 30 && getforecast)&
sudo /usr/bin/rdate -s ntp.task.gda.pl && sudo /sbin/hwclock --systohc
mega-cmd-server --debug-full > /var/log/megacmd/megacmd.log&
#mega-cmd-server > /var/log/megacmd/megacmd.log&
setxkbmap pl&
dwmstatusbar&
# Seetings of LID

7
.zshrc
View File

@ -26,10 +26,8 @@ source $HOME/Linux/configs/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh &
[ -f $HOME/.config/fzf/shell/key-bindings.zsh ] && source $HOME/.config/fzf/shell/key-bindings.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.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
@ -54,6 +52,7 @@ 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 sva="sudo vim /etc/portage/package.accept_keywords"
alias emerge="sudo emerge"
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
alias grep="grep --color=always"
@ -92,7 +91,7 @@ alias vim="vim -p"
alias denpl="trans en:pl"
alias dplen="trans pl:en"
alias notes="vim $HOME/git/notes/index.md"
alias mpv="mpv --ytdl-format='bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]' --no-resume-playback"
alias mpv="mpv --vo=x11 --hwdec=no --ytdl-format='bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]' --no-resume-playback"
# Cleaning-up
export PATH=$HOME/.local/bin:$PATH