Compare commits
9 Commits
334e5bd179
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c1714f29fd | |||
| 61b7b53551 | |||
| ffe9bfdc97 | |||
| 28d4539e48 | |||
| 270cbff548 | |||
| 272fbad302 | |||
| f679627dd1 | |||
| 776fcc9023 | |||
| 4e4c9a1bf5 |
30
bin/ft
Normal file → Executable file
30
bin/ft
Normal file → Executable file
@@ -3,4 +3,32 @@ set -e
|
|||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
exec f2 -f "(\w+)[_-](\d\d\d\d)[-]?(\d\d)[-]?(\d\d)[_-](.*)" -r '$2-$3-$4 $5' "$@"
|
use_exif=false
|
||||||
|
args=()
|
||||||
|
|
||||||
|
while (($#)); do
|
||||||
|
case "$1" in
|
||||||
|
-e)
|
||||||
|
use_exif=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
args+=("$@")
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
args+=("$1")
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if $use_exif; then
|
||||||
|
f2 \
|
||||||
|
-f '{strlen("{x.cdt}") > 0}' \
|
||||||
|
-r '{x.cdt.YYYY}-{x.cdt.MM}-{x.cdt.DD} {x.cdt.H}-{x.cdt.mm}-{x.cdt.ss} {f}{ext}' \
|
||||||
|
"${args[@]}"
|
||||||
|
else
|
||||||
|
exec f2 -f "(\w+)[_-](\d\d\d\d)[-]?(\d\d)[-]?(\d\d)[_-](.*)" -r '$2-$3-$4 $5' "${args[@]}"
|
||||||
|
fi
|
||||||
|
|||||||
2
bin/getsong
Normal file → Executable file
2
bin/getsong
Normal file → Executable file
@@ -3,4 +3,4 @@ set -e
|
|||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
exec yt-dlp -f bestaudio -o '%(title)s.%(ext)s' "$@"
|
exec yt-dlp -f bestaudio -o '%(title)s.%(ext)s' --extract-audio --audio-format mp3 --embed-thumbnail --embed-metadata $@
|
||||||
|
|||||||
8
bin/magit
Executable file
8
bin/magit
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
||||||
|
emacs --eval "(progn (magit-status \"$(pwd)\") (delete-other-windows))" &
|
||||||
|
else
|
||||||
|
echo "Current directory is not a git repository"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
46
bin/system-update
Executable file
46
bin/system-update
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# Ensure running as root
|
||||||
|
if [ $EUID != 0 ]; then
|
||||||
|
sudo "$0" "$@"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Determining the current OS
|
||||||
|
if [ -f /etc/os-release ]; then
|
||||||
|
# freedesktop.org and systemd
|
||||||
|
. /etc/os-release
|
||||||
|
OS=$NAME
|
||||||
|
VER=$VERSION_ID
|
||||||
|
elif type lsb_release >/dev/null 2>&1; then
|
||||||
|
# linuxbase.org
|
||||||
|
OS=$(lsb_release -si)
|
||||||
|
VER=$(lsb_release -sr)
|
||||||
|
elif [ -f /etc/lsb-release ]; then
|
||||||
|
# For some versions of Debian/Ubuntu without lsb_release command
|
||||||
|
. /etc/lsb-release
|
||||||
|
OS=$DISTRIB_ID
|
||||||
|
VER=$DISTRIB_RELEASE
|
||||||
|
elif [ -f /etc/debian_version ]; then
|
||||||
|
# Older Debian/Ubuntu/etc.
|
||||||
|
OS=Debian
|
||||||
|
VER=$(cat /etc/debian_version)
|
||||||
|
else
|
||||||
|
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
|
||||||
|
OS=$(uname -s)
|
||||||
|
VER=$(uname -r)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update commands per OS
|
||||||
|
case $OS in
|
||||||
|
Fedora\ Linux)
|
||||||
|
dnf upgrade --refresh;
|
||||||
|
flatpak update --assumeyes;
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Cannot update system with OS: " $OS
|
||||||
|
;;
|
||||||
|
esac
|
||||||
84
dotfiles/vim/vimrc
Normal file
84
dotfiles/vim/vimrc
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
" Comments in Vimscript start with a `"`.
|
||||||
|
|
||||||
|
" If you open this file in Vim, it'll be syntax highlighted for you.
|
||||||
|
|
||||||
|
" Vim is based on Vi. Setting `nocompatible` switches from the default
|
||||||
|
" Vi-compatibility mode and enables useful Vim functionality. This
|
||||||
|
" configuration option turns out not to be necessary for the file named
|
||||||
|
" '~/.vimrc', because Vim automatically enters nocompatible mode if that file
|
||||||
|
" is present. But we're including it here just in case this config file is
|
||||||
|
" loaded some other way (e.g. saved as `foo`, and then Vim started with
|
||||||
|
" `vim -u foo`).
|
||||||
|
set nocompatible
|
||||||
|
|
||||||
|
" Allow plugins based on file types
|
||||||
|
filetype plugin on
|
||||||
|
|
||||||
|
" Turn on syntax highlighting.
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
" Disable the default Vim startup message.
|
||||||
|
set shortmess+=I
|
||||||
|
|
||||||
|
" Show line numbers.
|
||||||
|
set number
|
||||||
|
|
||||||
|
" This enables relative line numbering mode. With both number and
|
||||||
|
" relativenumber enabled, the current line shows the true line number, while
|
||||||
|
" all other lines (above and below) are numbered relative to the current line.
|
||||||
|
" This is useful because you can tell, at a glance, what count is needed to
|
||||||
|
" jump up or down to a particular line, by {count}k to go up or {count}j to go
|
||||||
|
" down.
|
||||||
|
set relativenumber
|
||||||
|
|
||||||
|
" Always show the status line at the bottom, even if you only have one window open.
|
||||||
|
set laststatus=2
|
||||||
|
|
||||||
|
" The backspace key has slightly unintuitive behavior by default. For example,
|
||||||
|
" by default, you can't backspace before the insertion point set with 'i'.
|
||||||
|
" This configuration makes backspace behave more reasonably, in that you can
|
||||||
|
" backspace over anything.
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
|
" By default, Vim doesn't let you hide a buffer (i.e. have a buffer that isn't
|
||||||
|
" shown in any window) that has unsaved changes. This is to prevent you from "
|
||||||
|
" forgetting about unsaved changes and then quitting e.g. via `:qa!`. We find
|
||||||
|
" hidden buffers helpful enough to disable this protection. See `:help hidden`
|
||||||
|
" for more information on this.
|
||||||
|
set hidden
|
||||||
|
|
||||||
|
" This setting makes search case-insensitive when all characters in the string
|
||||||
|
" being searched are lowercase. However, the search becomes case-sensitive if
|
||||||
|
" it contains any capital letters. This makes searching more convenient.
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
" Enable searching as you type, rather than waiting till you press enter.
|
||||||
|
set incsearch
|
||||||
|
|
||||||
|
" Unbind some useless/annoying default key bindings.
|
||||||
|
nmap Q <Nop> " 'Q' in normal mode enters Ex mode. You almost never want this.
|
||||||
|
|
||||||
|
" Disable audible bell because it's annoying.
|
||||||
|
set noerrorbells visualbell t_vb=
|
||||||
|
|
||||||
|
" Enable mouse support. You should avoid relying on this too much, but it can
|
||||||
|
" sometimes be convenient.
|
||||||
|
set mouse+=a
|
||||||
|
|
||||||
|
" Try to prevent bad habits like using the arrow keys for movement. This is
|
||||||
|
" not the only possible bad habit. For example, holding down the h/j/k/l keys
|
||||||
|
" for movement, rather than using more efficient movement commands, is also a
|
||||||
|
" bad habit. The former is enforceable through a .vimrc, while we don't know
|
||||||
|
" how to prevent the latter.
|
||||||
|
" Do this in normal mode...
|
||||||
|
nnoremap <Left> :echoe "Use h"<CR>
|
||||||
|
nnoremap <Right> :echoe "Use l"<CR>
|
||||||
|
nnoremap <Up> :echoe "Use k"<CR>
|
||||||
|
nnoremap <Down> :echoe "Use j"<CR>
|
||||||
|
" ...and in insert mode
|
||||||
|
inoremap <Left> <ESC>:echoe "Use h"<CR>
|
||||||
|
inoremap <Right> <ESC>:echoe "Use l"<CR>
|
||||||
|
inoremap <Up> <ESC>:echoe "Use k"<CR>
|
||||||
|
inoremap <Down> <ESC>:echoe "Use j"<CR>
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name ESP Fixes
|
// @name ESP Fixes
|
||||||
// @namespace https://esp.eas-cpq.de/
|
// @namespace https://esp.eas-cpq.de/
|
||||||
// @version 1.11
|
// @version 2026-01-21.01
|
||||||
// @description Collection of fixes for the EAS Service Portal
|
// @description Collection of fixes for the EAS Service Portal
|
||||||
// @updateURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js
|
// @updateURL https://git.luxick.de/luxick/scripts/raw/branch/master/js/esp-fixes.user.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/luxick/scripts/master/esp-fixes.user.js
|
// @downloadURL https://git.luxick.de/luxick/scripts/raw/branch/master/js/esp-fixes.user.js
|
||||||
// @author Marcel Fries
|
// @author Marcel Fries
|
||||||
// @match https://esp.eas-cpq.de/*
|
// @match https://esp.eas-cpq.de/*
|
||||||
// @match https://esp-new.eas-cpq.de/*
|
// @match https://esp-new.eas-cpq.de/*
|
||||||
@@ -52,6 +52,14 @@ String.prototype.replaces = function(str, replace) {
|
|||||||
|
|
||||||
// Set title of the tab to number and description of the task
|
// Set title of the tab to number and description of the task
|
||||||
function updateTitle(){
|
function updateTitle(){
|
||||||
|
// Check for tabtitle URL parameter first
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const customTitle = urlParams.get('tabtitle');
|
||||||
|
if (customTitle) {
|
||||||
|
document.title = customTitle;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let header = document.getElementById("TaskLabelHeader");
|
let header = document.getElementById("TaskLabelHeader");
|
||||||
|
|
||||||
headerReplacements.forEach(function(value,key) {header.innerText = header.innerText.replaces(key, value); })
|
headerReplacements.forEach(function(value,key) {header.innerText = header.innerText.replaces(key, value); })
|
||||||
@@ -68,9 +76,11 @@ function updateTitle(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
let errorSubHeader = document.getElementById("SubHeaderLabel");
|
let errorSubHeader = document.getElementById("SubHeaderLabel");
|
||||||
let numberText = errorSubHeader.textContent.substring(27);
|
if (errorSubHeader) {
|
||||||
if (numberText.startswith('E')) {
|
let numberText = errorSubHeader.textContent.substring(27);
|
||||||
document.title = numberText;
|
if (numberText.startsWith('E')) {
|
||||||
|
document.title = numberText;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = document.title.replace("Word Editor - TaskDescription - ", "Text ")
|
document.title = document.title.replace("Word Editor - TaskDescription - ", "Text ")
|
||||||
Reference in New Issue
Block a user