How does your startup decoration look like? Mine is

# Qtile startup commands, not repeated at qtile restart
@hook.subscribe.startup_once
def runner():

    # Set the cursor to something sane in X
    subprocess.Popen(['xsetroot', '-cursor_name', 'left_ptr'])

    # Start network manager applet
    subprocess.Popen(['nm-applet'])

    # Start screen-lock mechanism using slock and dunst notifications
    # via notify-send. lock time is -time 2 (min)
    subprocess.Popen([
        'xautolock', '-time', '2', '-locker', 'slock',
        '-notify', '7', '-notifier', 'notify-send About\ to\ lock...'])

    # Start systray icon for pulseaudio
    subprocess.Popen(['pasystray'])

    import subprocess
    from datetime import datetime
    # Start Skype
    try:
        subprocess.Popen(['skype'])
    except:
        f = open('log file', 'w')
        f.write(
            datetime.now().strftime('%Y-%m-%dT%H:%M') +
            'There was an error\n')
        f.close()

You can decorate all functions and calls with a try statement, in that way 
Qtile won't crash if you do a mistake in the config. When I do testing, I 
use try statements and use a notifcation of some sort to tell me if an 
error occured. In the example above, a message *should* be written to a 
log. It is terrible code, but it should work.
You can also excecute the code in the config using python, python might 
then give you some warnings if something isn't right. I remove the try 
statements, when the code have proven that it works.

But I think it would help a lot if you could show your startup_once hook 
code.

On Sunday, May 10, 2015 at 12:13:58 AM UTC-4, Aws A. wrote:
>
> Hello everyone. First of all I would love to thank everyone working on 
> qtile.
> So I tried decorating my startup function with startup_once and it doesn't 
> work and qtile revert back to the default configuration, and yes startup 
> does work.
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to