Project

General

Profile

About NXDE » History » Version 3

Stefan Mark, 01/02/2021 01:55 PM

1 1 Stefan Mark
h1. About NXDE
2
3
NXDE does not really exist. It is the name i use to refer to a loose collection of simple tools intended to help one maintain a Linux Desktop without using a Desktop Environment like KDE, Gnome or Xfce. In days of yore, one could do so easily by just not using one. But in today's times of wonder, that's often not quite as easy. One might want some of the flashy-shiny newfangled features like automagic mounting, Keyrings or whatnot. Then there is software which wont work without DBus, user session handlers or polkit. Not to mention a gazillion XDG environmental variables.
4
5
If you are in search for something that easily and automagically does all that and more for you, this is not what you are looking for. If you are looking for some helpers to easify this endeavour, you may be right here. But keep in mind that all of what is collected here as "nxde" really is just my personal collection of tools, right in the middle of a slow and unordered process of getting polished for general use. It will totally lack features, often the documentation will be all but a stub (if existing at all). Of curse it is buggy. But meh, it just works for me. If you make it work for you, send me a patch, and it will work for both of us.
6
7
h2. Concepts
8
9
A core and interlinking part for all of this is the configuration. In general, all configuration should happen in to files. One system wide, and one per session. These configuration files should be nothing more than simple key=value stores.
10
11
h3. Configuration file format
12
13
Dead simple:
14
<pre>
15
aKey = someValue
16
</pre>
17
Defines a key "aKey" having some value "someValue". The first = sign in any row mark the end of the key and the beginning of the value. Note that for key as well as for value leading and trailing white spaces are ignored. There is no masking. Don't use quotation marks, as they don't do anything:
18
<pre>
19
"  my key    = bob"    =    "    some value with spaces      " 
20
</pre>
21
Results in the key: @"  my key@ with the value @ bob"    =    "    some value with spaces      "@. One can't have = in their keys.
22
23
h3. Environmental variables
24
25
There are a few variables crucial for NXDE. They are oriented in style some common XDG variables:
26
27
* $NX_DESKTOP_SESSION
28
  The name of the current [[About NXDE#Sessions|Session]]. Should be a shell-safe string.
29
* $NX_CONFIG_HOME
30
  By default: $XDG_CONFIG_HOME/$XDG_CURRENT_DESKTOP/$NX_DESKTOP_SESSION
31
  This is where session configuration file is stored. Other session-specific configuration should be stored here too.
32
* NX_LOG_BASE
33 2 Stefan Mark
  By default: $XDG_DATA_HOME//$XDG_CURRENT_DESKTOP/$NX_DESKTOP_SESSION/log
34 1 Stefan Mark
  Here at NXDE we like logs. Because we are buggy. Logs are helping. Log all the things!
35
36
h3. Configuration files
37
38 2 Stefan Mark
There are two main configuration files. One is the system configuration in */etc/nx/system.rc*. The other is the (user) session configuration in *$NX_CONFIG_HOME/session.rc*. Anything part of nxde should store its configuration in these files. Except when it has a shitload of configuration, then it should use another configuration file (maybe even in a different format), and just store the files location here.
39
40 1 Stefan Mark
h3. Sessions
41 2 Stefan Mark
42
Nxde sessions are sets of user configurations. What the user makes out of that is up to said user. For example, maybe said user usually uses "dwm":https://dwm.suckless.org/, but for _reasons_ sometimes wants to use "Openbox":http://openbox.org/wiki/Main_Page. Then he can have different setups for both (and different logs!).
43
44
h2. Decisions
45
46
Nxde tries to be simple and minimal, yet configurable and extensible. And especially, replaceable. Every part of nxde should be easily replaceable but some other thing doing the same or similar. Thus:
47
48
h3. Be minimal, be replaceable
49
50
Whatever you do, try to do only one thing. Maybe two if you really have to. It is said that specialisation is for ants. Good. Be an ant! If anything, nxde should be an anthill. No ant is irreplaceable. Be effective and efficient. And make it easy to be replaced. Avoid dependencies, especially heavy ones.
51
52
h3. Programming languages
53
54
Currently everything is either written in C or Bash. Other languages may be acceptable too, but here are some general rules:
55
56
* Scripting languages are only acceptable for one-shots. That is, everything what is started, does something and ends. It may have user interactive parts, if the interaction is also of the short do-and-done kind.
57
* Compiled languages have to be compiled to native machine code. No runtime environments allowed.
58
* All kinds of libraries have to (usually) be distribution packaged. It does not matter if certain libraries are not packaged in certain distributions. But if most or all libraries are distributed via other means (like npm), the language is disqualified.
59
* The language may not be ultra heavy. _This is a rubber rule_.
60
61
h3. Naming scheme
62
63
Shit should start with "nx".
64
65
h3. Documentation
66
67
Documentation is fucking important. Always provide some. Please? 
68
69
* Man pages for every program and every C-library function.
70
* In-code-documentation whenever one has time to do so. Please!
71
* Decent READMEs.
72
* TODO lists
73
74
h3. Attitude
75
76 3 Stefan Mark
* We do things the way we do because we want to. Your way is not better. Neither is our.
77
* "Thing" is not better than "other thing", no matter how much you like it. It may be better suited for something, though.
78
* Especially: "New" is not by itself better than "old". And vice versa.
79
* For us, "ease of use" is more important than "easy to use"
80
* Looks may be deceiving. In UX -more than- as much as everywhere else.
81
* If "Thing" is not important to you, it still may to someone else.
82
* Efficiency is not devaluated by cheap CPU.