mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 22:30:51 +00:00
More messed tests and stuff
This commit is contained in:
parent
108e82c07a
commit
7c558606b2
@ -27,7 +27,8 @@ function backupNoCompression () {
|
|||||||
# $2 - Backup name
|
# $2 - Backup name
|
||||||
# $3 - Files/Folders to backup
|
# $3 - Files/Folders to backup
|
||||||
prepareFolder $1
|
prepareFolder $1
|
||||||
echo -e "${blue} `date +%r` - Backing up (uncompressed)...${reset}"
|
DS=$(diskSpace $1)
|
||||||
|
echo -e "${blue} `date +%r` - Backing up (uncompressed)...${reset} [Free disk space: $DS ]"
|
||||||
ionice -c 3 nice -n 19 borg create --compression none --exclude-from=./exclude "$1::$2" "$3"
|
ionice -c 3 nice -n 19 borg create --compression none --exclude-from=./exclude "$1::$2" "$3"
|
||||||
checkBackup $1
|
checkBackup $1
|
||||||
}
|
}
|
||||||
@ -54,7 +55,8 @@ function checkBackup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pruneBackup() {
|
function pruneBackup() {
|
||||||
echo -e "${blue} `date +%r` - Prune old backups...${reset}"
|
DS=$(diskSpace $1)
|
||||||
|
echo -e "${blue} `date +%r` - Prune old backups...${reset} [Free disk space: $DS ]"
|
||||||
borg prune --keep-weekly=4 --keep-monthly=12 --keep-yearly=1 $1
|
borg prune --keep-weekly=4 --keep-monthly=12 --keep-yearly=1 $1
|
||||||
borg compact $1
|
borg compact $1
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
2
|
1
|
||||||
|
@ -14,12 +14,15 @@ set -e
|
|||||||
|
|
||||||
s -v
|
s -v
|
||||||
bold "Updating..."
|
bold "Updating..."
|
||||||
|
s nice --adjustment=18 ionice -c 3 pacman -Syu
|
||||||
nice --adjustment=18 ionice -c 3 yay -Syu --sudoloop --answerclean none --answerdiff all --answerupgrade all --noremovemake --norebuild --noredownload --nobatchinstall --cleanafter
|
nice --adjustment=18 ionice -c 3 yay -Syu --sudoloop --answerclean none --answerdiff all --answerupgrade all --noremovemake --norebuild --noredownload --nobatchinstall --cleanafter
|
||||||
|
|
||||||
bold "Cleaning stuff..."
|
bold "Cleaning stuff..."
|
||||||
s -v
|
s -v
|
||||||
yay -Sc --noconfirm 2>/dev/null
|
yay -Sc --noconfirm 2>/dev/null
|
||||||
s -v
|
s -v
|
||||||
|
yay -Yc 2>/dev/null
|
||||||
|
s -v
|
||||||
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null)
|
yes | (sudo -S pacman -Rns $(pacman -Qtdq) --color always 2>/dev/null)
|
||||||
|
|
||||||
s -k
|
s -k
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
setxkbmap -model abnt2 -layout br -variant ,abnt2
|
setxkbmap -model abnt2 -layout br -variant ,abnt2
|
||||||
xrandr --output HDMI-1 --mode 1280x800
|
#xrandr --output HDMI-1 --mode 1280x800
|
||||||
xrandr --output HDMI-2 --mode 1280x800
|
#xrandr --output HDMI-2 --mode 1280x800
|
||||||
|
xrandr --output HDMI2 --mode 1280x800 --pos 0x0 --rate 59.79 \
|
||||||
|
--output HDMI1 --mode 1280x800 --right-of HDMI2 --rate 60.00
|
||||||
|
|
||||||
|
@ -13,7 +13,10 @@ if [[ -z $CONTABO_BACKUP_PATH ]]; then
|
|||||||
fi
|
fi
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
ntfy="/home/bruno/Apps/linuxShortcuts/ntfy.sh --title Backup"
|
function ntfy() {
|
||||||
|
/home/bruno/Apps/linuxShortcuts/ntfy.sh --title Backup $1
|
||||||
|
}
|
||||||
|
|
||||||
OXO_PATH="/home/bruno/Backups/OXOwebsite/"
|
OXO_PATH="/home/bruno/Backups/OXOwebsite/"
|
||||||
|
|
||||||
# Backup Contabo
|
# Backup Contabo
|
||||||
|
6
Services/backup-memsource.service
Executable file
6
Services/backup-memsource.service
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Backup memsource daily
|
||||||
|
OnFailure=logErrors@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/konsole --workdir /run/media/bruno/Multimedia/MyDocuments/Development/Ccaps/BackupMemsourceLive/src -e php index.php
|
11
Services/backup-memsource.timer
Executable file
11
Services/backup-memsource.timer
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Backup memsource daily
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
Persistent=true
|
||||||
|
OnCalendar=*-*-* 10:30:00
|
||||||
|
WakeSystem=true
|
||||||
|
#DayOfWeek Year-Month-Day Hour:Minute:Second
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
15
browser.sh
15
browser.sh
@ -1,14 +1,15 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
activity=$(kactivities-cli --current-activity | cut -d" " -f3)
|
activity=$(kactivities-cli --current-activity | cut -d" " -f3)
|
||||||
|
|
||||||
if [[ $1 =~ .*youtube\.com.* ]]; then
|
MPV=0
|
||||||
mpv "$*" >/dev/null 2>&1 &
|
[[ $1 =~ .*youtube\.com.* ]] && MPV=1
|
||||||
exit
|
[[ $1 =~ .*youtu\.be.* ]] && MPV=1
|
||||||
fi
|
[[ $1 =~ .*peertube.* ]] && MPV=1
|
||||||
|
[[ $1 =~ .*yewtu\.be.* ]] && MPV=1
|
||||||
|
|
||||||
if [[ $1 =~ .*youtu\.be.* ]]; then
|
if [[ $MPV == "1" ]]; then
|
||||||
mpv "$*" >/dev/null 2>&1 &
|
mpv "$*" >/dev/null 2>&1 &
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [[ $1 =~ .*\&incognitottt$ ]]; then
|
# if [[ $1 =~ .*\&incognitottt$ ]]; then
|
||||||
@ -21,6 +22,6 @@ fi
|
|||||||
# fi
|
# fi
|
||||||
|
|
||||||
[[ $activity == "OXO" ]] && /bin/firefox -P OXO "$1" >/dev/null 2>&1 &
|
[[ $activity == "OXO" ]] && /bin/firefox -P OXO "$1" >/dev/null 2>&1 &
|
||||||
[[ $activity == "Development" ]] && /home/bruno/Apps/firefox/firefox-bin "$1" >/dev/null 2>&1 &
|
[[ $activity == "Development" ]] && /bin/firefox -P DEV "$1" >/dev/null 2>&1 &
|
||||||
[[ $activity == "Main" ]] && /bin/firefox "$1" >/dev/null 2>&1 &
|
[[ $activity == "Main" ]] && /bin/firefox "$1" >/dev/null 2>&1 &
|
||||||
[[ $activity == "Videos" ]] && /bin/firefox "$1" >/dev/null 2>&1 &
|
[[ $activity == "Videos" ]] && /bin/firefox "$1" >/dev/null 2>&1 &
|
||||||
|
4
downloadYTvideos.sh
Executable file
4
downloadYTvideos.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
URL=$1
|
||||||
|
yt-dlp -o "%(title)s/%(title)s [%(id)s].%(ext)s" -o "thumbnail:%(title)s/cover.%(ext)s" --write-thumbnail --convert-thumbnails jpg --write-description --embed-chapters --embed-metadata --write-subs "$URL"
|
15
holiday.sh
Executable file
15
holiday.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash --
|
||||||
|
|
||||||
|
tomorrow=$(date --date='tomorrow' +%Y-%m-%d)
|
||||||
|
|
||||||
|
while read row
|
||||||
|
do
|
||||||
|
holiday=$(echo "$row" | cut -d , -f 1)
|
||||||
|
if [[ "$holiday" == "$tomorrow" ]]
|
||||||
|
then
|
||||||
|
echo "$row" | cut -d , -f 2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done </home/bruno/.feriados
|
||||||
|
|
||||||
|
exit 0
|
9
oxo-gif.sh
Executable file
9
oxo-gif.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh -
|
||||||
|
|
||||||
|
[[ -z $1 ]] && echo "Missing filename to convert" && exit 1
|
||||||
|
|
||||||
|
file=$1
|
||||||
|
gif="${file%.*}.gif"
|
||||||
|
#gifski --fps 10 -Q 70 -H 2000 --repeat 0 -o "$gif" "$file"
|
||||||
|
gifski --fps 8 -Q 70 -H 2000 --repeat 0 -o "$gif" "$file"
|
||||||
|
notify-send -a 'Convert to .gif' "Convertion done: $gif"
|
@ -10,15 +10,6 @@ then
|
|||||||
opening=1
|
opening=1
|
||||||
startedTerm=1
|
startedTerm=1
|
||||||
fi
|
fi
|
||||||
#if [ -z $(pgrep "qutebrowser") ]
|
|
||||||
#then
|
|
||||||
# /bin/qutebrowser &>/dev/null &
|
|
||||||
# opening=1
|
|
||||||
#fi
|
|
||||||
#if [ $opening ]
|
|
||||||
#then
|
|
||||||
# sleep 4
|
|
||||||
#fi
|
|
||||||
|
|
||||||
TERMINATOR="0,1988,61,1760,880"
|
TERMINATOR="0,1988,61,1760,880"
|
||||||
QUTE="0,90,78,1715,900"
|
QUTE="0,90,78,1715,900"
|
||||||
|
@ -35,6 +35,14 @@ then
|
|||||||
openingProgram=1
|
openingProgram=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# KTimeTracker
|
||||||
|
if [[ -z $(pgrep --exact ktimetracker) ]]
|
||||||
|
then
|
||||||
|
echo "Opening KTimeTracker..."
|
||||||
|
/bin/ktimetracker >/dev/null 2>&1 &
|
||||||
|
openingProgram=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $openingProgram ]
|
if [ $openingProgram ]
|
||||||
then
|
then
|
||||||
sleep 5
|
sleep 5
|
||||||
|
Loading…
Reference in New Issue
Block a user