|
|
@ -65,6 +65,8 @@ syncstate() |
|
|
|
if (state == StateSuspend) { |
|
|
|
if (state == StateSuspend) { |
|
|
|
setpineled(Red); |
|
|
|
setpineled(Red); |
|
|
|
writefile(powerstatefile, "mem"); |
|
|
|
writefile(powerstatefile, "mem"); |
|
|
|
|
|
|
|
state = StateNoInput; |
|
|
|
|
|
|
|
syncstate(); |
|
|
|
} else if (state == StateNoInput) { |
|
|
|
} else if (state == StateNoInput) { |
|
|
|
setpineled(Blue); |
|
|
|
setpineled(Blue); |
|
|
|
writefile(brightnessfile, "200"); |
|
|
|
writefile(brightnessfile, "200"); |
|
|
@ -137,7 +139,7 @@ readinputloop(Display *dpy, int screen) { |
|
|
|
lastkeysym = NULL; |
|
|
|
lastkeysym = NULL; |
|
|
|
switch (keysym) { |
|
|
|
switch (keysym) { |
|
|
|
case XF86XK_AudioRaiseVolume: |
|
|
|
case XF86XK_AudioRaiseVolume: |
|
|
|
state = (state == StateSuspend ? StateDead : StateSuspend); |
|
|
|
state = StateSuspend; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case XF86XK_AudioLowerVolume: |
|
|
|
case XF86XK_AudioLowerVolume: |
|
|
|
state = (state == StateNoInput ? StateNoInputNoScreen : StateNoInput); |
|
|
|
state = (state == StateNoInput ? StateNoInputNoScreen : StateNoInput); |
|
|
|