Skip to content

Commit 00c4a4f

Browse files
committed
Merge branch 'main' of github.com:instantOS/instantos.github.io
2 parents a4b7450 + 5084647 commit 00c4a4f

6 files changed

Lines changed: 454 additions & 112 deletions

File tree

‎about.md‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,11 @@
22

33
**instantOS** is based on [Arch Linux](https://archlinux.org/) and maintains full
44
compatibility with the Arch Wiki and AUR.
5-
It uses a custom window manager with a bunch of facilitating custom software
5+
It uses a custom window manager/compositor with a bunch of facilitating custom software
66
to provide an experience similar to a desktop environment but as **powerful and
77
fast as a window manager**. In fact, all pieces being made for each other
88
allows things that wouldn't be possible by just editing dotfiles.
99
It also has its own installer **[instantARCH](https://github.com/instantOS/instantARCH)**
1010
and **[instantNIX](https://github.com/instantOS/instantNIX/)** provides packages for
1111
the [Nix](https://nixos.org/explore.html) universal package manager and [NixOS](https://nixos.org).
1212

13-
## Suckless
14-
15-
**instantOS** is not a [suckless](https://suckless.org) distro. instantWM, instantLOCK and instantMENU
16-
started out as suckless forks, but contain less than 40% original suckless
17-
code and go into different directions.
18-
For instance, programs that are under 40KB should not place storage at such a
19-
high priority. Stability, usability, features and speed are more important.
20-
In contrast to [dwm](https://dwm.suckless.org), **instantOS** provides a complete, consistently good user
21-
experience out of the box that is easy to configure and customize.
22-
It comes with a sensible feature set without sacrificing a certain minimalism.

‎development/status.md‎

Lines changed: 77 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,109 @@
11
# Status bar customisation
22

3-
## Setting the status
3+
instantWM displays a status bar at the bottom of each monitor. The status text is configured via the TOML configuration file.
44

5-
Setting the status in instantWM works the same as for dwm.
5+
## Configuration
66

7-
```sh
8-
xsetroot -name "status text"
9-
```
10-
11-
instantOS ships with its own status text generator. If you want to set your own
12-
status text you first need to disable the built in solution. This can be done
13-
in Settings->instantOS->Status bar
7+
Configure the status bar by setting `status_command` in your config:
148

15-
::: details Planned status bar program
16-
It is planned to create a statusbar similar to dwmblocks that can run
17-
different status scripts at different intervals and then generates a
18-
complete status text that can be used by the window manager. It will
19-
however not be based on dwmblocks and will have a lot more features.
20-
dwmblocks is not used because it lacks some crucial features to make it
21-
work with the featureset of instantWM
22-
23-
### Runtime configuration
9+
```toml
10+
status_command = "i3status-rs"
11+
```
2412

25-
Customizing the status bar will not require recompiling it. Instead it will have a config file using the toml format
13+
This spawns an external command that outputs status text. The command should write to stdout.
2614

27-
### Markup
15+
### Default Status
2816

29-
The status bar will automatically add markup to status widgets to separate
30-
them from each other. Widgets can however also communicate with the bar to
31-
for example change their color on runtime.
17+
If no `status_command` is configured, instantWM displays a default status showing the version and current time:
3218

33-
### Validation
19+
```
20+
instantwm-VERSION HH:MM
21+
```
3422

35-
The markup parser currently in use in instantWM will crash the entire window
36-
manager if there is an error in the markup syntax. The planned status bar will
37-
perform validation on all config and status text so it is impossible to
38-
configure it in a way that will crash the window manager.
23+
The status updates every 30 seconds.
3924

40-
### Rust
25+
### Manual Status Updates
4126

42-
Following [imosid](https://github.com/instantOS/imosid) this will be the second instantOS project written in rust
27+
You can update the status bar programmatically using `instantwmctl`:
4328

44-
### Progress
29+
```bash
30+
instantwmctl update-status "My custom status"
31+
```
4532

46-
At the moment this is **all just plans**, no code for the status bar has
47-
been written yet as development is still focused on making the operating
48-
system more stable before piling on even more features
33+
Or using the socket API directly.
4934

50-
:::
35+
## i3bar JSON Protocol
5136

52-
## Styling
37+
instantWM uses the i3bar JSON protocol for status text. This is compatible with i3status, i3status-rs, and other i3bar-compatible programs.
5338

39+
The status command outputs JSON blocks:
5440

55-
The appearance of text in the status bar can be changed by using special markup
56-
syntax. The markup parser of instantWM is based on the
57-
[status-2d](https://dwm.suckless.org/patches/status2d/) patch for dwm.
41+
```json
42+
[{"full_text": "CPU: 12%", "color": "#ffffff"}, {"full_text": "Memory: 4.2GiB", "color": "#ffffff"}]
43+
```
5844

59-
All Markup commands have the following format
60-
```txt
61-
^commandnamecommandargument^
45+
Each block can include:
46+
- `full_text` - Main text to display
47+
- `short_text` - Short version for constrained spaces
48+
- `color` - Text color (hex format: "#RRGGBB")
49+
- `background` - Background color
50+
- `border` - Border color
51+
- `border_top`, `border_right`, `border_bottom`, `border_left` - Border widths
52+
- `min_width` - Minimum width (string or number)
53+
- `align` - Text alignment ("left", "center", "right")
54+
- `urgent` - Mark block as urgent (swaps colors)
55+
- `separator` - Show separator after block
56+
- `separator_block_width` - Width of separator
57+
- `name` - Block identifier for click events
58+
- `instance` - Block instance for click events
59+
- `markup` - Markup format ("pango")
60+
61+
### Example i3status-rs Config
62+
63+
```toml
64+
# ~/.config/i3status-rs/config.toml
65+
[[block]]
66+
block = "cpu"
67+
interval = 1
68+
69+
[[block]]
70+
block = "memory"
71+
interval = 10
72+
73+
[[block]]
74+
block = "time"
75+
format = "%H:%M"
76+
interval = 30
6277
```
6378

64-
They have a "\^" as suffix and prefix. The opening caret is immediately followed
65-
by the command name which is then (without a separator) followed by the
66-
argument.
79+
## Clickable Status Bar
6780

81+
You can make status blocks interactive by enabling click events in your status command.
6882

69-
### Colors
83+
The status command should output this header first:
7084

71-
```txt
72-
^c#ff0000^ this text have a red background ^d^ this text will have the default background color
73-
^t#ff0000^ this text have a red foreground ^d^ this text will have the default background color
85+
```json
86+
{"version": 1, "click_events": true}
7487
```
7588

76-
### Offsets
77-
78-
```txt
79-
^f11^there will be an 11px gap in front of this text
80-
```
81-
### Reset
89+
instantWM will then send click events to the status command's stdin when blocks are clicked.
8290

83-
```txt
84-
^d^text after this is reset to the default styling
85-
```
91+
## Styling
8692

87-
## Icons
93+
Configure status bar colors in your TOML config under `[colors.status]`:
8894

89-
// TODO
95+
```toml
96+
[colors.status]
97+
fg = "#DFDFDF"
98+
bg = "#121212"
99+
detail = "#3E485B"
100+
```
90101

91-
## Clickable applets
102+
## Troubleshooting
92103

93-
// TODO
104+
If the status bar is not working:
94105

95-
::: info
96-
This feature is not just lacking documentation
97-
There is just a very early implementation of this in the window manager that at the moment is not remotely ready for use
98-
:::
106+
1. Check that `status_command` is set in your config
107+
2. Verify the command runs standalone
108+
3. Check instantWM logs for errors
109+
4. Try `instantwmctl update-status "test"` to verify basic functionality

0 commit comments

Comments
 (0)