From f16a01c6fb52786f3f32019b0d0ec6d0ab88bfd4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 16 Jan 2020 17:56:49 -0700 Subject: [PATCH] Adjusted startup configuration * picom replaced compton * Fix conky config for i3 use in .update_x * Improved detection of current WM in .start_desktop_apps and .update_conky --- setup/linux/include_x/airootfs/etc/skel/.start_desktop_apps | 4 ++-- setup/linux/include_x/airootfs/etc/skel/.update_conky | 5 +++++ setup/linux/include_x/airootfs/etc/skel/.zlogin | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/setup/linux/include_x/airootfs/etc/skel/.start_desktop_apps b/setup/linux/include_x/airootfs/etc/skel/.start_desktop_apps index 2e33ed8f..d6d2b5ca 100755 --- a/setup/linux/include_x/airootfs/etc/skel/.start_desktop_apps +++ b/setup/linux/include_x/airootfs/etc/skel/.start_desktop_apps @@ -3,7 +3,7 @@ ## Start desktop apps based on WM # Start common apps -compton --backend xrender --xrender-sync --xrender-sync-fence & +picom --backend xrender --xrender-sync --xrender-sync-fence & sleep 1s x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared & conky & @@ -11,7 +11,7 @@ nm-applet & volumeicon & # Start WM specific apps -if fgrep -q "i3" /proc/cmdline; then +if ! [[ "${I3SOCK:-}" == "" ]]; then # i3 i3-msg restart else diff --git a/setup/linux/include_x/airootfs/etc/skel/.update_conky b/setup/linux/include_x/airootfs/etc/skel/.update_conky index 0e1445df..b97a86c1 100755 --- a/setup/linux/include_x/airootfs/etc/skel/.update_conky +++ b/setup/linux/include_x/airootfs/etc/skel/.update_conky @@ -24,6 +24,11 @@ for i in "${IF_LIST[@]}"; do done sed -i -r "s/#Network//" "${CONFIG_NEW}" +# Fix under i3 +if ! [[ "${I3SOCK:-}" == "" ]]; then + sed -i -r 's/(own_window_type)(.*)(desktop)/\1\2override/' "${CONKY_NEW}" +fi + # Replace config if there were changes if ! diff -q "${CONFIG_NEW}" "${CONFIG_REAL}" >/dev/null 2>&1; then rm "${CONFIG_REAL}" diff --git a/setup/linux/include_x/airootfs/etc/skel/.zlogin b/setup/linux/include_x/airootfs/etc/skel/.zlogin index 1b005d4d..65a23ed1 100644 --- a/setup/linux/include_x/airootfs/etc/skel/.zlogin +++ b/setup/linux/include_x/airootfs/etc/skel/.zlogin @@ -5,7 +5,6 @@ if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then # Update settings if using i3 if fgrep -q "i3" /proc/cmdline; then - sed -i -r 's/#(own_window_type override)/\1/' ~/.conkyrc sed -i -r 's/openbox-session/i3/' ~/.xinitrc fi