Compare commits

..

11 Commits

Author SHA1 Message Date
82861e7685 Merge branch 'master' into debian 2025-04-15 16:56:47 +02:00
77d6ef3708 Merge branch 'master' into debian 2025-04-15 10:15:02 +02:00
fabian
d3d0a4cc5d updated command to docker compose 2.0 2024-09-01 14:47:17 +02:00
fabian
ae2779f48e fix npe-like-error 2024-09-01 14:46:44 +02:00
0d7c1902c1 fkin just work now... please 2024-04-01 00:17:07 +02:00
d8e73040bc Merge branch 'debian' of ssh://git.szimnau.de:222/fabian/sync into debian 2024-04-01 00:14:47 +02:00
bb09061c3b improved automatic updates via executeAndNotify to enable fire-and-forget 2024-03-31 23:59:16 +02:00
08fbd0beb9 new function to update debian based systems
improved automatic updates via executeAndNotify to enable fire-and-forget
2024-03-31 23:58:19 +02:00
e99b430ce8 new function to update debian based systems
improved automatic updates via executeAndNotify to enable fire-and-forget
2024-03-31 23:54:05 +02:00
1952ece138 - commented out options not working in ancient debian version 2024-03-31 23:47:34 +02:00
a50baf801c Revert "Revert "old raspi version of nanorc cannot handle certain settings""
This reverts commit 844fe85d6d.
2024-03-31 23:46:47 +02:00
24 changed files with 55 additions and 229 deletions

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
shopt -s dotglob
cp -lrf ./home_external/* $HOME/

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
shopt -s dotglob
sudo cp -lrf ./root_external/* /

View File

@@ -5,25 +5,20 @@ if [ "$TERM" == 'xterm-kitty' ]; then
alias diff='kitty +kitten diff'
fi
COMMON_RSYNC='--info=ALL --recursive --delay-updates --human-readable --links --hard-links --perms'
export RSDEF="$COMMON_RSYNC --checksum"
export RSBKP="$RSDEF --times --group --owner --delete"
export RSMOV="$RSDEF --remove-source-files"
export RSUPD="$COMMON_RSYNC --update --times"
export RSCPY="$COMMON_RSYNC --ignore-times"
DEFAULT_RSYNC='--info=ALL --recursive --delay-updates --human-readable --links --hard-links --perms'
alias l='ls -l -v --all --human-readable --classify --group-directories-first' # -lvahF --group-directories-first
alias lt=='l --time-style=long-iso'
alias r='reset'
alias ..='cd ..'
alias refresh_bashrc='. ~/.bashrc' # alternatively: 'source ~/.bashrc'
alias rsync_default="rsync $RSDEF"
alias rsync_default="rsync $DEFAULT_RSYNC --checksum"
# source /usr/share/bash-completion/completions/rsync
# complete -F _rsync rsync_default
alias rsync_backup="rsync $RSBKP"
alias rsync_move="rsync $RSMOV"
alias rsync_update="rsync $RSUPD"
alias rsync_copy="rsync $RSCPY"
alias rsync_backup="rsync $DEFAULT_RSYNC --checksum --times --group --owner --delete"
alias rsync_move="rsync $DEFAULT_RSYNC --checksum --remove-source-files"
alias rsync_update="rsync $DEFAULT_RSYNC --update --times"
alias rsync_copy="rsync $DEFAULT_RSYNC --ignore-times"
alias copy_link='cp --no-dereference --recursive --preserve=all --link' # not --force to make it optional
alias off='systemctl poweroff'
alias nnn='nnn -dHrR'
@@ -40,11 +35,6 @@ 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"
commandExists() {
type $1 2>&1 > /dev/null
}
rsyncLink() {
source=$1;
linkSource="$(realpath $source)";
@@ -57,7 +47,7 @@ rsyncLink() {
updateSystem() {
executeAndNotify "doUpdateSystem $1" "system updated" "system update failed"
executeAndNotify "doUpdateSystem $1" "system updated" "system update failed"
}
@@ -68,9 +58,6 @@ doUpdateSystem() {
updateFlatpak() {
if ! $(commandExists flatpak); then
return 1;
fi
noconfirm=
if [[ $1 == "-y" ]]; then
noconfirm="--assumeyes";
@@ -88,7 +75,7 @@ doUpdateFlatpak() {
# executes command and notifies upon failure
execute() {
dir="$(pwd)";
dir=${dir##*/}; # cut off previous path (/path/to/foo.txt -> foo.txt)
dir=${dir##*/};
if [[ -n "$2" ]]; then
errLog=$2;
else
@@ -127,19 +114,11 @@ finds () {
# sends a desktop-notification with an icon signalling an error
notifyError () {
if ! $(commandExists notify-send); then
echo "ERROR: $1";
else
notify-send "$1" --icon=data-warning;
fi
notify-send "$1" --icon=data-warning;
}
# sends a desktop-notification with an icon signalling a simple information
notifyInfo () {
if ! $(commandExists notify-send); then
echo "INFO: $1";
else
notify-send "$1" --icon=preferences-desktop-notification;
fi
notify-send "$1" --icon=preferences-desktop-notification;
}

View File

@@ -4,13 +4,18 @@
updatePackages() {
noconfirm=
if [[ $1 == "-y" ]]; then
noconfirm="--no-confirm";
noconfirm="--assume-yes"
fi
executeAndNotify "doUpdatePackages $noconfirm" "packages updated" "package update failed";
full=
if [[ $2 == "--full" ]]; then
full="full-"
fi
executeAndNotify "doUpdatePackages $noconfirm $full" "system updated" "system update failed";
}
doUpdatePackages() {
pamac update $1;
pamac remove --orphans --cascade $1;
sudo apt update;
sudo apt ${2}upgrade $1;
sudo apt autoremove $1;
}

View File

@@ -2,5 +2,4 @@
# ~/.bash_profile
#
[[ -f ~/.profile ]] && . ~/.profile
[[ -f ~/.bashrc ]] && . ~/.bashrc

View File

@@ -2,7 +2,7 @@
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# set -o pipefail
set -o pipefail
# set -u
# If not running interactively, don't do anything

View File

@@ -89,7 +89,7 @@ set linenumbers
set matchbrackets "(<[{)>]}"
## Suppress title bar and show file name and editor state at the bottom.
set minibar
# set minibar
## Enable mouse support, if available for your system. When enabled,
## mouse clicks can be used to place the cursor, set the mark (with a

View File

@@ -139,13 +139,13 @@ configuration {
/* me-select-entry: "MousePrimary";*/
/* me-accept-entry: "MouseDPrimary";*/
/* me-accept-custom: "Control+MouseDPrimary";*/
timeout {
/* timeout {
action: "kb-cancel";
delay: 0;
}
filebrowser {
directories-first: true;
sorting-method: "name";
}
}*/
}
@theme "/usr/share/rofi/themes/Arc-Dark.rasi"

View File

@@ -1,2 +0,0 @@
.crlf off
.mode box

View File

@@ -1,15 +1,16 @@
[
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+shift+x"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+keypad_plus"], "command": "jump_forward" },
{ "keys": ["alt+="], "command": "jump_forward" },
// { "keys": ["ctrl+b"], "command": "none" },
{ "keys": ["ctrl+keypad_enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
// { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
// { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} } // can't unset this. fuck you.
{ "keys": ["ctrl+alt+n"], "command": "new_snippet" },
{ "keys": ["ctrl+alt+f"], "command": "auto_indent" },
]
[
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+shift+x"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+keypad_plus"], "command": "jump_forward" },
{ "keys": ["ctrl+b"], "command": "none" },
{ "keys": ["ctrl+keypad_enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
// { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
// { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} } // can't unset this. fuck you.
{ "keys": ["ctrl+alt+n"], "command": "new_snippet" },
{ "keys": ["ctrl+alt+f"], "command": "auto_indent" }
// { "keys": [""], "command": "lower_case" }
// { "keys": [""], "command": "upper_case" }
]

View File

@@ -1,15 +0,0 @@
[
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+shift+x"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+keypad_plus"], "command": "jump_forward" },
{ "keys": ["alt+="], "command": "jump_forward" },
// { "keys": ["ctrl+b"], "command": "none" },
{ "keys": ["ctrl+keypad_enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
// { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
// { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} } // can't unset this. fuck you.
{ "keys": ["ctrl+alt+n"], "command": "new_snippet" },
{ "keys": ["ctrl+alt+f"], "command": "auto_indent" },
]

View File

@@ -1,3 +1,5 @@
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by syntax-specific settings.
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
@@ -6,13 +8,11 @@
"bold_folder_labels": true,
"color_scheme": "Mariana.sublime-color-scheme",
"drag_text": false,
// "draw_white_space": ["selection", "all_mixed", "all_tabs", "trailing", "isolated"],
"draw_white_space": ["all"],
"draw_white_space": ["selection", "all_mixed"],
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"fallback_encoding": "UTF-8",
"find_in_files_side_by_side": false,
"font_size": 11,
"font_face": "JetBrains Mono Regular",
"highlight_line": true,
@@ -45,5 +45,4 @@
"word_wrap": true,
"wrap_width": 120,
"index_files": true,
"caret_style": "smooth",
}

View File

@@ -1,117 +0,0 @@
-- Pull in the wezterm API
local wezterm = require 'wezterm'
local act = wezterm.action
local mux = wezterm.mux
-- This will hold the configuration.
local config = wezterm.config_builder()
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'AdventureTime'
-- config.font = wezterm.font 'JetBrains Mono' -- also the default
config.font = wezterm.font 'Fira Code'
config.font_size = 12.0 -- also the default
-- Spawn a git bash shell
-- 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
config.default_cursor_style = 'BlinkingBar'
config.animation_fps = 1
config.cursor_blink_ease_in = 'Constant'
config.cursor_blink_ease_out = 'Constant'
config.enable_kitty_keyboard = true
-- window appearance
config.enable_scroll_bar = true
config.window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
}
config.initial_rows = 50;
wezterm.on('gui-startup', function(cmd)
local tab, pane, window = mux.spawn_window(cmd or {})
-- Create a split occupying the right 1/3 of the screen
local loading_bar_pane = pane:split {
direction = 'Bottom',
size = 0.06,
}
-- prepare command (\n possible to send command)
loading_bar_pane:send_text '. /g/zeitlaeufer/runProject.sh de.szimnau.zeitlaeufer.WorkLoadingBar'
end)
config.keys = {
-- This will create a new horizontal split and run your default program inside it
{
key = 'E',
mods = 'CTRL|SHIFT',
action = act.SplitHorizontal { domain = 'CurrentPaneDomain' },
},
-- This will create a new vertical split and run your default program inside it
{
key = 'O',
mods = 'CTRL|SHIFT',
action = act.SplitVertical { domain = 'CurrentPaneDomain' },
},
-- resize the current split
{
key = 'UpArrow',
mods = 'CTRL|SHIFT',
action = act.AdjustPaneSize { 'Up', 1 },
},
{
key = 'DownArrow',
mods = 'CTRL|SHIFT',
action = act.AdjustPaneSize { 'Down', 1 },
},
{
key = 'LeftArrow',
mods = 'CTRL|SHIFT',
action = act.AdjustPaneSize { 'Left', 1 }
},
{
key = 'RightArrow',
mods = 'CTRL|SHIFT',
action = act.AdjustPaneSize { 'Right', 1 },
},
-- move around the splits
{
key = 'UpArrow',
mods = 'ALT',
action = act.ActivatePaneDirection 'Up',
},
{
key = 'DownArrow',
mods = 'ALT',
action = act.ActivatePaneDirection 'Down',
},
{
key = 'LeftArrow',
mods = 'ALT',
action = act.ActivatePaneDirection 'Left',
},
{
key = 'RightArrow',
mods = 'ALT',
action = act.ActivatePaneDirection 'Right',
},
-- makes pane take up all available space in the tab, hiding all other panes
{
key = 'X',
mods = 'CTRL|SHIFT',
action = wezterm.action.TogglePaneZoomState,
},
}
-- and finally, return the configuration to wezterm
return config

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source=$1
destinationPart=${1%/}; # cut off trailing "/"
# tar cfv "$destinationPart.tar" "$source" && xz "$destinationPart.tar";
tar c -I"xz -v" -vf "$destinationPart.tar.xz" "$source"
# tar cfv $destinationPart.tar $source && xz $destinationPart.tar;
tar c -I"xz -v" -vf $destinationPart.tar.xz $source

View File

@@ -36,6 +36,6 @@ if [[ $# > 0 && "$1" == "--noupload" ]]; then
exit 0;
fi
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" --filter="P /home/docker" /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/
echo "Note: remember to keep /citadel in sync!"

View File

@@ -20,7 +20,7 @@ backupDirectory $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/
### upload backup ###
#####################
if [[ $# > 0 && "$1" == "--noupload" ]]; then
if [[ "$1" == "--noupload" ]]; then
exit 0;
fi

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source=$1;
# archive=${source%.xz}; # cut off trailing ".xz"
# unxz "$source" && tar xfv "$archive"
tar x -I"unxz -v" -vf "$source"
# unxz $source && tar xfv $archive
tar x -I"unxz -v" -vf $source

View File

@@ -16,7 +16,7 @@ upDownContainers() {
continue;
fi
cd $subdir;
docker-compose $@;
docker compose $@;
done
}

View File

@@ -4,4 +4,4 @@ set -euo pipefail
source /sync/scripts/dockerContainerAction.sh
# FIXME!!! implement possibility to pass down directory
upDownContainers down $@
upDownContainers down

View File

@@ -13,7 +13,6 @@ replacements['(']='_';
replacements[')']='_';
replacements['[']='_';
replacements[']']='_';
replacements[',']='_';
while [[ $# > 0 ]]; do
replacements["$1"]="$2";
shift 2;

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
/sync/scripts/escapeFilenames.sh . _
for d in *; 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

View File

@@ -4,4 +4,4 @@ set -euo pipefail
source /sync/scripts/dockerContainerAction.sh
# FIXME!!! implement possibility to pass down directory
upDownContainers pull $@
upDownContainers pull

View File

@@ -6,15 +6,15 @@ map=
vbr=
while [[ $# > 0 ]]; do
case $1 in
-map) map='-map 0:a'; shift;;
-vbr) vbr='aac -profile:a aac_he -b:a 64k'; shift;;
-map) map='-map 0:0'; shift;;
-vbr) vbr='aac_at -profile:a aac_he -b:a 64k'; shift;;
* ) break ;; # Anything else stops command line processing.
esac
done
# if no variable bitrate, just copy audio
if [[ -z $vbr ]]; then
vbr="copy"
map="$map copy"
fi
# ensure existence of destination folder

View File

@@ -4,4 +4,4 @@ set -euo pipefail
source /sync/scripts/dockerContainerAction.sh
# FIXME!!! implement possibility to pass down directory
upDownContainers up -d $@
upDownContainers up -d