From 616daba61063bacd0fd4ecb6a2d7b0459899a151 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sat, 24 Sep 2022 12:08:07 +0200 Subject: [PATCH] Autostart & PKGBUILD updates --- PKGBUILD | 5 +++-- autostart.sh.template | 9 +++++++++ ewm-start | 25 +++++++++++++++++++++++++ ewm.desktop | 2 +- ewm.install | 5 +++++ src/config.h | 2 +- 6 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 autostart.sh.template create mode 100755 ewm-start create mode 100644 ewm.install diff --git a/PKGBUILD b/PKGBUILD index edf6551..a83ab15 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,10 +6,11 @@ pkgdesc="Epsilons Window Manager, a tiling window manager based of suckless' dyn arch=('i686' 'x86_64') url="https://github.com/E-Almqvist/ewm" license=('GPL-3.0') -depends=('libx11' 'libxinerama' 'libxft' 'freetype2' 'alacritty') +depends=('libx11' 'libxinerama' 'libxft' 'freetype2' 'alacritty' 'yajl') optdepends=('rofi' 'polybar') options=(zipman) source=(ewm.desktop) +install=ewm.install build() { cd "$srcdir/" @@ -23,5 +24,5 @@ package() { install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" install -Dm644 ewm.desktop "$pkgdir/usr/share/xsessions/ewm.desktop" + install -Dm755 ewm-start "$pkgdir/usr/local/bin/ewm-start" } -sha256sums=('4434a1f7047cfc847a21f70674111e68002aea80a9dc08f8b61f55d8f88794c3') diff --git a/autostart.sh.template b/autostart.sh.template new file mode 100644 index 0000000..7293bcb --- /dev/null +++ b/autostart.sh.template @@ -0,0 +1,9 @@ +# GNOME Keyring +# eval $(gnome-keyring-daemon --start) +# export SSH_AUTH_SOCK + +# Keyboard layout +# setxkbmap us & + +# Display settings +# $HOME/.screenlayout/layout.sh & diff --git a/ewm-start b/ewm-start new file mode 100755 index 0000000..96543a2 --- /dev/null +++ b/ewm-start @@ -0,0 +1,25 @@ +#!/bin/sh + +# Run user configured autostart +$HOME/.ewm/autostart.sh & + +# Compositor (picom) +# Terminate already running picom instances +killall -q picom + +# Wait until the processes have been shut down +while pgrep -u $UID -x picom >/dev/null; do sleep 1; done + +# Launch picom +picom --config $HOME/.config/picom/picom.conf --experimental-backends --xrender-sync-fence & + +# Background (nitrogen) +nitrogen --restore & + +# Loop +while true; do + ewm > /dev/null 2>&1 +done + +# WM +exec ewm diff --git a/ewm.desktop b/ewm.desktop index 86ae5bc..7d8c1fc 100644 --- a/ewm.desktop +++ b/ewm.desktop @@ -1,5 +1,5 @@ [Desktop Entry] Name=ewm Comment=Epsilons Window Manager -Exec=ewm +Exec=ewm-start Type=XSession diff --git a/ewm.install b/ewm.install new file mode 100644 index 0000000..86cdb80 --- /dev/null +++ b/ewm.install @@ -0,0 +1,5 @@ +post_install() { + mkdir -p $HOME/.ewm + [ ! -f $HOME/.ewm/autostart.sh ] && cp $startdir/autostart.sh.template $HOME/.ewm/autostart.sh + echo "* EWM has been installed. Change your autostart script in ~/.ewm/autostart.sh to fir your needs." +} diff --git a/src/config.h b/src/config.h index 2360cc5..17c7f5e 100644 --- a/src/config.h +++ b/src/config.h @@ -8,7 +8,7 @@ static const unsigned int snap = 0; /* snap pixel (32)*/ static const unsigned int gappx = 0; static const unsigned int gapmodes[] = { 0, 20 }; static const int showbar = 1; /* 0 means no bar */ -static const int topbar = 1; /* 0 means bottom bar */ +static const int topbar = 0; /* 0 means bottom bar */ static const int barverticalpadding = 6; /* Vertical bar padding */ static const int usealtbar = 1; /* 1 means use non-dwm status bar */