How to configure apps to autostart in a minimal WM?

Everything about X, Gnome, KDE, ... and everything running on it

Re: How to configure apps to autostart in a minimal WM?

Postby None1975 » 2018-01-29 15:50

Here mine .xsessionrc
Code: Select all
#!/bin/bash

# Load resources

xrdb -merge .Xresources

export GTK_OVERLAY_SCROLLING=0
# Fire up apps
xautolock -time 10 -locker 'slock' &
setxkbmap -layout "us,lt,ru" -option "grp:alt_shift_toggle" &
nitrogen --restore &
compton -b &

if [ -x /usr/bin/nm-applet ] ; then
   nm-applet --sm-disable &
fi

exec herbstluftwm --locked
OS: Debian 9.3 / WM: Ratpoison
Debian Wiki | DontBreakDebian, Ratpoison
User avatar
None1975
 
Posts: 312
Joined: 2015-11-29 18:23
Location: Lithuania

Re: How to configure apps to autostart in a minimal WM?

Postby bedtime » 2018-01-29 17:40

https://forums.bunsenlabs.org/viewtopic.php?id=3774

For the curious :)

I can't attest to understanding all of what this article said, but what I did understand, was useful.

Thank you guys for posting your configs. :)

* EDIT *

Might as well post mine since I finally got it working:

~.xsession:
Code: Select all
# Statusbar loop
while true; do
xsetroot -name \
"$(date +"%a, %b %d, %H.%M.%S") \
Vol: $(amixer get Master | awk '$0~/%/{print $4}' | tr -d '[]') \
Mem: $(free -m | grep Mem | awk '{print $3"mb"}') \
CPU: $[100 - $(vmstat 1 2 | tail -1 | awk '{print $15}')]%"

#vmstat is set to wait 1 second to take its cpu reading
done &

#Rearrange moniters so they make sense
xrandr --output LVDS-1 --auto --output VGA-1 --auto --left-of LVDS-1

#Allow to copy in st term
xclip -in &

#Check email
st -g 54x10 -e ./email_check.sh &

#A script to start dwm (can be seen below)
exec startdwm


Status bar will look something like:

Wed, Jan 31, 12.48.11 Vol: 70% Mem: 100mb CPU: 0%

~/bin/startdwm:
Code: Select all
#!/bin/bash
# dwm can now be restarted without destroying other X windows by pressing the usual Mod-Shift-Q com$
# It is a good idea to place the above startup script into a separate file, ~/bin/startdwm for inst$

while true;
do
    # Log stderror to a file
    #dwm 2> ~/.dwm.log

    # No error logging
    dwm >/dev/null 2>&1
done
bedtime
 
Posts: 36
Joined: 2012-12-16 19:34

Previous

Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable