From cdfbb2019fff9ce09563ec1d31ebe90f29752e56 Mon Sep 17 00:00:00 2001 From: mar77i Date: Fri, 29 Mar 2024 11:03:46 +0100 Subject: [PATCH 1/1] initial commit --- deploy.sh | 98 ++++++ openbox/rc.xml | 590 ++++++++++++++++++++++++++++++++++++ qterminal.org/qterminal.ini | 113 +++++++ 3 files changed, 801 insertions(+) create mode 100755 deploy.sh create mode 100644 openbox/rc.xml create mode 100644 qterminal.org/qterminal.ini diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..91ad81e --- /dev/null +++ b/deploy.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +srcdir="$(dirname "$(realpath -Pe "${0}")")" + +old_dest() { + local REPLY + local ret=0 + while :; do + read -p "replace old configuration ${1} (Y/n)? " + case "${REPLY,,}" in + n|no) + ret=1 + break + ;; + y|yes) + break + ;; + *) + echo "Error: invalid input: ${REPLY}" >&2 + ;; + esac + done + return "${ret}" +} + +try_install() { + local src="${srcdir}/${1}" + local dest="${XDG_CONFIG_HOME}/${1}" + local skip=0 + local replace=1 + mkdir -p "${dest%/*}" + if [[ -f "${dest}" ]] && ! diff -q "${src}" "${dest}" >/dev/null; then + while :; do + read -p "${dest} exists: (diff/replace/skip): " + case "${REPLY,,}" in + diff) + diff -u "${src}" "${dest}" | less + ;; + replace) + if [[ -f "${dest}.old" ]] && ! old_dest "${dest}.old"; then + replace=0 + fi + if (( replace )); then + mv "${dest}" "${dest}.old" + fi + break + ;; + skip) + skip=1 + break + ;; + *) + echo "Error: invalid input: ${REPLY}" >&2 + ;; + esac + done + fi + if (( skip == 0 )); then + cp "${src}" "${dest}" + fi + if [[ -f "${dest}.old" ]]; then + echo "Found old configuration in ${dest}.old" + fi +} + +for f in "openbox/rc.xml" "qterminal.org/qterminal.ini"; do + try_install "${f}" +done + +openbox_maj="$(openbox --version | head -n 1 | cut -d\ -f 2 | cut -d. -f 1)" +if [[ ! -d "/usr/share/themes/Artix-dark/openbox-${openbox_maj}/" ]]; then + echo "Warning: Artix-dark theme seems unavailable" >&2 +fi +openbox --reconfigure + +hide_autostart() { + local src="/etc/xdg/autostart/${f}" + local dest="${XDG_CONFIG_HOME}/autostart/${f}" + if [[ ! -e "${dest}" ]]; then + if [[ -e "${src}" ]]; then + cp "${src}" "${dest}" + else + echo "Desktop file missing or not installed: ${f}" >&2 + return + fi + fi + if ! grep -Fq "Hidden=true" "${dest}"; then + sed -r -i '/^Exec=/i Hidden=true' "${dest}" + fi +} + +hidden_desktop_files=( + geoclue-demo-agent.desktop + lxqt-globalkeyshortcuts.desktop +) +for f in "${hidden_desktop_files[@]}"; do + hide_autostart "${f}" +done diff --git a/openbox/rc.xml b/openbox/rc.xml new file mode 100644 index 0000000..46cb1e1 --- /dev/null +++ b/openbox/rc.xml @@ -0,0 +1,590 @@ + + + + 10 + 20 + + + yes + + yes + + yes + + no + + 200 + + no + + + + Smart + +
yes
+ + Active + + 1 + +
+ + Artix-dark + 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 + + + + 0 + + + + yes + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 0 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-q + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + lxqt-runner + + + + + pactl set-sink-volume 0 -5% + + + + + pactl set-sink-volume 0 +5% + + + + + pactl set-sink-mute 0 toggle + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_1 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_2 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_3 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_4 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_5 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_6 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_7 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_8 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatcher /global_key_shortcuts/panel/taskbar2/task_9 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --print-reply --dest=org.kde.StatusNotifierWatchers /global_key_shortcuts/panel/taskbar2/task_10 org.lxqt.global_key_shortcuts.client.activated + + + + + dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Suspend" boolean:true + + + + + dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true + + + + + dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true + + + + + lxqt-leave + + + + + + + + root-menu + + + + + north + + + + + south + + + + + west + + + + + east + + + + + -100% + + + + + 100% + + + + + -100% + + + + + 100% + + + + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + + + horizontal + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + + menu.xml + 200 + + no + + 100 + + 400 + + yes + + no + + + + +
diff --git a/qterminal.org/qterminal.ini b/qterminal.org/qterminal.ini new file mode 100644 index 0000000..a6551c2 --- /dev/null +++ b/qterminal.org/qterminal.ini @@ -0,0 +1,113 @@ +[General] +AskOnExit=false +AudibleBell=false +BoldIntense=true +BookmarksFile=/home/martti/.config/qterminal.org/qterminal_bookmarks.xml +BookmarksVisible=true +Borderless=true +ChangeWindowIcon=true +ChangeWindowTitle=true +CloseTabOnMiddleClick=true +ConfirmMultilinePaste=false +DisableBracketedPasteMode=false +FixedTabWidth=true +FixedTabWidthValue=248 +HandleHistory= +HideTabBarWithOneTab=false +HistoryLimited=false +HistoryLimitedTo=100000 +KeyboardCursorShape=0 +LastWindowMaximized=false +MenuVisible=false +MotionAfterPaste=2 +NoMenubarAccel=true +OpenNewTabRightToActiveTab=false +PrefDialogSize=@Size(943 700) +SavePosOnExit=true +SaveSizeOnExit=true +ScrollbarPosition=2 +ShowCloseTabButton=true +SwapMouseButtons2and3=false +TabBarless=false +TabsPosition=0 +Term=xterm-256color +TerminalBackgroundImage= +TerminalBackgroundMode=1 +TerminalMargin=0 +TerminalTransparency=0 +TerminalsPreset=0 +TrimPastedTrailingNewlines=false +UseBookmarks=false +UseCWD=false +UseFontBoxDrawingChars=false +colorScheme=Linux +emulation=default +enabledBidiSupport=true +fontFamily=Liberation Mono +fontSize=10 +guiStyle= +highlightCurrentTerminal=true +showTerminalSizeHint=true +version=1.4.0 + +[DropMode] +Height=45 +KeepOpen=false +ShortCut=F12 +ShowOnStart=true +Width=70 + +[MainWindow] +ApplicationTransparency=0 +fixedSize=@Size(600 400) +pos=@Point(1166 157) +size=@Size(692 386) +state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\xfc\x2\0\0\0\x1\xfb\0\0\0&\0\x42\0o\0o\0k\0m\0\x61\0r\0k\0s\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\0\0\0\0\0\xff\xff\xff\xff\0\0\0\x8f\0\xff\xff\xff\0\0\x2\xb4\0\0\x1_\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0) + +[Sessions] +size=0 + +[Shortcuts] +Add%20Tab=Ctrl+Shift+T +Bottom%20Subterminal=Alt+Down +Clear%20Active%20Terminal=Ctrl+Shift+X +Close%20Tab=Ctrl+Shift+W +Collapse%20Subterminal= +Copy%20Selection=Ctrl+Shift+C +Find=Ctrl+Shift+F +Fullscreen=F11 +Handle%20history= +Hide%20Window%20Borders= +Left%20Subterminal=Alt+Left +Move%20Tab%20Left=Alt+Shift+Left|Ctrl+Shift+PgUp +Move%20Tab%20Right=Alt+Shift+Right|Ctrl+Shift+PgDown +New%20Window=Ctrl+Shift+N +Next%20Tab=Ctrl+PgDown +Next%20Tab%20in%20History=Ctrl+Shift+Tab +Paste%20Clipboard=Ctrl+Shift+V +Paste%20Selection=Shift+Ins +Preferences...= +Previous%20Tab=Ctrl+PgUp +Previous%20Tab%20in%20History=Ctrl+Tab +Quit= +Rename%20Session=Alt+Shift+S +Right%20Subterminal=Alt+Right +Show%20Tab%20Bar= +Split%20Terminal%20Horizontally= +Split%20Terminal%20Vertically= +Tab%201= +Tab%2010= +Tab%202= +Tab%203= +Tab%204= +Tab%205= +Tab%206= +Tab%207= +Tab%208= +Tab%209= +Toggle%20Bookmarks=Ctrl+Shift+B +Toggle%20Menu=Ctrl+F10 +Top%20Subterminal=Alt+Up +Zoom%20in=Ctrl++ +Zoom%20out=Ctrl+- +Zoom%20reset=Ctrl+0 -- 2.44.0