From 41a856df01b40b2de5abaef31e7ca2d06c445840 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sat, 18 Nov 2023 13:07:57 +0100 Subject: [PATCH] Initial commit --- app | 30 + applets/logoff | 7 + applets/source | 2 + install | 30 + pack | 11 + readme.txt | 19 + uninstall | 21 + user/modules | 6 + .../.config/autorandr/default/config | 6 + .../autorandr/.config/autorandr/default/setup | 1 + user/modules.d/autorandr/logoff | 3 + user/modules.d/autorandr/run | 3 + user/modules.d/debian_keyboard/run | 3 + user/modules.d/lxpanel/run | 2 + user/modules.d/openbox/exec | 2 + user/modules.d/openbox/logoff | 2 + user/modules.d/openbox/rc.xml | 659 ++++++++++++++++++ user/modules.d/wallpaper/run | 2 + user/modules.d/xsessionrc/source | 2 + user/wallpaper | 1 + 20 files changed, 812 insertions(+) create mode 100755 app create mode 100644 applets/logoff create mode 100644 applets/source create mode 100755 install create mode 100755 pack create mode 100644 readme.txt create mode 100755 uninstall create mode 100644 user/modules create mode 100644 user/modules.d/autorandr/.config/autorandr/default/config create mode 100644 user/modules.d/autorandr/.config/autorandr/default/setup create mode 100755 user/modules.d/autorandr/logoff create mode 100755 user/modules.d/autorandr/run create mode 100755 user/modules.d/debian_keyboard/run create mode 100755 user/modules.d/lxpanel/run create mode 100755 user/modules.d/openbox/exec create mode 100755 user/modules.d/openbox/logoff create mode 100644 user/modules.d/openbox/rc.xml create mode 100755 user/modules.d/wallpaper/run create mode 100644 user/modules.d/xsessionrc/source create mode 100644 user/wallpaper diff --git a/app b/app new file mode 100755 index 0000000..176ef08 --- /dev/null +++ b/app @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +de_path="$(dirname "$(realpath "$BASH_SOURCE")")" +de_distro="${de_distro:="me.fier.de"}" +de_conf_global="${de_conf_global:="$de_path/user"}" +de_conf_local="${de_conf_local:="$HOME/.config/$de_distro"}" + +if ! [ "$1" = "" ]; then + source "$de_path/applets/$1" + if [ "$1" = "source" ]; then + return 0 + fi +fi + +if ! [ -d "$de_conf_local" ]; then + cp -r "$de_conf_global" "$de_conf_local" +fi + +while IFS="" read -r de_module || [ -n "$de_module" ]; do + if [ -f "$de_conf_local/modules.d/$de_module/source" ]; then + source "$de_conf_local/modules.d/$de_module/source" + fi + + if [ -x "$de_conf_local/modules.d/$de_module/run" ]; then + "$de_conf_local/modules.d/$de_module/run" "$de_conf_local" "$de_module" + fi + + if [ -x "$de_conf_local/modules.d/$de_module/exec" ]; then + exec "$de_conf_local/modules.d/$de_module/exec" "$de_conf_local" "$de_module" + fi +done < "$de_conf_local/modules" diff --git a/applets/logoff b/applets/logoff new file mode 100644 index 0000000..86dff37 --- /dev/null +++ b/applets/logoff @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +while IFS="" read -r de_module || [ -n "$de_module" ]; do + if [ -x "$de_conf_local/modules.d/$de_module/logoff" ]; then + "$de_conf_local/modules.d/$de_module/logoff" "$de_conf_local" "$de_module" + fi +done < "$de_conf_local/modules" +exit 0 diff --git a/applets/source b/applets/source new file mode 100644 index 0000000..b8cfb82 --- /dev/null +++ b/applets/source @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +return 0 diff --git a/install b/install new file mode 100755 index 0000000..a40a3c9 --- /dev/null +++ b/install @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +set -e +script_path="$(dirname "$(realpath -s "$BASH_SOURCE")")" +cd "$script_path" +chmod +x app +source app source +install_dest="${install_dest:="/opt/$de_distro"}" + +if [ "$de_distro" = "" ]; then + echo "No distro name." + exit 1 +fi + +if [ "$script_path" = "$install_dest" ]; then + echo "Can't install from inside destination directory." + exit 1 +fi + +if [ -d "$install_dest" ]; then + echo "Use $install_dest/uninstall first." + exit 1 +fi +cp -r "$script_path" "$install_dest" +echo "" >"$install_dest/installed" + +if [ -L "/usr/local/bin/$de_distro" ]; then + rm "/usr/local/bin/$de_distro" +fi + +ln -s "$script_path/app" "/usr/local/bin/$de_distro" diff --git a/pack b/pack new file mode 100755 index 0000000..043327e --- /dev/null +++ b/pack @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e +DIR="$(dirname "$(realpath "$BASH_SOURCE")")" +source app source +archiveFile="$de_distro.tar.gz" +cd "$DIR" +if [ -f "$archiveFile" ]; then rm "$archiveFile"; fi +cd ".." +if [ -f "$archiveFile" ]; then rm "$archiveFile"; fi +tar -czf "$archiveFile" -C "$DIR" . +mv "$archiveFile" "$DIR" diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..3d5f18e --- /dev/null +++ b/readme.txt @@ -0,0 +1,19 @@ +Modular DE through and through, choose everything. + +User data is copied from "/opt/me.fier.de/user" to "~/.config/me.fier.de", if it does not exist yet. The user is free to completely change all user data. The user's data is only re-generated if the entire "~/.config/me.fier.de" directory is removed. + +"/opt/me.fier.de/user" should be seen as a preset. Any changes in it after the user already used me.fier.de, are not applied. + +* Installation: +sudo apt install feh autorandr openbox lxpanel lxrandr pcmanfm lxterminal +sudo ./install +cp -n "~/.xinitrc" "~/.xinitrc.bak" +echo "me.fier.de" >"~/.xinitrc" + +* Start: +startx + +* Uninstallation: +sudo /opt/me.fier.de/uninstall +rm "~/.xinitrc" +mv "~/.xinitrc.bak" "~/.xinitrc" diff --git a/uninstall b/uninstall new file mode 100755 index 0000000..b1c1ae1 --- /dev/null +++ b/uninstall @@ -0,0 +1,21 @@ +#!/bin/bash +set -e +script_path="$(dirname "$(realpath -s "$BASH_SOURCE")")" +cd "$script_path" +source app source + +if [ "$de_distro" = "" ]; then + echo "No distro name." + exit 1 +fi + +if ! [ -f "$script_path/installed" ]; then + echo "Please use the uninstall executable from where you installed this app." + exit 1 +fi + +if [ -f "/usr/local/bin/$de_distro" ]; then + rm "/usr/local/bin/$de_distro" +fi + +rm -rf "$script_path" diff --git a/user/modules b/user/modules new file mode 100644 index 0000000..166a965 --- /dev/null +++ b/user/modules @@ -0,0 +1,6 @@ +debian_keyboard +xsessionrc +autorandr +wallpaper +lxpanel +openbox diff --git a/user/modules.d/autorandr/.config/autorandr/default/config b/user/modules.d/autorandr/.config/autorandr/default/config new file mode 100644 index 0000000..7d741eb --- /dev/null +++ b/user/modules.d/autorandr/.config/autorandr/default/config @@ -0,0 +1,6 @@ +output Virtual-1 +crtc 0 +mode 1024x768 +pos 0x0 +primary +rate 74.99 diff --git a/user/modules.d/autorandr/.config/autorandr/default/setup b/user/modules.d/autorandr/.config/autorandr/default/setup new file mode 100644 index 0000000..9ffa663 --- /dev/null +++ b/user/modules.d/autorandr/.config/autorandr/default/setup @@ -0,0 +1 @@ +Virtual-1 00ffffffffffff0049143412000000002a180104a51a137806ee91a3544c99260f5054210800e1c0d1c00101010101010101010101012520006641001a30001e334004c310000018000000fd00327d1ea078010a202020202020000000fc0051454d55204d6f6e69746f720a000000f7000a004aa2242920000000000000012d02030a00457d6560591f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f2 diff --git a/user/modules.d/autorandr/logoff b/user/modules.d/autorandr/logoff new file mode 100755 index 0000000..1e225e0 --- /dev/null +++ b/user/modules.d/autorandr/logoff @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +export HOME="$1/modules.d/autorandr" +autorandr --save default --force diff --git a/user/modules.d/autorandr/run b/user/modules.d/autorandr/run new file mode 100755 index 0000000..33bc77f --- /dev/null +++ b/user/modules.d/autorandr/run @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +export HOME="$1/modules.d/autorandr" +autorandr --load default diff --git a/user/modules.d/debian_keyboard/run b/user/modules.d/debian_keyboard/run new file mode 100755 index 0000000..125d1a7 --- /dev/null +++ b/user/modules.d/debian_keyboard/run @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +source /etc/default/keyboard +setxkbmap "$XKBLAYOUT" "$XKBVARIANT" -model "$XKBMODEL" diff --git a/user/modules.d/lxpanel/run b/user/modules.d/lxpanel/run new file mode 100755 index 0000000..f8c41f7 --- /dev/null +++ b/user/modules.d/lxpanel/run @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +lxpanel & disown diff --git a/user/modules.d/openbox/exec b/user/modules.d/openbox/exec new file mode 100755 index 0000000..3dcade5 --- /dev/null +++ b/user/modules.d/openbox/exec @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exec openbox --config-file "$1/modules.d/$2/rc.xml" diff --git a/user/modules.d/openbox/logoff b/user/modules.d/openbox/logoff new file mode 100755 index 0000000..1ddb524 --- /dev/null +++ b/user/modules.d/openbox/logoff @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +openbox --exit diff --git a/user/modules.d/openbox/rc.xml b/user/modules.d/openbox/rc.xml new file mode 100644 index 0000000..8ab9df1 --- /dev/null +++ b/user/modules.d/openbox/rc.xml @@ -0,0 +1,659 @@ + + + + + 10 + 20 + + + yes + + no + + yes + + no + + 200 + + no + + + + UnderMouse + +
yes
+ + Mouse + + Mouse + +
+ + Nightmare + NLIMC + + yes + no + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + 1 + 1 + + + + 875 + + + + no + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 0 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-g + + + + + + + + + + + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + + + + + + + + + + + + true + Konqueror + + kfmclient openProfile filemanagement + + + + + + scrot + + + + + + wdvn-projector + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + top + + + + + + + left + + + + + + + right + + + + + + + bottom + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + + + horizontal + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + lxpanelctl menu + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + /var/lib/openbox/debian-menu.xml + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + +
diff --git a/user/modules.d/wallpaper/run b/user/modules.d/wallpaper/run new file mode 100755 index 0000000..c258d14 --- /dev/null +++ b/user/modules.d/wallpaper/run @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +feh --no-fehbg --bg-fill "$(cat "$1/wallpaper")" diff --git a/user/modules.d/xsessionrc/source b/user/modules.d/xsessionrc/source new file mode 100644 index 0000000..e8508a6 --- /dev/null +++ b/user/modules.d/xsessionrc/source @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +source "$HOME/.xsessionrc" diff --git a/user/wallpaper b/user/wallpaper new file mode 100644 index 0000000..e892467 --- /dev/null +++ b/user/wallpaper @@ -0,0 +1 @@ +Pictures/wallpaper.jpg