Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 559cf1af4c |
61
scripts/version-auf-hintergrund.sh
Executable file
61
scripts/version-auf-hintergrund.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (C) 2026 Aaron Holmer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
function main () {
|
||||
|
||||
local ankerpunkt="unten-rechts"
|
||||
|
||||
# local targetfile="aarons_tux.png"
|
||||
local targetfile="Rastergrafik3.png"
|
||||
local outputfile="test-out.png"
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
local version_str="$VERSION_ID"
|
||||
else
|
||||
local version_str="$VERSION"
|
||||
fi
|
||||
|
||||
local datestring="$(date +"%B %Y")"
|
||||
local outstr=$(printf "%-30s\n%-30s\n%-30s" "CSR PASSGENAUES LINUX" "${PRETTY_NAME} ${version_str}" "Version: ${datestring}")
|
||||
|
||||
# local outstr=$(printf "%-30s\n%-30s\n%-30s\n%-30s\n%-30s" "CSR CUSTOM LINUX" "${PRETTY_NAME} ${version_str}" "Version: ${datestring}" "" "benutzer@localhost:~$ _")
|
||||
|
||||
case "$ankerpunkt" in
|
||||
zentrum-logo)
|
||||
local offset_x=300
|
||||
local offset_y=-30
|
||||
local gravity_str="Center"
|
||||
;;
|
||||
unten-rechts)
|
||||
local offset_x=0
|
||||
local offset_y=50
|
||||
local gravity_str="SouthEast"
|
||||
;;
|
||||
esac
|
||||
|
||||
# magick "$targetfile" -font "Adwaita-Mono" -fill "white" -pointsize 14 -gravity "SouthWest" -draw "text 100,0 ' DAS IST EIN TEST-TEXT'" "$outputfile"
|
||||
# magick "$targetfile" -font "Adwaita-Mono" -fill "white" -pointsize 20 -gravity "Center" -draw "text 100,0 'CSR XUBUNTU LINUX'" "tmpfile"
|
||||
# magick "tmpfile" -font "Adwaita-Mono" -fill "white" -pointsize 20 -gravity "Center" -draw "text 100,50 'Stand: Januar 2026'" "$outputfile"
|
||||
magick "$targetfile" -font "Adwaita-Mono" -fill "white" -pointsize 20 -gravity "$gravity_str" -draw "text $offset_x,$offset_y '$outstr'" "$outputfile"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user