diff --git a/.config/newsboat/config b/.config/newsboat/config index f765fed..5b0fed3 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -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 diff --git a/.local/bin/Logs b/.local/bin/Logs new file mode 120000 index 0000000..554b400 --- /dev/null +++ b/.local/bin/Logs @@ -0,0 +1 @@ +emerge-logs \ No newline at end of file diff --git a/.local/bin/browser-x b/.local/bin/browser-x index a1ad1e8..30cbf27 100755 --- a/.local/bin/browser-x +++ b/.local/bin/browser-x @@ -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 diff --git a/.local/bin/dwmstatusbar b/.local/bin/dwmstatusbar index d01f3dd..4edc15b 100755 --- a/.local/bin/dwmstatusbar +++ b/.local/bin/dwmstatusbar @@ -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 diff --git a/.local/bin/mailsync b/.local/bin/mailsync index 34155c6..6f06c05 100755 --- a/.local/bin/mailsync +++ b/.local/bin/mailsync @@ -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" & diff --git a/.local/bin/screenshot-area b/.local/bin/screenshot-area index 7bcfd13..50277a3 100755 --- a/.local/bin/screenshot-area +++ b/.local/bin/screenshot-area @@ -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" diff --git a/.local/bin/stream b/.local/bin/stream index ae499ce..7662969 100755 --- a/.local/bin/stream +++ b/.local/bin/stream @@ -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 & diff --git a/.local/bin/term-wmi b/.local/bin/term-wmi index 5a63503..194fb05 100755 --- a/.local/bin/term-wmi +++ b/.local/bin/term-wmi @@ -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 diff --git a/.local/bin/update-kernel b/.local/bin/update-kernel index 58995a8..487a17d 100755 --- a/.local/bin/update-kernel +++ b/.local/bin/update-kernel @@ -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 diff --git a/.tmux.conf b/.tmux.conf index c001400..b8c4803 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -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 diff --git a/.xinitrc b/.xinitrc index 9517c7b..74e080e 100644 --- a/.xinitrc +++ b/.xinitrc @@ -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 diff --git a/.zshrc b/.zshrc index f63c87e..d833978 100644 --- a/.zshrc +++ b/.zshrc @@ -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