1 |
On 05/10/2017 04:08 PM, Walter Dnes wrote: |
2 |
> On Wed, May 10, 2017 at 03:36:05PM -0400, Jonathan Callen wrote |
3 |
> |
4 |
>> Additionally, "setterm --blank force" turns the console off immediately. |
5 |
> |
6 |
> Thank you; that's exactly what I was looking for. My script |
7 |
> ~/bin/dark now reads... |
8 |
> |
9 |
> #!/bin/bash |
10 |
> sleep 1 && xset -display :0.0 dpms force off |
11 |
> setterm --blank force |
12 |
> |
13 |
> ...so I can execute "dark" in either X or a true text console, and it |
14 |
> works in both cases. |
15 |
> |
16 |
|
17 |
If I may suggest an enhancement, you might want to probe the environment |
18 |
the script is running in so that only the relevant command gets run; |
19 |
unless of course you really do want everything off at once regardless of |
20 |
whether X is running.. |
21 |
|
22 |
-- |
23 |
Daniel Campbell - Gentoo Developer |
24 |
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net |
25 |
fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6 |