bHELPER/bHELPER.sh

445 lines
17 KiB
Bash
Raw Normal View History

2021-01-25 22:41:54 +01:00
#!/usr/bin/env bash
2021-03-12 18:14:57 +01:00
SkriptVersion="2021-03-12 18:15"
2021-01-25 22:41:54 +01:00
gl_SkriptName=$(basename "${0}")
gl__SkriptPfadName=$(cd "$(dirname "${0}")"; pwd -P)/$(basename "${0}")
gl_SkriptOrdner=$(cd "$(dirname "${0}")"; pwd -P)/
2021-03-11 18:06:35 +01:00
gl__config="${HOME}/.config/bHELPER/bHELPER.conf"
2021-02-07 03:42:40 +01:00
gl__osname=$(grep "NAME=" /etc/os-release | sed "s/NAME=//" | sed "s/\"//")
gl__osprettyname=$(grep "^PRETTY_NAME" /etc/os-release | grep -o "\".*\"" | sed "s/^\"//" | sed "s/\"$//")
2021-01-25 22:41:54 +01:00
gl__ipv4_eth=$(ip addr list | sed -n '/^[0-9]: e/,/^[0-9]: [a-z]/p' | grep -o "inet [0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}" | grep -o "[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}")
gl__wlanactive=$(nmcli device show wlan0 | grep STATE | grep -o "(.*)" | sed "s|(||" | sed "s|)||")
gl__ipv4wlan=$(ip addr list | grep -A2 ": wl[a-z0-9]\{3\}" | grep -o "inet [0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}" | grep -o "[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}")
[[ -d ${HOME}/Desktop/ ]] && gl__Desktop_VZ=Desktop/
2021-01-26 17:22:37 +01:00
[[ -d ${HOME}/Schreibtisch/ ]] && gl__Desktop_VZ=Schreibtisch/
2021-01-26 18:58:42 +01:00
################################################################################
### Desktop Icon
################################################################################
2021-03-11 21:35:12 +01:00
if grep "^desktopiconautom=no" "${gl__config}" &>/dev/null ; then
echo "bla" &>/dev/null
2021-03-10 15:39:40 +01:00
else
2021-02-14 22:42:08 +01:00
cat <<_EOF_ > "${HOME}/${gl__Desktop_VZ}bHELPER.desktop"
#!/usr/bin/env xdg-open
2021-01-26 18:58:42 +01:00
[Desktop Entry]
Name=bHELPER
2021-02-14 22:42:08 +01:00
Icon=${HOME}/.bHELPER/bHELPER.png
Exec=bash '${HOME}/.bHELPER/bHELPER.sh'
2021-01-26 18:58:42 +01:00
Type=Application
Terminal=true
_EOF_
2021-02-14 22:42:08 +01:00
chmod 755 "${HOME}/${gl__Desktop_VZ}bHELPER.desktop"
fi
2021-01-26 18:58:42 +01:00
2021-01-26 17:22:37 +01:00
################################################################################
### Optik
################################################################################
2021-02-07 02:20:13 +01:00
gl__format_red=$(echo -e "\033[1;31m")
gl__format_green=$(echo -e "\033[1;32m")
gl__format_off=$(echo -e "\033[0m")
gl__datei_anfang=$(echo "${gl__format_red}-------- "${datei}" (ANFANG) -----------------------------------------------------------------${gl__format_off}")
gl__datei_ende=$(echo "${gl__format_red}-------- "${datei}" (ENDE) -------------------------------------------------------------------${gl__format_off}")
2021-02-14 22:42:08 +01:00
gl__ausgabe_anfang=$(echo "${gl__format_red}---- Terminalausgabe (Anfang) --------------------------------------------------------------------------${gl__format_off}")
gl__ausgabe_ende=$(echo "${gl__format_red}---- Terminalausgabe (Ende) ----------------------------------------------------------------------------${gl__format_off}")
2021-02-07 02:20:13 +01:00
gl__bittewaehlen=$(echo " ${gl__format_red}BITTE WÄHLEN!${gl__format_off}")
2021-01-26 17:22:37 +01:00
################################################################################
### Favoriten
################################################################################
[[ -f /usr/bin/nautilus ]] && gl__favdateimanager="/usr/bin/nautilus"
[[ -f /usr/bin/thunar ]] && gl__favdateimanager="/usr/bin/thunar"
[[ -f /usr/bin/caja ]] && gl__favdateimanager="/usr/bin/caja"
[[ -f /usr/bin/dolphin ]] && gl__favdateimanager="/usr/bin/dolphin --split"
[[ -f /usr/bin/vim ]] && gl__fav_editor="/usr/bin/vim"
[[ -f /usr/bin/nano ]] && gl__fav_editor="/usr/bin/nano"
[[ -f /usr/bin/kwrite ]] && gl__fav_editor="/usr/bin/kwrite"
[[ -f /usr/bin/gedit ]] && gl__fav_editor="/usr/bin/gedit"
[[ -f /usr/bin/kate ]] && gl__fav_editor="/usr/bin/kate"
[[ -f /usr/bin/geany ]] && gl__fav_editor="/usr/bin/geany"
2021-01-29 20:13:19 +01:00
[[ -f /usr/bin/evince ]] && gl__favpdfviewer="/usr/bin/evince"
[[ -f /usr/bin/okular ]] && gl__favpdfviewer="/usr/bin/okular"
2021-01-26 17:22:37 +01:00
2021-01-29 20:13:19 +01:00
[[ -f /usr/bin/texmaker ]] && gl_favtexeditor="/usr/bin/texmaker"
2021-01-26 17:22:37 +01:00
2021-01-29 19:49:53 +01:00
[[ -f /usr/bin/qupzilla ]] && gl__favbrowser="/usr/bin/qupzilla"
[[ -f /usr/bin/konqueror ]] && gl__favbrowser="/usr/bin/konqueror"
[[ -f /usr/bin/firefox ]] && gl__favbrowser="/usr/bin/firefox"
2021-01-26 17:22:37 +01:00
[[ -f /usr/bin/clementine ]] && gl__fav_audioplayer="/usr/bin/clementine"
[[ -f /usr/bin/vlc ]] && gl__fav_videoplayer="/usr/bin/vlc"
################################################################################
### STARTSEITE
################################################################################
2021-02-07 03:45:39 +01:00
### LÜFTERDREHZAHL
if [ -f "/proc/acpi/ibm/fan" ]; then
fanspeed=$(grep "speed" /proc/acpi/ibm/fan 2> /dev/null | grep -o "[0-9].*")
else
echo ""
fi
2021-01-26 17:22:37 +01:00
### CPU TEMPERATUR
if [ -f /usr/bin/sensors ]; then
sensorsvar="${0}.sensors.tmp"
sensors > "${sensorsvar}"
core0temp=$(grep "Core 0" "${sensorsvar}" | awk '{print $3}')
core1temp=$(grep "Core 1" "${sensorsvar}" | awk '{print $3}')
core2temp=$(grep "Core 2" "${sensorsvar}" | awk '{print $3}')
core3temp=$(grep "Core 3" "${sensorsvar}" | awk '{print $3}')
fi
### LAUTSTÄRKE
gl__lautstaerke=$(amixer | grep -o "\[off\]\|\[on\]" | head -1 | sed "s/\[//g" | sed "s/\]//g")
gl__lautstaerkeprozent=$(amixer | grep "%" | head -1 | grep -o "\[[0-9]\{1,3\}%\]" | uniq | sed "s/\[//g" | sed "s/\]//g")
if [ ${gl__lautstaerke} = "off" ] ; then
gl__lautstaerke="Ton: ${gl__format_red}AUS${gl__format_off} Lautstärke (Master): ${gl__format_red}${gl__lautstaerkeprozent}${gl__format_off}"
gl__ton_anaus="AUS"
else
gl__lautstaerke="Ton: ${gl__format_red}EIN${gl__format_off} Lautstärke (Master): ${gl__format_red}${gl__lautstaerkeprozent}${gl__format_off}"
gl__ton_anaus="EIN"
2021-02-07 17:45:18 +01:00
fi
2021-01-26 17:22:37 +01:00
gl__lautstaerkeprozent=$(amixer | grep "%" | head -1 | grep -o "\[[0-9]\{1,3\}%\]" | sed "s/\[//g" | sed "s/\]//g")
2021-02-07 17:45:18 +01:00
### MIKROFONE
# Mute-Status der Mikrofone
2021-03-12 18:10:29 +01:00
#function pacmd_mic_mute {
# pacmd list-sources | grep "alsa_input" | sed -e "s/name: <//g" -e "s/>//g" -e "s/^[ \t]*//;s/[ \t]*$//" | xargs -I{} pactl set-source-mute {} toggle
#}
2021-02-07 18:13:12 +01:00
function pacmd_mic_mute {
2021-03-12 18:10:29 +01:00
pacmd list-sources | grep "alsa_input" | sed -e "s/name: <//g" -e "s/>//g" -e "s/^[ \t]*//;s/[ \t]*$//" | xargs -I{} pactl set-source-mute {} yes
}
function pacmd_mic_unmute {
pacmd list-sources | grep "alsa_input" | sed -e "s/name: <//g" -e "s/>//g" -e "s/^[ \t]*//;s/[ \t]*$//" | xargs -I{} pactl set-source-mute {} no
2021-02-07 18:13:12 +01:00
}
function pacmd_mic_status {
2021-03-11 21:35:12 +01:00
pacmd list-sources | grep "index:\|device.string\|name:\|muted" | grep -B1 -A1 "alsa_input" | grep -o "muted: .*$" | uniq | sed "s/muted: //g" | grep yes &> /dev/null && gl__pacmd_mic_mutestatus="aus" || gl__pacmd_mic_mutestatus="an"
2021-02-07 18:13:12 +01:00
}
pacmd_mic_status
2021-02-07 17:45:18 +01:00
# Device Namen
pacmd_mic_list=$(pacmd list-sources | grep "alsa_input" | sed -e "s/name: <//g" -e "s/>//g" | sed "s/^[ \t]*//;s/[ \t]*$//")
2021-02-07 02:20:13 +01:00
2021-01-26 17:22:37 +01:00
function bannerstart {
echo -e ""
2021-02-03 21:28:58 +01:00
echo -e " ${gl__format_red}88 88 88 88888888 88 88888b. 88888888 888888b. ${gl__format_off}"
echo -e " ${gl__format_red}88 88 88 88 88 88 Y8b 88 88 Y8b ${gl__format_off}"
echo -e " ${gl__format_red}88 88 88 88 88 88 88 88 88 88 ${gl__format_off}"
2021-02-03 21:28:10 +01:00
echo -e " ${gl__format_red}88888b. 88888888 888888 88 88 d8P 888888 88 d8P ${gl__format_off}"
echo -e " ${gl__format_red}88 \"8b 88 88 88 88 88888P\" 88 88888P\" ${gl__format_off}"
echo -e " ${gl__format_red}88 88 88 88 88 88 88 88 88 T8b ${gl__format_off}"
echo -e " ${gl__format_red}88 d8P 88 88 88 88 88 88 88 T8b ${gl__format_off}"
echo -e " ${gl__format_red}8888P\" 88 88 88888888 8888888 88 88888888 88 T8b ${gl__format_off}"
2021-01-26 17:22:37 +01:00
echo -e ""
2021-02-07 18:13:12 +01:00
echo -e " ${gl__format_red}Version:${gl__format_off} ${SkriptVersion} ${gl__format_red}Ton:${gl__format_off} ${gl__ton_anaus} ${gl__format_red}Volume:${gl__format_off} ${gl__lautstaerkeprozent} ${gl__format_red}Mikros:${gl__format_off} ${gl__pacmd_mic_mutestatus}"
2021-01-26 17:22:37 +01:00
echo -e " ${gl__format_red}EN:${gl__format_off} ${gl__ipv4_eth} ${gl__format_red}WLAN:${gl__format_off} ${gl__wlanactive} ${gl__format_red}WLAN IP:${gl__format_off} ${gl__ipv4wlan}"
2021-02-07 03:42:40 +01:00
echo -e " ${gl__format_red}OS:${gl__format_off} ${gl__osprettyname} ${gl__format_red}Hostname:${gl__format_off} ${HOSTNAME}"
2021-01-26 17:22:37 +01:00
echo -e " ${gl__format_red}Lüfterdrehzahl:${gl__format_off} ${fanspeed} ${gl__format_red}CPU:${gl__format_off} ${core0temp} ${core1temp} ${core2temp} ${core3temp} ${core4temp} ${core5temp} ${core6temp} ${core7temp}"
}
2021-02-07 03:36:26 +01:00
2021-01-26 17:22:37 +01:00
function banner {
clear
echo -e ""
2021-02-03 21:48:51 +01:00
echo -e " ${gl__format_red}88 88 88 88888888 88 88888b. 88888888 888888b. ${gl__format_off}"
echo -e " ${gl__format_red}88 88 88 88 88 88 Y8b 88 88 Y8b ${gl__format_off}"
echo -e " ${gl__format_red}88 88 88 88 88 88 88 88 88 88 ${gl__format_off}"
echo -e " ${gl__format_red}888(8b. 88888888 888888 88 88 d8P 888888 88 d8P ${gl__format_off}"
echo -e " ${gl__format_red}88 \"8b 88 88 88 88 88888P\" 88 88888P\" ${gl__format_off}"
echo -e " ${gl__format_red}88 88 88 88 88 88 88 88 88 T8b ${gl__format_off}"
echo -e " ${gl__format_red}88 d8P 88 88 88 88 88 88 88 T8b ${gl__format_off}"
echo -e " ${gl__format_red}8888P\" 88 88 88888888 8888888 88 88888888 88 T8b ${gl__format_off}"
2021-01-26 17:22:37 +01:00
echo -e ""
echo -e "${gl__format_red} ${bannertitel} ${gl__format_off}"
echo ""; echo ""
}
function pause {
echo -e ""
echo -e ""
read -p "${gl__format_red}Drücke ENTER um weiterzumachen${gl__format_off}"
}
function ende {
echo -e ""
echo -e ""
read -p "${gl__format_red}Drücke ENTER um weiterzumachen${gl__format_off}"
}
function endedasi {
echo -e ""
echo -e ""
read -p "${gl__format_red}Das Verzeichnis existiert nicht. Tschüss!${gl__format_off}"
exit
}
clear
bannerstart
echo ""
2021-01-29 19:52:05 +01:00
echo ""
2021-02-09 00:37:39 +01:00
echo " ${gl__format_red}| H |${gl__format_off} Hardware"
2021-01-26 17:22:37 +01:00
echo ""
2021-01-29 19:22:12 +01:00
echo ""
2021-01-29 19:18:47 +01:00
echo " ${gl__format_red}| E |${gl__format_off} Einstellungen ${gl__format_red}| U |${gl__format_off} bHELPER aktualisieren"
2021-01-29 19:22:12 +01:00
echo ""
2021-01-26 17:22:37 +01:00
echo " ${gl__format_red}| V |${gl__format_off} leiser ${gl__format_red}| B |${gl__format_off} TON ein/aus ${gl__format_red}| N |${gl__format_off} lauter"
2021-02-13 12:36:08 +01:00
echo " ${gl__format_red}| M |${gl__format_off} Mikrofone ein/aus"
2021-01-26 17:22:37 +01:00
echo ""
echo "${gl__bittewaehlen}"
read -n 1 hauptmenue
case ${hauptmenue} in
2021-02-11 22:04:32 +01:00
2021-01-26 17:22:37 +01:00
################################################################################
### Bildschirm sperren
################################################################################
1)
if [[ ${WINDOWMANAGER} =~ .*plasma.* ]]
then
dbus-send --type=method_call --dest=org.kde.screensaver /ScreenSaver org.freedesktop.ScreenSaver.Lock
fi
if [[ ${WINDOWMANAGER} =~ .*xfce.* ]]
then
xscreensaver-command -lock
fi
;;
2021-01-29 19:42:44 +01:00
################################################################################
### Hardware
################################################################################
h|H)
bannertitel="Hauptmenü => Hardware"
banner
2021-02-12 19:51:30 +01:00
echo " ${gl__format_red}| 0 |${gl__format_off} Hardwareinformationen eures Rechners (dmidecode)"
2021-02-13 13:16:15 +01:00
echo " ${gl__format_red}| 1 |${gl__format_off} Hardwareinformationen eures Rechners (inxi)"
echo " ${gl__format_red}| 2 |${gl__format_off} Akkuinformationen eures Laptops (upower)"
2021-02-07 02:20:13 +01:00
echo " ${gl__format_red}| XK |${gl__format_off} xrandr - Bildschirmkonfiguration anzeigen lassen"
2021-02-11 22:07:23 +01:00
echo " ${gl__format_red}| X1 |${gl__format_off} xrandr - Externer Bildschirm (HDMI-1) EIN und Laptop Bildschirm (LVDS-1) AUS"
2021-02-07 02:20:13 +01:00
echo ""
echo "${gl__bittewaehlen}"
2021-01-29 19:42:44 +01:00
2021-03-11 23:15:26 +01:00
read hardware
2021-01-29 19:42:44 +01:00
case ${hardware} in
2021-02-12 19:51:30 +01:00
0)
bannertitel="Hauptmenü => Hardware => Hardwareinformationen eures Rechners (dmidecode)"
banner
echo " ${gl__format_red}Hersteller des Systems:${gl__format_off} $(sudo /usr/sbin/dmidecode -s system-manufacturer)"
echo " ${gl__format_red}Produktname des Systems:${gl__format_off} $(sudo /usr/sbin/dmidecode -s system-product-name)"
echo " ${gl__format_red}Modell Nr. des Systems:${gl__format_off} $(sudo /usr/sbin/dmidecode -s system-version)"
echo " ${gl__format_red}Verwendete BIOS-Version:${gl__format_off} $(sudo /usr/sbin/dmidecode -s bios-version)"
echo " ${gl__format_red}Hersteller des Mainboards:${gl__format_off} $(sudo /usr/sbin/dmidecode -s baseboard-manufacturer)"
echo " ${gl__format_red}Produktname des Mainboards:${gl__format_off} $(sudo /usr/sbin/dmidecode -s baseboard-product-name)"
echo " ${gl__format_red}Versionsnummer des Mainboards:${gl__format_off} $(sudo /usr/sbin/dmidecode -s baseboard-version)"
ende
;;
2021-02-13 12:47:47 +01:00
1)
2021-02-13 13:16:15 +01:00
bannertitel="Hauptmenü => Hardware => Hardwareinformationen eures Rechners (inxi)"
banner
inxi -Fxz
ende
;;
2)
2021-02-13 12:47:47 +01:00
bannertitel="Hauptmenü => Hardware => Akkuinformationen eures Laptops (upower)"
banner
upower -i /org/freedesktop/UPower/devices/battery_BAT0
ende
;;
2021-02-07 02:20:13 +01:00
xk|XK)
2021-02-11 22:04:32 +01:00
bannertitel="Hauptmenü => Hardware => Bildschirmkonfigurieren (xrandr)"
2021-01-29 19:42:44 +01:00
banner
2021-02-11 22:04:32 +01:00
echo "${gl__format_red}► Alle aktiven Monitoranschlüsse:${gl__format_off}"
2021-02-07 03:33:34 +01:00
echo "${gl__ausgabe_anfang}"
2021-02-11 22:04:32 +01:00
xrandr --listactivemonitors
2021-02-07 03:33:34 +01:00
echo "${gl__ausgabe_ende}"
echo ""
2021-02-11 22:04:32 +01:00
echo "${gl__format_red}► Alle vorhandene Monitoranschlüsse:${gl__format_off}"
2021-02-07 02:20:13 +01:00
echo "${gl__ausgabe_anfang}"
2021-02-11 22:04:32 +01:00
xrandr --listproviders
2021-02-07 02:20:13 +01:00
echo "${gl__ausgabe_ende}"
2021-01-29 19:42:44 +01:00
ende
;;
2021-02-11 22:11:02 +01:00
x1|X1)
bannertitel="Hauptmenü => Hardware => Externer Bildschirm (HDMI-?) EIN und Laptop Bildschirm (LVDS-1) AUS"
2021-02-11 22:04:32 +01:00
banner
2021-02-12 19:51:30 +01:00
xrandr --output LVDS-1 --off --output $(xrandr | grep " connected" | grep HDMI | head -1 | grep -o "^HDMI-.") --auto
2021-02-11 22:04:32 +01:00
ende
;;
2021-02-12 19:51:30 +01:00
2021-01-29 19:45:00 +01:00
esac
2021-01-29 19:42:44 +01:00
;;
2021-02-03 21:26:44 +01:00
################################################################################
### Linux Distributionen
################################################################################
d|D)
bannertitel="Hauptmenü => Linux Distributionen"
banner
echo " ${gl__format_red}| LM |${gl__format_off} Linux Mint"
2021-02-07 02:20:13 +01:00
echo ""
echo "${gl__bittewaehlen}"
2021-02-03 21:26:44 +01:00
read -n 2 hardware
case ${hardware} in
lm|LM)
bannertitel="Hauptmenü => Linux Distributionen => Linux Mint"
banner
aptitude search ubuntu-restricted-extras
ende
;;
esac
;;
2021-02-07 17:45:18 +01:00
################################################################################
### Mikrofone ein-/ausschalten
################################################################################
m|M)
2021-03-12 18:10:29 +01:00
pacmd_mic_status
if [ "${gl__pacmd_mic_mutestatus}" == "an" ]; then
pacmd_mic_mute
else
pacmd_mic_unmute
fi
2021-02-07 17:45:18 +01:00
;;
2021-01-29 19:18:47 +01:00
################################################################################
### bHELPER aktualisieren
################################################################################
2021-01-29 19:19:40 +01:00
u|U)
2021-01-31 15:55:46 +01:00
bannertitel="Hauptmenü => bHELPER aktualisieren"
2021-01-31 15:54:09 +01:00
banner
2021-01-29 19:18:47 +01:00
rm /tmp/bHELPER-*.zip
bHELPER_zip=$(mktemp /tmp/bHELPER-XXXXXXXXX.zip)
cd ~
rm -rf ~/.bHELPER/
wget -O ${bHELPER_zip} https://git.disroot.org/dingens/bHELPER/archive/master.zip
unzip -d ~/ ${bHELPER_zip}
mv ~/bhelper/ ~/.bHELPER/
2021-01-31 15:54:09 +01:00
ende
2021-01-29 19:18:47 +01:00
;;
2021-03-10 15:44:46 +01:00
################################################################################
### Einstellungen
################################################################################
e|E)
2021-03-11 18:06:35 +01:00
[[ -d ${HOME}/.config/bHELPER/ ]] || mkdir -p ${HOME}/.config/bHELPER/
[[ -f "${gl__config}" ]] || touch "${gl__config}"
2021-03-10 15:44:46 +01:00
bannertitel="Hauptmenü => Einstellungen"
banner
2021-03-10 16:20:38 +01:00
2021-03-12 17:53:33 +01:00
unset desktopiconautom_status
2021-03-11 18:06:35 +01:00
grep "desktopiconautom=no" "${gl__config}" &> /dev/null && desktopiconautom_status="$(echo "${gl__format_red}[ausgeschaltet]${gl__format_off}")"
grep "desktopiconautom=no" "${gl__config}" &> /dev/null || desktopiconautom_status="$(echo "${gl__format_green}[eingeschaltet]${gl__format_off}")"
echo " ${gl__format_red}| 0 |${gl__format_off} Automatische Erstellung des Desktop Icons ${desktopiconautom_status}"
2021-03-10 16:20:38 +01:00
2021-03-12 17:53:33 +01:00
echo " ${gl__format_red}| E |${gl__format_off} Dieses Skript editieren"
2021-03-11 18:06:35 +01:00
echo ""
2021-03-10 15:44:46 +01:00
echo ""
echo "${gl__bittewaehlen}"
2021-03-11 18:06:35 +01:00
read einstellungen
2021-03-10 15:44:46 +01:00
case ${einstellungen} in
2021-03-10 16:20:38 +01:00
0)
2021-03-11 18:06:35 +01:00
bannertitel="Hauptmenü => Einstellungen => Automatisches Erstellung des Desktop Icons"
2021-03-10 15:44:46 +01:00
banner
2021-03-11 18:06:35 +01:00
if [[ "${desktopiconautom_status}" =~ .*eingeschaltet.* ]] ; then
grep "desktopiconautom=" "${gl__config}" &> /dev/null || echo "desktopiconautom=no" >> "${gl__config}"
sed -i "s/^desktopiconautom=.*$/desktopiconautom=no/" "${gl__config}"
fi
if [[ "${desktopiconautom_status}" =~ .*ausgeschaltet.* ]] ; then
grep "desktopiconautom=" "${gl__config}" &> /dev/null || echo "desktopiconautom=yes" >> "${gl__config}"
sed -i "s/^desktopiconautom=.*$/desktopiconautom=yes/" "${gl__config}"
fi
banner
grep "desktopiconautom=no" "${gl__config}" &> /dev/null && echo "Die Automatische Erstellung des Desktop Icons wurde ${gl__format_red}[ausgeschaltet]${gl__format_off}"
grep "desktopiconautom=yes" "${gl__config}" &> /dev/null && echo "Die Automatische Erstellung des Desktop Icons wurde ${gl__format_green}[eingeschaltet]${gl__format_off}"
2021-03-10 15:44:46 +01:00
ende
;;
2021-03-12 17:53:33 +01:00
e|E)
2021-01-26 17:22:37 +01:00
rm "${0}".dasi10 2> /dev/null
cp "${0}".dasi09 "${0}".dasi10 2> /dev/null
cp "${0}".dasi08 "${0}".dasi09 2> /dev/null
cp "${0}".dasi07 "${0}".dasi08 2> /dev/null
cp "${0}".dasi06 "${0}".dasi07 2> /dev/null
cp "${0}".dasi05 "${0}".dasi06 2> /dev/null
cp "${0}".dasi04 "${0}".dasi05 2> /dev/null
cp "${0}".dasi03 "${0}".dasi04 2> /dev/null
cp "${0}".dasi02 "${0}".dasi03 2> /dev/null
cp "${0}".dasi01 "${0}".dasi02 2> /dev/null
cp "${0}" "${0}".dasi01 2> /dev/null
nohup ${gl__fav_editor} "${0}" &
2021-03-12 17:53:33 +01:00
;;
esac
2021-01-26 17:22:37 +01:00
;;
esac
rm /home/${USER}/nohup.out 2> /dev/null
rm "${0}".*.tmp 2> /dev/null
. "${gl__SkriptPfadName}" && exit 0