Commands¶
nxbacklightctrl¶
nxbacklightctrl [up, down, cur, set value]Manipulates the display backlight. The Display used is either the first in /sys/class/backlight/ or the value of key bright_path.
- cur echos the current brightness
- set value sets the current brightness to `cur`
- up, down increases or decreases the brightness by value of key bright_steps
Later additional commands will be added: bright (sets macimum brightness), dark (sets minimum (key dark_brightness) brightness), max (echos max brightness)\
Currently only usable as root (directly accessing backlight in sys). Later, it shall become usable for users by utilizing nxsysdaemon
nxdisplaydaemon¶
nxdisplaydaemon [-d[d]] [-t]`
Manages brightness (using nxsysdaemon ) and screen locking (with nxulock). Does not do power management. Leave that to dpms! When startet with `-d` or `-dd` prints out some or many debug messages. When start with `-t` (implies `-d`), sets darken timeouts to 5 Seconds.
Keys:- darken_timeout (default: 30s): inactivity time untils brightnes is reduced
- darken_ac_timeout (default: 2 * darken_timeout): same but when connected to mains
- lock_timeout (default: 300s): inactivity time until screen is locked
- lock_ac_timeout (default: cfg.lock_timeout): same but when connected to mains
- lock_save_timeout (default: 0): same but when docked or connected to a safe network
- save_networks (default: ""): ESSID considered to be safe (see above), for example at home.
- dock_is_save (default: false): Being docked is considered to be safe
- pseudo_dock, (default: ""): "VENDOR:DEVICE" string of a USB device which indicates safeness (eg a USB dock)
- fade_step_duration (default: 0.1): duration of a step when fading the brightness up or down
- dark_brightness (default: 1): darkest brightness when dimming down after inactivity
- bright_fade_steps (default: 20): Amout of steps from maximum to minimal brightness
There are many things to do. Both save_networks and pseudo_dock shall become arrays. Default values for fade_step_duration and bright_fade_steps shall be calculated suitably to the displays maximum brightness and possible amount of steps and a new key fade_time.\
Also, i will investigate how Gnome and KDE make it so that many videos will disable screen locking. At least some very common cases shall be supported.
nxlid¶
nxlid open/close
Should be run by acpid for "button.*(LID).*close" and *open. For open, sends signal SIGHUP to nxrandrd (see there). For close sends SIGHUP to nxrandrd (see there) when docked (see `is_docked` in nxhshlib), otherwise calls `nxsuspend mem`.
This is totally a stub
nxrandr¶
nxrandr [initialize] [silent] [debug]
Automagically initializes multihead setups using xrandr. By default, nxrandr iterates through all connected displays, sets them to `--auto` and `--left-of` the one before. As that is boring, it tries to load _$NX_CONFIG_HOME/nxrandr.rc, which is supposed to be a bash script. See the examples one, it is pretty well documented.
As nxrandr is supposed to be called by nxrandrd upon changes to the connected displays, it tries to detect misfirings. Those usually happen as multiple, indistuingishable firings after connecteing or disconnecting a display. These multiple firings are detected by simply ignoring events in short succession.
Note: The handling of multiple / misleading / wrong xrandr-events can become quite tricky. More on that in the example nxrandr.rc. Those events are may also be bugs in nxrandrd (see there)
nxsdwhisper¶
nxsdwhisper message
Echos what nxsysdaemon answers to `message`. Returns 0 on success, 1 otherwise.
nxsysdaemon¶
nxsysdaemon [-d] [-g GID]
A user-accessible interface to (a very small part of) /sys. Debug mode (`-d`) prints out all communication and disables daemonizing. Communications happens through a named pipe (/run/nxsysdaemon_fifo), by default the group 998 has write access. The group can be set by `-g GID`.
Protocoll:- gpv [string]: returns the protocol version
- gcb [number]: returns current brightness
- gmb [number]: returns maximum brightness
- scbNUMBER [boolean]: sets current brightness to NUMBER, returns success
- iac [boolean]: returns 1 when connected to mains
Note: This should probably provide much more features. For example batteries. And more.\
Note: Currently only support ONE display for brightness. Should support many.\
Note: Currently only support ONE power source for iac. Should support many.\
Note: The named pipes location should be configurable.\
Side note: this does not use DBus. Not because we find DBus particulary evil, but to keep the number of dependencies small.\
A future feature might be optional DBus support. Maybe implementing (part) of upower or something like that.
This project is especially open for more features. But keep in mind that this shall always remain a pretty thin layer. And look at the protocol. Its primitive, and shall remain so.
nxulock¶
nxulock -t
Locks the screen. Uses value of key lockApp if set, otherwise: csxlock, sxlock, slock xscreensaver. Uses nxhshlibs `prime_user` to find the current user owning an X11 session (see there). If the current user is neither that nor root, screen locking fails.
When `-t` is set returns 0 when the screen was already locked by nxulock and echos the PID of the current screen locker. Return 1 otherwise.
Note: Screen locking should work at least also when the current user is not the prime_user but has an X11 session nontheless. The whole thing is somewhat b0rky. See nxhshlibs `prime_user` for more on that. Anyway. Works for me
nxunotify¶
nxunotify
A wrapper for notify-send. When called as root, uses nxhshlibs `prime_user` to get the current X11 user and use notify-send as that user. Sets notify-send's `-a` parameter to the calling processes' name. All parameters are send through.
Use with care (as root user), as one can never be quite sure which user gets the message.
nxurandr¶
nxrandr
Execs the value of key randrApp. When called as root, uses nxhshlibs `prime_user` to get the current X11 user and exec the value of key randrApp in that users X session. Used to bind a xrandr-GUI-tool to an ACPI-key.
This is a stub. Should rather become universal.
nxwall¶
nxwall path setter
Randomly pics an image from `path` (recursive), and sets that as X-wallpaper using `setter`.
nxxdg¶
nxxdg [get file] [set aplication file]
Either `get`s `file`s mimetype (via xdg-mime) or `set`s `application` as handler for `file`s mimetype (via xdg-mime). Makes working with xdg-open a wee bit less painfull. Stull hurts. A lot.
Total stub. WIP. More an idea. Dont look.
nxxsel¶
nxxsel
Displays a menu to select the X session to start.
Now THIS is most stubby stub of all. Its literally just the menu I use. Completly static. Well, one can copy and modify it. But no worries, i intend to improve this.\
Might be moved to nxinit
wait_wm¶
wait_wm
Simply waits until there is window manager present. Usefull for X initialization. Some thing to not like to be started before a window manager appears.
Might be moved to nxinit
nxaabat¶
nxbat¶
nxmount¶
nxpm¶
nxpmshlib¶
nxsuspend¶
Updated by Stefan Mark over 4 years ago · 2 revisions