Go to file
Alex Belykh 3e3b0ca9de Add graph.step_hook property for more flexible drawing
There is a limit to how much one can do with step_shape callback.

By its nature it can only have three parameters, and that list
can't be extended, because the user is expected to set
the property to a function from gears.shape, all of which have
different meanings for parameters past the first 3.

Moreover step_shape requires the current coordinate system
to be modified accordingly because it draws the shape at (0,0).

Lastly it's not expected to handle NaN heights and thus is
never called for NaN values.

This makes it hard to implement things like the following:
1) drawing steps which depend on knowing their position
relative to other steps. (e.g. connecting data points with
bezier curves)
2) drawing steps while appropriately handling NaN values in
any way other than not drawing anything, which might be still
wrong or not sufficient. (e.g. interpolating data points
requires to know *where* there are gaps in data, not simply
continuing with the next present value)
3) drawing steps that need the knowledge of the exact value
that is being drawn (e.g. drawing value tooltips over bars)

The step_hook callback (name bikeshedding welcome) is designed
to solve the problems (for now only the first two of the 3).

Whenever it's set, it takes precedence over step_shape property
and is used to draw steps.
No coordinate transformation before calling it takes place
like for step_shape(). The (0, 0) is always the top-left corner
of the graph drawing area (sans borders), when it's called.

In contrast to step_shape() which only accepts three parameters
(cairo, width, height), step_hook() accepts
(cairo, x, y, baseline_y, step_width, options).

(x, y) is what would be (0, 0) in step_shape, i.e. the
coordinates of the bar top. The y parameter can be NaN,
and step_hook() is expected to handle that.

baseline_y is the y coordinate of the bar bottom.
(baseline_y - y) is what is known as `height` in step_shape.
But note that baseline_y is never NaN, so even in the
NaN case step_hook() can at least know where the baseline is.

step_width is the bar's width, just like in step_shape.

options is the same table that is passed to the
group_start()/group_finish() callbacks, it contains
some useful data for nontrivial drawing needs and it could be
extended later with more useful data at leisure,
e.g. with `value`, if such need arises, without fear of
coming in conflict with other user's parameters.
2021-05-22 01:51:13 +07:00
build-utils doc: Revert the last few commits. (#3317) 2021-04-05 01:11:05 -07:00
common Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
docs Merge pull request #3263 from Aire-One/doc_textclock 2021-04-07 09:59:08 +00:00
icons icons: remove invaders 2009-09-08 13:29:25 +02:00
lib Add graph.step_hook property for more flexible drawing 2021-05-22 01:51:13 +07:00
manpages Make easier to cut-n-paste 2020-10-09 11:30:17 -07:00
objects doc: Add a client border color example. 2021-03-22 00:56:02 -07:00
spec graph: complete widget overhaul and bug fixes 2021-05-20 22:16:17 +07:00
tests graph: complete widget overhaul and bug fixes 2021-05-20 22:16:17 +07:00
themes Border_marked naming consistency (#3084) 2020-05-04 01:42:09 -07:00
utils awesome-client: handle multiple args (#2551) 2019-01-10 19:10:11 +01:00
.busted tests: busted: add config file, use --verbose by default (#2076) 2017-10-22 18:05:00 +02:00
.editorconfig Add an EditorConfig file 2015-12-12 17:48:42 +01:00
.gitignore luacheck: enable cache (#2004) 2017-08-20 22:50:30 +02:00
.luacheckrc awful: Set a miss handler for capi.root 2019-10-05 18:06:50 -04:00
.luacov Travis: codecov: use -f with luacov output (#2563) 2019-01-10 10:56:39 +01:00
.mergify.yml ci: mergify: update for Travis, remove Codacy (#2627) 2019-01-29 12:53:24 +01:00
.travis.yml debug: Print *why* the build fails. 2021-04-07 01:38:53 -07:00
AutoOption.cmake CMake: Add "AUTO" state for WITH_DBUS and GENERATE_MANPAGES 2019-02-19 07:55:41 +01:00
CMakeLists.txt Rename Lua executable envvar 2021-03-23 09:10:07 +01:00
ISSUE_TEMPLATE.md Add an ISSUE_TEMPLATE.md file (#997) 2016-07-09 19:18:02 +02:00
LICENSE chance license to GPLv2 2007-09-12 14:29:51 +02:00
Makefile Minor: typos, Makefile aesthetics (#2690) 2019-02-22 08:42:43 +01:00
Packaging.cmake Packaging.cmake: cache CPACK_GENERATOR (#1924) 2017-07-21 01:06:59 +02:00
README.md Add README.md symlink 2015-02-28 23:14:13 +01:00
awesome-version-internal.h init: Add an API level concept to `capi`. 2020-02-08 17:18:01 -05:00
awesome.c modeline: Check the first XDG and fallback paths for modelines. (#3172) 2020-09-14 11:02:09 -07:00
awesome.desktop Remove deprecated Encoding key from awesome.desktop (#1394) 2017-01-13 22:21:50 +01:00
awesome.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
awesomeConfig.cmake List what Lua versions supported instead of which aren't 2021-04-21 10:04:18 +03:00
awesomerc.lua Make scroll work in the usual way in default rc.lua 2020-07-06 01:02:11 +02:00
banning.c Fix recursive enterleave ignore (#1747) 2017-04-21 18:53:25 +02:00
banning.h Clean up header includes 2014-03-30 20:07:48 +02:00
color.c Merge pull request #2207 from psychon/alpha_borders 2018-04-22 02:02:10 -04:00
color.h Correctly convert colors with alpha to a Lua string 2018-03-03 10:57:48 +01:00
config.h Use xcb-errors library if it is available 2019-03-03 09:15:29 +01:00
dbus.c dbus.c: Handle invalid bus names 2019-05-05 12:48:34 +02:00
dbus.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
draw.c Add awesome.pixbuf_to_surface 2018-01-18 18:10:35 +01:00
draw.h Add awesome.pixbuf_to_surface 2018-01-18 18:10:35 +01:00
event.c client: Rename the `manage` and `unmanage` signals. 2020-01-11 14:43:56 -08:00
event.h XKB update: Use an idle source 2019-02-18 13:45:34 +01:00
ewmh.c Fix _NET_CURRENT_DESKTOP ClientMessage handling (#3237) 2021-04-25 15:33:39 -07:00
ewmh.h C code: save all instead of just one client icons 2017-03-07 22:45:49 +01:00
globalconf.h cmd: Add more info to --version. 2020-02-08 17:18:01 -05:00
keygrabber.c keygrabber: Refactor to be an object instead of a function. 2018-08-06 19:03:25 -04:00
keygrabber.h Clean up header includes 2014-03-30 20:07:48 +02:00
luaa.c Quick fix to support libxkbcommon >= 1.0. 2020-09-13 21:54:56 -07:00
luaa.h Update luaa.h 2021-04-21 22:52:35 -07:00
mouse.c doc: Modify the template to allow merging sections. 2019-11-03 01:28:29 -05:00
mouse.h Revert "Support more than 5 mouse buttons" (FS#1082) 2013-03-29 16:07:13 +01:00
mousegrabber.c Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01:00
mousegrabber.h Revert "Support more than 5 mouse buttons" (FS#1082) 2013-03-29 16:07:13 +01:00
options.c Make 's' getopt flag take an argument 2020-09-17 03:27:35 -06:00
options.h modeline: Check the first XDG and fallback paths for modelines. (#3172) 2020-09-14 11:02:09 -07:00
property.c Add more TOVOv5 for unfixable APIs. 2020-01-11 15:43:31 -08:00
property.h Add support for motif wm hints 2018-08-03 19:19:43 +02:00
root.c Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01:00
selection.c doc: Use an explicit tag for all static functions. 2019-06-08 18:14:13 -04:00
selection.h Move setup of selection() to selection.c 2019-02-16 15:44:42 +01:00
spawn.c doc: Use an explicit tag for all static functions. 2019-06-08 18:14:13 -04:00
spawn.h Handle SIGCHLD ourselves instead of through GLib 2018-08-21 15:30:07 +02:00
stack.c doc: fix warnings from doxygen 2015-02-14 20:17:13 +01:00
stack.h Clean up header includes 2014-03-30 20:07:48 +02:00
strut.c geometry: Use the relevant rounding functions instead of integers 2016-04-18 04:20:22 -04:00
strut.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
systray.c Make alpha work on window borders 2018-03-03 10:57:48 +01:00
systray.h Remove unused argument to systray_request_handle() 2016-05-29 14:33:23 +02:00
xkb.c doc: Use an explicit tag for all static functions. 2019-06-08 18:14:13 -04:00
xkb.h XKB update: Use an idle source 2019-02-18 13:45:34 +01:00
xkb_utf32_to_keysym_compat.c Quick fix to support libxkbcommon >= 1.0. 2020-09-13 21:54:56 -07:00
xrdb.c Don't print warnings for non-existing xrdb values 2017-05-24 10:06:24 +02:00
xrdb.h Add a vim modeline to all C source 2015-12-12 17:42:16 +01:00
xwindow.c xwindow_translate_for_gravity: Change instead of set argument 2018-08-17 09:58:30 +02:00
xwindow.h Set WM_CLASS and WM_NAME on all our windows (#551) 2015-11-19 22:23:25 +01:00

README.md

Readme

About Awesome

Awesome is a highly configurable, next generation framework window manager for X.

Building and installation

After extracting the dist tarball or cloning the repository, run:

make
sudo make install

This will

  1. create a build directory at ./build,
  2. run cmake,
  3. build Awesome and
  4. install it to the default prefix path /usr/local.

Alternatively to the above, you can generate a .deb or .rpm package, for easy installation management:

make package

sudo dpkg -i awesome-x.y.z.deb
# or
sudo rpm -Uvh awesome-x.y.z.rpm

Advanced options and testing

A full list of dependencies, more advanced build options, as well as instructions on how to use the test suite can be found here.

Installing current git master as a package receipts

Arch Linux AUR

sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/awesome-git.git
cd awesome-git
makepkg -fsri

Debian-based

sudo apt build-dep awesome
git clone https://github.com/awesomewm/awesome
cd awesome
make package
sudo apt install *.deb

Running Awesome

You can directly select Awesome from your display manager. If not, you can add the following line to your .xinitrc to start Awesome using startx or to .xsession to start Awesome using your display manager:

exec awesome

In order to connect Awesome to a specific display, make sure that the DISPLAY environment variable is set correctly, e.g.:

DISPLAY=foo.bar:1 exec awesome

(This will start Awesome on display :1 of the host foo.bar.)

Configuration

The configuration of Awesome is done by creating a $XDG_CONFIG_HOME/awesome/rc.lua file, typically ~/.config/awesome/rc.lua.

An example configuration named awesomerc.lua is provided in the source.

Troubleshooting

On most systems any message printed by Awesome (including warnings and errors) is written to ~/.xsession-errors.

If Awesome does not start or the configuration file is not producing the desired results the user should examine this file to gain insight into the problem.

Debugging tips

You can call awesome with gdb like this:

DISPLAY=:2 gdb awesome

Then in gdb set any arguments and run it:

(gdb) set args --replace
(gdb) run

Asking questions

IRC

You can join us in the #awesome channel on the OFTC IRC network.

IRC Webchat

Stack Overflow

You can ask questions on Stack Overflow.

Reddit

We also have a awesome subreddit where you can share your work and ask questions.

Reporting issues

Please report any issues you may find on our bugtracker.

Contributing code

You can submit pull requests on the github repository. Please read the contributing guide for any coding, documentation or patch guidelines.

Status

Build Status

Documentation

Online documentation is available here.

License

The project is licensed under GNU General Public License v2 or later. You can read it online at (v2 or v3).