Compare commits
15 Commits
6f70a133cf
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a26bd37d2 | |||
| 73f5fe2e45 | |||
| 96ced8ff18 | |||
| edf7f1a1d1 | |||
| 57644311b3 | |||
| 85bae25c2f | |||
| a120d54b30 | |||
| 916faa68fd | |||
| c2bd45267a | |||
| 4c09537776 | |||
| d5ff6f3332 | |||
| 1622b1bd52 | |||
| c794518817 | |||
| 48bda2be2d | |||
| 17528d5f51 |
@@ -40,6 +40,11 @@ alias dirsizes='du -kh --apparent-size --max-depth=1 | sort -hr'
|
|||||||
alias start_x11_vnc="x11vnc -many -display :0 -no6 -rfbport 5900 -auth /var/run/lightdm/root/:0 -rfbauth $HOME/.vnc/passwd"
|
alias start_x11_vnc="x11vnc -many -display :0 -no6 -rfbport 5900 -auth /var/run/lightdm/root/:0 -rfbauth $HOME/.vnc/passwd"
|
||||||
|
|
||||||
|
|
||||||
|
commandExists() {
|
||||||
|
type $1 2>&1 > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rsyncLink() {
|
rsyncLink() {
|
||||||
source=$1;
|
source=$1;
|
||||||
linkSource="$(realpath $source)";
|
linkSource="$(realpath $source)";
|
||||||
@@ -52,7 +57,7 @@ rsyncLink() {
|
|||||||
|
|
||||||
|
|
||||||
updateSystem() {
|
updateSystem() {
|
||||||
executeAndNotify "doUpdateSystem $1" "system updated" "system update failed"
|
executeAndNotify "doUpdateSystem $1" "system updated" "system update failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -63,6 +68,9 @@ doUpdateSystem() {
|
|||||||
|
|
||||||
|
|
||||||
updateFlatpak() {
|
updateFlatpak() {
|
||||||
|
if ! $(commandExists flatpak); then
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
noconfirm=
|
noconfirm=
|
||||||
if [[ $1 == "-y" ]]; then
|
if [[ $1 == "-y" ]]; then
|
||||||
noconfirm="--assumeyes";
|
noconfirm="--assumeyes";
|
||||||
@@ -80,7 +88,7 @@ doUpdateFlatpak() {
|
|||||||
# executes command and notifies upon failure
|
# executes command and notifies upon failure
|
||||||
execute() {
|
execute() {
|
||||||
dir="$(pwd)";
|
dir="$(pwd)";
|
||||||
dir=${dir##*/};
|
dir=${dir##*/}; # cut off previous path (/path/to/foo.txt -> foo.txt)
|
||||||
if [[ -n "$2" ]]; then
|
if [[ -n "$2" ]]; then
|
||||||
errLog=$2;
|
errLog=$2;
|
||||||
else
|
else
|
||||||
@@ -119,11 +127,19 @@ finds () {
|
|||||||
|
|
||||||
# sends a desktop-notification with an icon signalling an error
|
# sends a desktop-notification with an icon signalling an error
|
||||||
notifyError () {
|
notifyError () {
|
||||||
notify-send "$1" --icon=data-warning;
|
if ! $(commandExists notify-send); then
|
||||||
|
echo "ERROR: $1";
|
||||||
|
else
|
||||||
|
notify-send "$1" --icon=data-warning;
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# sends a desktop-notification with an icon signalling a simple information
|
# sends a desktop-notification with an icon signalling a simple information
|
||||||
notifyInfo () {
|
notifyInfo () {
|
||||||
notify-send "$1" --icon=preferences-desktop-notification;
|
if ! $(commandExists notify-send); then
|
||||||
|
echo "INFO: $1";
|
||||||
|
else
|
||||||
|
notify-send "$1" --icon=preferences-desktop-notification;
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,5 @@
|
|||||||
# ~/.bash_profile
|
# ~/.bash_profile
|
||||||
#
|
#
|
||||||
|
|
||||||
|
[[ -f ~/.profile ]] && . ~/.profile
|
||||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
# for examples
|
# for examples
|
||||||
|
|
||||||
set -o pipefail
|
# set -o pipefail
|
||||||
# set -u
|
# set -u
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
.crlf off
|
||||||
|
.mode box
|
||||||
+6
-5
@@ -15,7 +15,10 @@ config.font = wezterm.font 'Fira Code'
|
|||||||
config.font_size = 12.0 -- also the default
|
config.font_size = 12.0 -- also the default
|
||||||
|
|
||||||
-- Spawn a git bash shell
|
-- Spawn a git bash shell
|
||||||
config.default_prog = { 'C:/Program Files/Git/bin/bash.exe' , '--cd-to-home' }
|
-- config.default_prog = { 'C:/Program Files/Git/bin/bash.exe' , '--cd-to-home' }
|
||||||
|
-- config.default_prog = { 'C:/theo_dev/bin/msys64/usr/bin/bash.exe' }
|
||||||
|
-- config.default_prog = { 'C:/theo_dev/bin/msys64/msys2_shell.cmd', '-defterm', '-where', 'G:\\', '-no-start', '-ucrt64', '-use-full-path' }
|
||||||
|
config.default_prog = { 'C:/theo_dev/bin/msys64/msys2_shell.cmd', '-defterm', '-no-start', '-ucrt64', '-use-full-path' }
|
||||||
|
|
||||||
-- cursor shape and behaviour
|
-- cursor shape and behaviour
|
||||||
config.default_cursor_style = 'BlinkingBar'
|
config.default_cursor_style = 'BlinkingBar'
|
||||||
@@ -42,10 +45,8 @@ wezterm.on('gui-startup', function(cmd)
|
|||||||
direction = 'Bottom',
|
direction = 'Bottom',
|
||||||
size = 0.06,
|
size = 0.06,
|
||||||
}
|
}
|
||||||
-- go to JavaUtils-Directory and prepare command
|
-- prepare command (\n possible to send command)
|
||||||
loading_bar_pane:send_text 'cd JavaUtils/zeitlaeufer/target\njava de.szimnau.WorkLoadingBar'
|
loading_bar_pane:send_text '. /g/zeitlaeufer/runProject.sh de.szimnau.zeitlaeufer.WorkLoadingBar'
|
||||||
-- optionally: clear before preparing command
|
|
||||||
-- loading_bar_pane:send_text 'cd JavaUtils\nc\njava LoadingBar'
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
config.keys = {
|
config.keys = {
|
||||||
@@ -32,10 +32,10 @@ backupRootDirectory /etc/docker/daemon.json $BACKUP_DIR_ROOT/docker/
|
|||||||
### upload backup ###
|
### upload backup ###
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
if [[ "$1" == "--noupload" ]]; then
|
if [[ $# > 0 && "$1" == "--noupload" ]]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sd rsync_backup -e "ssh -i /home/edi/.ssh/id_ed25519" --filter="P /home/docker" /sync/backup/ fabian@garrus:/citadel/backup/edi/
|
sd rsync_backup -e "ssh -i /home/edi/.ssh/id_ed25519" /sync/backup/ fabian@garrus:/citadel/backup/edi/
|
||||||
sd rsync_backup -e "ssh -i /home/edi/.ssh/id_ed25519" /home/edi/docker/ fabian@garrus:/citadel/backup/edi/home/docker/
|
sd rsync_backup -e "ssh -i /home/edi/.ssh/id_ed25519" /home/edi/docker/ fabian@garrus:/citadel/backup/edi/home/docker/
|
||||||
echo "Note: remember to keep /citadel in sync!"
|
echo "Note: remember to keep /citadel in sync!"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ backupDirectory $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/
|
|||||||
### upload backup ###
|
### upload backup ###
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
if [[ "$1" == "--noupload" ]]; then
|
if [[ $# > 0 && "$1" == "--noupload" ]]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ set -euo pipefail
|
|||||||
source /sync/scripts/dockerContainerAction.sh
|
source /sync/scripts/dockerContainerAction.sh
|
||||||
|
|
||||||
# FIXME!!! implement possibility to pass down directory
|
# FIXME!!! implement possibility to pass down directory
|
||||||
upDownContainers down
|
upDownContainers down $@
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ replacements['(']='_';
|
|||||||
replacements[')']='_';
|
replacements[')']='_';
|
||||||
replacements['[']='_';
|
replacements['[']='_';
|
||||||
replacements[']']='_';
|
replacements[']']='_';
|
||||||
|
replacements[',']='_';
|
||||||
while [[ $# > 0 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
replacements["$1"]="$2";
|
replacements["$1"]="$2";
|
||||||
shift 2;
|
shift 2;
|
||||||
|
|||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
/sync/scripts/escapeFilenames.sh . _
|
||||||
|
declare -a dirs=();
|
||||||
|
for d in *; do
|
||||||
|
dirs+=($d);
|
||||||
|
done
|
||||||
|
for d in "${dirs[@]}"; do
|
||||||
|
cd "$d";
|
||||||
|
/sync/scripts/escapeFilenames.sh Chapter Kapitel
|
||||||
|
/sync/scripts/reencode_m4a.sh -map;
|
||||||
|
rm *.m4a;
|
||||||
|
mv * "../${d}_reencode";
|
||||||
|
cd ..;
|
||||||
|
rmdir "$d"
|
||||||
|
mv "${d}_reencode" "$d";
|
||||||
|
done
|
||||||
@@ -4,4 +4,4 @@ set -euo pipefail
|
|||||||
source /sync/scripts/dockerContainerAction.sh
|
source /sync/scripts/dockerContainerAction.sh
|
||||||
|
|
||||||
# FIXME!!! implement possibility to pass down directory
|
# FIXME!!! implement possibility to pass down directory
|
||||||
upDownContainers pull
|
upDownContainers pull $@
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ map=
|
|||||||
vbr=
|
vbr=
|
||||||
while [[ $# > 0 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-map) map='-map 0:0'; shift;;
|
-map) map='-map 0:a'; shift;;
|
||||||
-vbr) vbr='aac_at -profile:a aac_he -b:a 64k'; shift;;
|
-vbr) vbr='aac -profile:a aac_he -b:a 64k'; shift;;
|
||||||
* ) break ;; # Anything else stops command line processing.
|
* ) break ;; # Anything else stops command line processing.
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# if no variable bitrate, just copy audio
|
# if no variable bitrate, just copy audio
|
||||||
if [[ -z $vbr ]]; then
|
if [[ -z $vbr ]]; then
|
||||||
map="$map copy"
|
vbr="copy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ensure existence of destination folder
|
# ensure existence of destination folder
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ set -euo pipefail
|
|||||||
source /sync/scripts/dockerContainerAction.sh
|
source /sync/scripts/dockerContainerAction.sh
|
||||||
|
|
||||||
# FIXME!!! implement possibility to pass down directory
|
# FIXME!!! implement possibility to pass down directory
|
||||||
upDownContainers up -d
|
upDownContainers up -d $@
|
||||||
|
|||||||
Reference in New Issue
Block a user